expo-superwall 1.1.6 → 1.2.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.
Files changed (35) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/android/build.gradle +1 -1
  3. package/android/src/main/java/expo/modules/superwallexpo/SuperwallExpoModule.kt +9 -0
  4. package/android/src/main/java/expo/modules/superwallexpo/json/IntegrationAttribute.kt +1 -0
  5. package/android/src/main/java/expo/modules/superwallexpo/json/SuperwallOptions.kt +9 -0
  6. package/build/package.json +1 -1
  7. package/build/src/SuperwallExpoModule.d.ts +1 -0
  8. package/build/src/SuperwallExpoModule.d.ts.map +1 -1
  9. package/build/src/SuperwallExpoModule.js.map +1 -1
  10. package/build/src/SuperwallExpoModule.types.d.ts +1 -1
  11. package/build/src/SuperwallExpoModule.types.d.ts.map +1 -1
  12. package/build/src/SuperwallExpoModule.types.js.map +1 -1
  13. package/build/src/SuperwallOptions.d.ts +11 -0
  14. package/build/src/SuperwallOptions.d.ts.map +1 -1
  15. package/build/src/SuperwallOptions.js.map +1 -1
  16. package/build/src/compat/index.d.ts +5 -4
  17. package/build/src/compat/index.d.ts.map +1 -1
  18. package/build/src/compat/index.js +4 -1
  19. package/build/src/compat/index.js.map +1 -1
  20. package/build/src/compat/lib/SuperwallOptions.d.ts +14 -0
  21. package/build/src/compat/lib/SuperwallOptions.d.ts.map +1 -1
  22. package/build/src/compat/lib/SuperwallOptions.js +14 -0
  23. package/build/src/compat/lib/SuperwallOptions.js.map +1 -1
  24. package/build/src/index.d.ts +1 -1
  25. package/build/src/index.d.ts.map +1 -1
  26. package/build/src/index.js.map +1 -1
  27. package/build/src/useSuperwall.d.ts +12 -1
  28. package/build/src/useSuperwall.d.ts.map +1 -1
  29. package/build/src/useSuperwall.js +10 -1
  30. package/build/src/useSuperwall.js.map +1 -1
  31. package/ios/Json/IntegrationAttribute+Json.swift +1 -0
  32. package/ios/Json/SuperwallOptions+Json.swift +9 -0
  33. package/ios/SuperwallExpo.podspec +1 -1
  34. package/ios/SuperwallExpoModule.swift +9 -0
  35. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"SuperwallExpoModule.types.js","sourceRoot":"","sources":["../../src/SuperwallExpoModule.types.ts"],"names":[],"mappings":"AAAA,mCAAmC","sourcesContent":["// src/SuperwallExpoModule.types.ts\n\n/**\n * @file Defines the core data types, interfaces, and event structures used by the Superwall Expo SDK.\n * These types are crucial for understanding the data flow and interactions with the native Superwall modules.\n */\n\n/**\n * Defines the type of an experiment variant, indicating whether the user sees a paywall or is in a holdout group.\n * - `TREATMENT`: The user is assigned to a treatment group and will be presented with a paywall.\n * - `HOLDOUT`: The user is assigned to a holdout group and will not be presented with a paywall for this experiment.\n */\nexport type VariantType = \"TREATMENT\" | \"HOLDOUT\"\n\n/**\n * Represents an experiment variant, detailing its identifier, type, and associated paywall.\n */\nexport interface Variant {\n /**\n * The unique identifier for this specific variant of an experiment.\n */\n id: string\n /**\n * The type of the variant, determining the user's experience (e.g., seeing a paywall or being in a holdout).\n * See {@link VariantType}.\n */\n type: VariantType\n /**\n * The identifier of the paywall associated with this variant.\n * This will be an empty string if no paywall is linked (e.g., for `HOLDOUT` variants).\n */\n paywallId: string\n}\n\n/**\n * Represents a Superwall experiment, including its ID, group ID, and the variant assigned to the user.\n */\nexport interface Experiment {\n /**\n * The unique identifier for the experiment.\n */\n id: string\n /**\n * The identifier of the group to which this experiment belongs.\n * Experiments are often grouped for organizational or analytical purposes.\n */\n groupId: string\n /**\n * The specific variant of the experiment that the current user has been assigned to.\n * See {@link Variant}.\n */\n variant: Variant\n}\n\n/**\n * Defines the type of an entitlement, typically indicating a level of service or access.\n * - `SERVICE_LEVEL`: Represents an entitlement that grants a certain service level.\n */\nexport type EntitlementType = \"SERVICE_LEVEL\" // Currently, only \"SERVICE_LEVEL\" is used.\n\n/**\n * Represents a user entitlement, signifying a feature or content piece the user has access to.\n */\nexport interface Entitlement {\n /**\n * The unique identifier for the entitlement.\n */\n id: string\n /**\n * The type of the entitlement. See {@link EntitlementType}.\n */\n type: EntitlementType\n}\n\n/**\n * Third-party integration providers supported by Superwall.\n * Use these values with `setIntegrationAttributes()` to link user IDs from\n * attribution and analytics platforms.\n */\nexport type IntegrationAttribute =\n | \"adjustId\"\n | \"amplitudeDeviceId\"\n | \"amplitudeUserId\"\n | \"appsflyerId\"\n | \"brazeAliasName\"\n | \"brazeAliasLabel\"\n | \"onesignalId\"\n | \"fbAnonId\"\n | \"firebaseAppInstanceId\"\n | \"iterableUserId\"\n | \"iterableCampaignId\"\n | \"iterableTemplateId\"\n | \"mixpanelDistinctId\"\n | \"mparticleId\"\n | \"clevertapId\"\n | \"airshipChannelId\"\n | \"kochavaDeviceId\"\n | \"tenjinId\"\n | \"posthogUserId\"\n | \"customerioId\"\n | \"appstackId\"\n\n/**\n * Object with optional keys for third-party integration provider IDs.\n * Used with `setIntegrationAttributes()` to link attribution and analytics platforms.\n *\n * Available keys: adjustId, amplitudeDeviceId, amplitudeUserId, appsflyerId,\n * brazeAliasName, brazeAliasLabel, onesignalId, fbAnonId, firebaseAppInstanceId,\n * iterableUserId, iterableCampaignId, iterableTemplateId, mixpanelDistinctId,\n * mparticleId, clevertapId, airshipChannelId, kochavaDeviceId, tenjinId,\n * posthogUserId, customerioId, appstackId\n *\n * @example\n * ```typescript\n * setIntegrationAttributes({\n * adjustId: \"adjust_123\",\n * amplitudeUserId: \"user_456\",\n * airshipChannelId: \"channel_789\"\n * })\n * ```\n */\nexport type IntegrationAttributes = {\n [K in IntegrationAttribute]?: string\n}\n\n/**\n * Contains information about the user's entitlements, separated into active and inactive.\n * This is typically fetched from Superwall's servers to determine what content or features\n * the user has access to.\n */\nexport interface EntitlementsInfo {\n /**\n * Array of all entitlements known for the user.\n * Present when the native bridge exposes the full entitlement set.\n */\n all?: Entitlement[]\n /**\n * Array of entitlements that are currently active for the user.\n * See {@link Entitlement}.\n */\n active: Entitlement[]\n /**\n * Array of entitlements that are not currently active for the user.\n * See {@link Entitlement}.\n */\n inactive: Entitlement[]\n}\n\n/**\n * Describes the reason why a paywall presentation was skipped for the user.\n * This can happen due to various conditions like being in a holdout group,\n * not matching audience rules, or if the specified placement doesn't exist.\n */\nexport type PaywallSkippedReason =\n | {\n /**\n * The user was assigned to a holdout group within an experiment, so the paywall was intentionally skipped.\n */\n type: \"Holdout\"\n /**\n * Detailed information about the experiment that led to this holdout.\n * See {@link Experiment}.\n */\n experiment: Experiment\n }\n | {\n /**\n * The user did not match any of the audience rules defined for the campaign or trigger.\n */\n type: \"NoAudienceMatch\"\n }\n | {\n /**\n * The placement ID specified for the paywall presentation was not found in the Superwall dashboard configuration.\n */\n type: \"PlacementNotFound\"\n }\n\n/**\n * Represents the outcome of a user's interaction with a paywall.\n * This includes scenarios like purchasing a product, declining the paywall, or restoring purchases.\n */\nexport type PaywallResult =\n | {\n /**\n * The user successfully purchased a product through the paywall.\n */\n type: \"purchased\"\n /**\n * The identifier of the product that was purchased.\n */\n productId: string\n }\n | {\n /**\n * The user explicitly declined or closed the paywall without making a purchase.\n */\n type: \"declined\"\n }\n | {\n /**\n * The user successfully restored their previous purchases through the paywall.\n */\n type: \"restored\"\n }\n\n/**\n * Represents the subscription status of the user.\n * It indicates whether the user is unknown, inactive, or active with specific entitlements.\n */\nexport type SubscriptionStatus =\n | {\n /**\n * The subscription status has not yet been determined or is unavailable.\n * This can be an initial state before the SDK fetches the status.\n */\n status: \"UNKNOWN\"\n }\n | {\n /**\n * The user does not have an active subscription.\n * They are not currently entitled to any subscription-based features.\n */\n status: \"INACTIVE\"\n }\n | {\n /**\n * The user has an active subscription.\n */\n status: \"ACTIVE\"\n /**\n * A list of entitlements the user has access to due to their active subscription.\n * This array is only present when the status is \"ACTIVE\".\n * See {@link Entitlement}.\n */\n entitlements: Entitlement[]\n }\n\n/**\n * Specifies the reason why a paywall was closed.\n * This helps in understanding the flow of paywall presentations and user interactions.\n * - `systemLogic`: Closed automatically by the SDK due to internal logic (e.g., another paywall is about to open).\n * - `forNextPaywall`: Closed because another paywall is scheduled to be presented immediately after.\n * - `webViewFailedToLoad`: Closed because the web view component failed to load the paywall content.\n * - `manualClose`: Closed due to a direct user action (e.g., tapping a close button on the paywall).\n * - `none`: No specific reason, or the reason is unknown.\n */\nexport type PaywallCloseReason =\n | \"systemLogic\"\n | \"forNextPaywall\"\n | \"webViewFailedToLoad\"\n | \"manualClose\"\n | \"none\"\n\n/**\n * Defines the feature gating behavior for a paywall or feature.\n * - `gated`: The feature or content is gated and requires a specific condition (e.g., active subscription) to be met for access.\n * - `nonGated`: The feature or content is not gated and is available to all users, regardless of subscription status.\n */\nexport type FeatureGatingBehavior = \"gated\" | \"nonGated\"\n\n/**\n * Specifies the conditions under which a survey should be presented to the user.\n * - `ON_MANUAL_CLOSE`: Present the survey when the user manually closes the paywall.\n * - `ON_PURCHASE`: Present the survey after the user completes a purchase.\n */\nexport type SurveyShowCondition = \"ON_MANUAL_CLOSE\" | \"ON_PURCHASE\"\n\n/**\n * Represents a single option within a survey.\n */\nexport interface SurveyOption {\n /**\n * The unique identifier for this survey option.\n */\n id: string\n /**\n * The text displayed to the user for this option.\n */\n title: string\n}\n\n/**\n * Represents a survey that can be presented to the user, typically after a paywall interaction.\n */\nexport interface Survey {\n /**\n * The unique identifier for the survey.\n */\n id: string\n /**\n * A key used for assigning this survey to a user, often for A/B testing or specific targeting.\n */\n assignmentKey: string\n /**\n * The title of the survey, displayed to the user.\n */\n title: string\n /**\n * The main message or question of the survey.\n */\n message: string\n /**\n * An array of options available for the user to choose from in the survey.\n * See {@link SurveyOption}.\n */\n options: SurveyOption[]\n /**\n * The condition that triggers the presentation of this survey.\n * See {@link SurveyShowCondition}.\n */\n presentationCondition: SurveyShowCondition\n /**\n * The probability (ranging from 0.0 to 1.0) that this survey will be presented if its condition is met.\n */\n presentationProbability: number\n /**\n * If true, an \"Other\" option with a free-text input field will be included in the survey.\n */\n includeOtherOption: boolean\n /**\n * If true, a close button or option will be available on the survey, allowing the user to dismiss it.\n */\n includeCloseOption: boolean\n}\n\n/**\n * Defines the types of local notifications that Superwall can schedule.\n * - `trialStarted`: A notification to inform the user that their free trial has started.\n */\nexport type LocalNotificationType = \"trialStarted\" // Currently, only \"trialStarted\" is used.\n\n/**\n * Represents a local notification that can be scheduled by the Superwall SDK.\n */\nexport interface LocalNotification {\n /**\n * The type of the local notification. See {@link LocalNotificationType}.\n */\n type: LocalNotificationType\n /**\n * The title of the notification.\n */\n title: string\n /**\n * The main body text of the notification.\n */\n body: string\n /**\n * The delay in seconds before the notification is shown to the user, relative to the scheduling time.\n */\n delay: number\n /**\n * An optional subtitle for the notification.\n */\n subtitle?: string\n}\n\n/**\n * Represents a request for a computed property that the Superwall SDK needs to evaluate.\n * Computed properties are dynamic values based on user attributes or other data.\n */\nexport interface ComputedPropertyRequest {\n /**\n * The type or name of the computed property being requested.\n */\n type: string\n /**\n * The name of the placement associated with this computed property request, if applicable.\n */\n placementName: string\n}\n\n/**\n * The store that backs a {@link Product}.\n * - `APP_STORE`: Apple App Store product (iOS).\n * - `PLAY_STORE`: Google Play Store product (Android).\n * - `STRIPE`: Stripe-managed product.\n * - `PADDLE`: Paddle-managed product.\n * - `SUPERWALL`: Manually granted entitlement from the Superwall dashboard.\n * - `CUSTOM`: A custom product purchased through a `PurchaseController` outside of any\n * storefront. When you receive a custom product in `onPurchase`, you must implement the\n * purchase yourself (e.g., calling your backend) instead of going through StoreKit / Billing.\n * - `OTHER`: An unknown or unsupported store.\n */\nexport type ProductStore =\n | \"APP_STORE\"\n | \"PLAY_STORE\"\n | \"STRIPE\"\n | \"PADDLE\"\n | \"SUPERWALL\"\n | \"CUSTOM\"\n | \"OTHER\"\n\n/**\n * The Apple App Store-specific data for a {@link Product}.\n */\nexport interface AppStoreProductIdentifier {\n /** The App Store product identifier. */\n id: string\n}\n\n/**\n * The Stripe-specific data for a {@link Product}.\n */\nexport interface StripeProductIdentifier {\n /** The Stripe price/product identifier. */\n id: string\n /** The number of trial days for this product, if any. */\n trialDays?: number\n}\n\n/**\n * The Paddle-specific data for a {@link Product}.\n */\nexport interface PaddleProductIdentifier {\n /** The Paddle product identifier. */\n id: string\n}\n\n/**\n * The custom-product data for a {@link Product}.\n * Custom products are purchased via your `PurchaseController` rather than through a storefront.\n */\nexport interface CustomStoreProductIdentifier {\n /** The custom product identifier (as configured on the Superwall dashboard). */\n id: string\n}\n\n/**\n * The offer type that applied to a {@link SubscriptionTransaction}.\n *\n * @platform Android\n */\nexport type SubscriptionOfferType =\n | \"trial\"\n | \"code\"\n | \"subscription\"\n | \"promotional\"\n | \"winback\"\n | \"revoked\"\n\n/**\n * A subscription transaction recorded in the customer's purchase history.\n *\n * @platform Android — currently only delivered by the Android SDK.\n */\nexport interface SubscriptionTransaction {\n /** The unique identifier for the transaction. */\n transactionId: string\n /** The product identifier of the subscription. */\n productId: string\n /** ISO-8601 timestamp of when the user was charged. */\n purchaseDate: string\n /** Whether the subscription is set to renew. */\n willRenew: boolean\n /** Whether the transaction has been revoked. */\n isRevoked: boolean\n /** Whether the subscription is in a billing grace period. */\n isInGracePeriod: boolean\n /** Whether the subscription is in a billing retry period. */\n isInBillingRetryPeriod: boolean\n /** Whether the subscription is currently active. */\n isActive: boolean\n /** ISO-8601 expiration date, or `null` if non-renewing. */\n expirationDate?: string | null\n /** Store the transaction came from (e.g. `\"PLAY_STORE\"`). */\n store: string\n /** Offer type, if any was applied. */\n offerType?: SubscriptionOfferType\n /** iOS-only — the subscription group identifier. */\n subscriptionGroupId?: string\n}\n\n/**\n * A non-subscription (one-time / consumable) transaction in the customer's purchase history.\n *\n * @platform Android — currently only delivered by the Android SDK.\n */\nexport interface NonSubscriptionTransaction {\n /** The unique identifier for the transaction. */\n transactionId: string\n /** The product identifier of the in-app purchase. */\n productId: string\n /** ISO-8601 timestamp of when the user was charged. */\n purchaseDate: string\n /** Whether the in-app purchase is consumable. */\n isConsumable: boolean\n /** Whether the transaction has been revoked. */\n isRevoked: boolean\n /** Store the transaction came from (e.g. `\"PLAY_STORE\"`). */\n store: string\n}\n\n/**\n * The latest subscription and entitlement state for the customer.\n * Snapshots are immutable and don't auto-update.\n *\n * @platform Android — currently only delivered by the Android SDK.\n */\nexport interface CustomerInfo {\n /** The user ID at the time the snapshot was taken. */\n userId: string\n /** All subscription transactions, ordered by purchase date ascending. */\n subscriptions: SubscriptionTransaction[]\n /** All non-subscription transactions, ordered by purchase date ascending. */\n nonSubscriptions: NonSubscriptionTransaction[]\n /** All entitlements available to the user. */\n entitlements: Entitlement[]\n}\n\n/**\n * Represents a product available for purchase on a paywall, as defined within {@link PaywallInfo}.\n * This provides a simplified view of a product, focusing on its ID, name, store, and granted entitlements.\n */\nexport interface Product {\n /**\n * The unique identifier of the product (e.g., from the App Store or Google Play).\n */\n id: string\n /**\n * The name of the product, if available.\n */\n name?: string\n /**\n * A list of entitlements that are granted to the user upon purchasing this product.\n * See {@link Entitlement}.\n */\n entitlements: Entitlement[]\n /**\n * The store that backs this product. See {@link ProductStore}.\n * Use this to detect `CUSTOM` products in `onPurchase` and route them to your own\n * purchase logic instead of StoreKit / Google Play Billing.\n *\n * @platform iOS — present on iOS 4.15.0+. May be absent on older Android SDK versions.\n */\n store?: ProductStore\n /**\n * App Store-specific product data, present when `store === \"APP_STORE\"`.\n * @platform iOS\n */\n appStoreProduct?: AppStoreProductIdentifier\n /**\n * Stripe-specific product data, present when `store === \"STRIPE\"`.\n * @platform iOS\n */\n stripeProduct?: StripeProductIdentifier\n /**\n * Paddle-specific product data, present when `store === \"PADDLE\"`.\n * @platform iOS\n */\n paddleProduct?: PaddleProductIdentifier\n /**\n * Custom-product data, present when `store === \"CUSTOM\"`.\n * @platform iOS\n */\n customProduct?: CustomStoreProductIdentifier\n}\n\n/**\n * Contains comprehensive information about a paywall, including its configuration, associated experiment,\n * products, loading times, and other metadata. This object is central to understanding paywall behavior.\n */\nexport interface PaywallInfo {\n /** The unique identifier of the paywall, as configured in the Superwall dashboard. */\n identifier: string\n /** The name of the paywall, as configured in the Superwall dashboard. */\n name: string\n /** The URL where the paywall's web content is hosted. */\n url: string\n /**\n * A unique identifier for this paywall presentation, used to correlate all events\n * within a single presentation lifecycle.\n */\n presentationId?: string\n /**\n * The experiment associated with this paywall presentation, if applicable.\n * See {@link Experiment}.\n */\n experiment?: Experiment\n /**\n * A list of products available for purchase on this paywall.\n * See {@link Product}.\n */\n products: Product[]\n /** A list of product identifiers (SKUs) available on this paywall. */\n productIds: string[]\n /**\n * The name of the event or placement that triggered the presentation of this paywall, if applicable.\n * Corresponds to `presentedByPlacementWithName` in the native Swift SDK.\n */\n presentedByEventWithName?: string\n /**\n * The identifier of the event or placement that triggered the presentation of this paywall, if applicable.\n * Corresponds to `presentedByPlacementWithId` in the native Swift SDK.\n */\n presentedByEventWithId?: string\n /**\n * The Unix timestamp (in seconds or milliseconds) of when the event triggering this paywall occurred, if applicable.\n * Corresponds to `presentedByPlacementAt` in the native Swift SDK.\n */\n presentedByEventAt?: number\n /**\n * The source that initiated the paywall presentation (e.g., \"implicit\", \"explicit\", \"getPaywall\").\n */\n presentedBy: string\n /**\n * The type of the source that led to the paywall presentation (e.g., \"Register\" for `Superwall.shared.register(event:)`, \"Track\" for `Superwall.shared.track(event:)`).\n */\n presentationSourceType?: string\n /** The Unix timestamp when the request to load the paywall configuration and rules (response) started. */\n responseLoadStartTime?: number\n /** The Unix timestamp when the paywall response successfully loaded. */\n responseLoadCompleteTime?: number\n /** The Unix timestamp if the paywall response failed to load. */\n responseLoadFailTime?: number\n /** The duration (typically in milliseconds) it took to load the paywall response. */\n responseLoadDuration?: number\n /** Indicates whether a free trial is available for any of the products on this paywall. */\n isFreeTrialAvailable: boolean\n /**\n * The feature gating behavior for this paywall.\n * See {@link FeatureGatingBehavior}.\n */\n featureGatingBehavior: FeatureGatingBehavior\n /**\n * The reason why the paywall was closed.\n * See {@link PaywallCloseReason}.\n */\n closeReason: PaywallCloseReason\n /** The Unix timestamp when the web view started loading the paywall's HTML content. */\n webViewLoadStartTime?: number\n /** The Unix timestamp when the web view successfully loaded the paywall's HTML content. */\n webViewLoadCompleteTime?: number\n /** The Unix timestamp if the web view failed to load the paywall's HTML content. */\n webViewLoadFailTime?: number\n /** The duration (typically in milliseconds) it took for the web view to load the paywall's content. */\n webViewLoadDuration?: number\n /** The Unix timestamp when the loading of product information (from App Store/Google Play) started. */\n productsLoadStartTime?: number\n /** The Unix timestamp when the product information successfully loaded. */\n productsLoadCompleteTime?: number\n /** The Unix timestamp if loading product information failed. */\n productsLoadFailTime?: number\n /** The duration (typically in milliseconds) it took to load the product information. */\n productsLoadDuration?: number\n /** The version of the `paywall.js` script used in the paywall, if available. */\n paywalljsVersion?: string\n /**\n * A list of computed property requests associated with this paywall presentation.\n * See {@link ComputedPropertyRequest}.\n */\n computedPropertyRequests: ComputedPropertyRequest[]\n /**\n * A list of surveys associated with this paywall that may be presented.\n * See {@link Survey}.\n */\n surveys: Survey[]\n /**\n * A list of local notifications that may be scheduled as a result of this paywall presentation.\n * See {@link LocalNotification}.\n */\n localNotifications: LocalNotification[]\n /**\n * The state of the paywall, updated on paywall dismiss.\n * Contains key-value pairs representing the paywall's current state.\n */\n state: Record<string, any>\n /**\n * A snapshot of the customer's subscription and entitlement state at the time\n * the paywall was presented.\n *\n * @platform Android — currently only populated by the Android SDK (2.7.12+).\n * Will be `undefined` on iOS.\n */\n customerInfo?: CustomerInfo\n}\n\n/**\n * Represents a custom callback invoked from a paywall.\n * Custom callbacks allow paywalls to communicate with the app to perform\n * operations like validation, data fetching, etc.\n */\nexport interface CustomCallback {\n /** The name of the callback as defined in the paywall. */\n name: string\n /** Optional variables passed from the paywall. */\n variables?: Record<string, any>\n}\n\n/**\n * The status of a custom callback result.\n * - `success`: The callback completed successfully.\n * - `failure`: The callback failed.\n */\nexport type CustomCallbackResultStatus = \"success\" | \"failure\"\n\n/**\n * The result to return from a custom callback handler.\n * Determines which branch (onSuccess/onFailure) executes in the paywall.\n */\nexport interface CustomCallbackResult {\n /** Whether the callback succeeded or failed. */\n status: CustomCallbackResultStatus\n /** Optional key-value pairs to return to the paywall. */\n data?: Record<string, any>\n}\n\n/**\n * Provides information about an error that occurred during a promotional code redemption attempt.\n */\nexport interface RedemptionErrorInfo {\n /**\n * A developer-readable message describing the error.\n */\n message: string\n}\n\n/**\n * Provides information about an expired promotional code during a redemption attempt.\n */\nexport interface RedemptionExpiredCodeInfo {\n /**\n * Indicates whether a new code was resent to the user (e.g., via email) if applicable.\n */\n resent: boolean\n /**\n * The obfuscated email address to which a new code was resent, if applicable.\n */\n obfuscatedEmail?: string\n}\n\n/**\n * Defines who owns the item or subscription obtained through a promotional code redemption.\n */\nexport type RedemptionOwnership =\n | {\n /**\n * Ownership of the redeemed item is tied to a specific application user ID.\n */\n type: \"APP_USER\"\n /**\n * The application user ID of the owner.\n */\n appUserId: string\n }\n | {\n /**\n * Ownership of the redeemed item is tied to a specific device ID.\n */\n type: \"DEVICE\"\n /**\n * The device ID of the owner.\n */\n deviceId: string\n }\n\n/**\n * Contains store-specific identifiers for a purchaser, relevant for tracking redemptions across different billing systems.\n */\nexport type RedemptionStoreIdentifiers =\n | {\n /**\n * The purchase or subscription is managed by Stripe.\n */\n store: \"STRIPE\"\n /**\n * The Stripe customer ID.\n */\n stripeCustomerId: string\n /**\n * The Stripe subscription IDs associated with the customer.\n */\n stripeSubscriptionIds: string[]\n }\n | {\n /**\n * The purchase or subscription is managed by Paddle.\n */\n store: \"PADDLE\"\n /**\n * The Paddle customer ID.\n */\n paddleCustomerId: string\n /**\n * The Paddle subscription IDs associated with the customer.\n */\n paddleSubscriptionIds: string[]\n }\n | {\n /**\n * The store is unknown or not explicitly handled by this type definition.\n */\n store: string // Allows for other store names not explicitly defined\n /**\n * Allows for additional properties specific to other or future store integrations.\n */\n [key: string]: any\n }\n\n/**\n * Information about the purchaser involved in a promotional code redemption.\n */\nexport interface RedemptionPurchaserInfo {\n /**\n * The application user ID of the purchaser.\n */\n appUserId: string\n /**\n * The email address of the purchaser, if available.\n */\n email?: string\n /**\n * Store-specific identifiers for the purchaser.\n * See {@link RedemptionStoreIdentifiers}.\n */\n storeIdentifiers: RedemptionStoreIdentifiers\n}\n\n/**\n * Represents a product involved in a redemption transaction with comprehensive pricing and localization information.\n */\nexport interface PaywallProduct {\n /** The unique identifier of the product */\n identifier: string\n /** Language code for localization */\n languageCode: string\n /** Locale string */\n locale: string\n /** Currency code (e.g., \"USD\") */\n currencyCode: string\n /** Currency symbol (e.g., \"$\") */\n currencySymbol: string\n /** Subscription period */\n period: string\n /** Periodly description */\n periodly: string\n /** Localized period description */\n localizedPeriod: string\n /** Alternative period description */\n periodAlt: string\n /** Period length in days */\n periodDays: number\n /** Period length in weeks */\n periodWeeks: number\n /** Period length in months */\n periodMonths: number\n /** Period length in years */\n periodYears: number\n /** Raw price as a number */\n rawPrice: number\n /** Formatted price string */\n price: string\n /** Daily equivalent price */\n dailyPrice: string\n /** Weekly equivalent price */\n weeklyPrice: string\n /** Monthly equivalent price */\n monthlyPrice: string\n /** Yearly equivalent price */\n yearlyPrice: string\n /** Raw trial period price */\n rawTrialPeriodPrice: number\n /** Formatted trial period price */\n trialPeriodPrice: string\n /** Trial period daily price */\n trialPeriodDailyPrice: string\n /** Trial period weekly price */\n trialPeriodWeeklyPrice: string\n /** Trial period monthly price */\n trialPeriodMonthlyPrice: string\n /** Trial period yearly price */\n trialPeriodYearlyPrice: string\n /** Trial period length in days */\n trialPeriodDays: number\n /** Trial period length in weeks */\n trialPeriodWeeks: number\n /** Trial period length in months */\n trialPeriodMonths: number\n /** Trial period length in years */\n trialPeriodYears: number\n /** Trial period description text */\n trialPeriodText: string\n /** Trial period end date string */\n trialPeriodEndDate: string\n}\n\n/**\n * Information about the paywall that was involved in or led to a promotional code redemption.\n */\nexport interface RedemptionPaywallInfo {\n /**\n * The identifier of the paywall.\n */\n identifier: string\n /**\n * The name of the placement that triggered the paywall presentation.\n */\n placementName: string\n /**\n * Parameters associated with the placement.\n */\n placementParams: Record<string, any>\n /**\n * The ID of the experiment variant shown to the user.\n */\n variantId: string\n /**\n * The ID of the experiment the user was part of.\n */\n experimentId: string\n /**\n * The product identifier associated with the paywall, if any.\n * @deprecated Use `product.identifier` instead. This property will be removed in a future version.\n */\n productIdentifier?: string\n /**\n * The product associated with the paywall, if any.\n */\n product?: PaywallProduct\n}\n\n/**\n * Contains detailed information about a successful promotional code redemption\n * or an expired subscription that was previously redeemed.\n */\nexport interface RedemptionInfo {\n /**\n * Information about who owns the redeemed item or subscription.\n * See {@link RedemptionOwnership}.\n */\n ownership: RedemptionOwnership\n /**\n * Information about the purchaser.\n * See {@link RedemptionPurchaserInfo}.\n */\n purchaserInfo: RedemptionPurchaserInfo\n /**\n * Information about the paywall related to this redemption, if applicable.\n * See {@link RedemptionPaywallInfo}.\n */\n paywallInfo?: RedemptionPaywallInfo\n /**\n * A list of entitlements granted by this redemption.\n * See {@link Entitlement}.\n */\n entitlements: Entitlement[]\n}\n\n/**\n * Represents the result of an attempt to redeem a promotional code.\n * This is a discriminated union type based on the `status` property.\n */\nexport type RedemptionResult =\n | {\n /**\n * The promotional code was successfully redeemed.\n */\n status: \"SUCCESS\"\n /**\n * The promotional code that was redeemed.\n */\n code: string\n /**\n * Detailed information about the successful redemption.\n * See {@link RedemptionInfo}.\n */\n redemptionInfo: RedemptionInfo\n }\n | {\n /**\n * An error occurred during the redemption attempt.\n */\n status: \"ERROR\"\n /**\n * The promotional code that was attempted.\n */\n code: string\n /**\n * Information about the error that occurred.\n * See {@link RedemptionErrorInfo}.\n */\n error: RedemptionErrorInfo\n }\n | {\n /**\n * The promotional code has expired and cannot be redeemed.\n */\n status: \"CODE_EXPIRED\"\n /**\n * The expired promotional code.\n */\n code: string\n /**\n * Information related to the expired code, such as whether a new one was resent.\n * See {@link RedemptionExpiredCodeInfo}.\n */\n expired: RedemptionExpiredCodeInfo\n }\n | {\n /**\n * The promotional code is invalid or does not exist.\n */\n status: \"INVALID_CODE\"\n /**\n * The invalid promotional code that was attempted.\n */\n code: string\n }\n | {\n /**\n * The subscription associated with the promotional code has expired,\n * but the code was successfully redeemed in the past.\n */\n status: \"EXPIRED_SUBSCRIPTION\"\n /**\n * The promotional code associated with the expired subscription.\n */\n code: string\n /**\n * Detailed information about the prior redemption.\n * See {@link RedemptionInfo}.\n */\n redemptionInfo: RedemptionInfo\n }\n\n/**\n * Represents the result of a trigger evaluation.\n * This determines what action Superwall will take in response to an event or placement registration.\n */\nexport type TriggerResult =\n | {\n /** The specified placement ID was not found in the Superwall dashboard configuration. */\n result: \"placementNotFound\"\n }\n | {\n /** The user did not match any audience rules for the trigger. */\n result: \"noAudienceMatch\"\n }\n | {\n /** A paywall will be presented to the user as a result of this trigger. */\n result: \"paywall\"\n /**\n * Information about the experiment that led to this paywall presentation.\n * See {@link Experiment}.\n */\n experiment: Experiment\n }\n | {\n /** The user was assigned to a holdout group, and no paywall will be shown. */\n result: \"holdout\"\n /**\n * Information about the experiment that led to this holdout assignment.\n * See {@link Experiment}.\n */\n experiment: Experiment\n }\n | {\n /** An error occurred during the trigger evaluation process. */\n result: \"error\"\n /** A string describing the error. */\n error: string\n }\n\n/**\n * Represents comprehensive information about a product involved in a transaction event.\n * This interface includes detailed pricing, subscription, trial, and localization information\n * from both the native iOS (StoreProduct) and Android (Product) implementations.\n */\nexport interface TransactionProductIdentifier {\n /** The unique identifier of the product (e.g., SKU). */\n id: string\n\n /** The product identifier from the store. */\n productIdentifier: string\n\n /** The full identifier including any additional qualifiers. */\n fullIdentifier: string\n\n /** The raw price of the product as a number. */\n price: number\n\n /** The price formatted according to the device's locale and currency. */\n localizedPrice: string\n\n /** The subscription period formatted for display (e.g., \"1 month\"). */\n localizedSubscriptionPeriod: string\n\n /** The subscription period type (e.g., \"month\", \"year\"). */\n period: string\n\n /** The subscription period with \"ly\" suffix (e.g., \"monthly\", \"yearly\"). */\n periodly: string\n\n /** The number of weeks in the subscription period. */\n periodWeeks: number\n\n /** The weeks duration as a formatted string. */\n periodWeeksString: string\n\n /** The number of months in the subscription period. */\n periodMonths: number\n\n /** The months duration as a formatted string. */\n periodMonthsString: string\n\n /** The number of years in the subscription period. */\n periodYears: number\n\n /** The years duration as a formatted string. */\n periodYearsString: string\n\n /** The number of days in the subscription period. */\n periodDays: number\n\n /** The days duration as a formatted string. */\n periodDaysString: string\n\n /** The calculated daily price of the product. */\n dailyPrice: string\n\n /** The calculated weekly price of the product. */\n weeklyPrice: string\n\n /** The calculated monthly price of the product. */\n monthlyPrice: string\n\n /** The calculated yearly price of the product. */\n yearlyPrice: string\n\n /** Whether the product includes a free trial period. */\n hasFreeTrial: boolean\n\n /** The trial period price formatted for display. */\n localizedTrialPeriodPrice: string\n\n /** The trial period price as a number. */\n trialPeriodPrice: number\n\n /** The end date of the trial period as an ISO string, or null if no trial. */\n trialPeriodEndDate: string | null\n\n /** The trial period end date formatted as a display string. */\n trialPeriodEndDateString: string\n\n /** The number of days in the trial period. */\n trialPeriodDays: number\n\n /** The trial days duration as a formatted string. */\n trialPeriodDaysString: string\n\n /** The number of weeks in the trial period. */\n trialPeriodWeeks: number\n\n /** The trial weeks duration as a formatted string. */\n trialPeriodWeeksString: string\n\n /** The number of months in the trial period. */\n trialPeriodMonths: number\n\n /** The trial months duration as a formatted string. */\n trialPeriodMonthsString: string\n\n /** The number of years in the trial period. */\n trialPeriodYears: number\n\n /** The trial years duration as a formatted string. */\n trialPeriodYearsString: string\n\n /** The trial period formatted as descriptive text (e.g., \"7-day free trial\"). */\n trialPeriodText: string\n\n /** The locale identifier for the product (e.g., \"en_US\"). */\n locale: string\n\n /** The language code extracted from the locale, or null if unavailable. */\n languageCode: string | null\n\n /** The currency code for the product's price (e.g., \"USD\"). */\n currencyCode: string | null\n\n /** The currency symbol for the product's price (e.g., \"$\"). */\n currencySymbol: string | null\n\n /** The region code extracted from the locale, or null if unavailable. */\n regionCode: string | null\n\n /**\n * The structured subscription period information.\n * Contains the unit of time and the value for that unit.\n */\n subscriptionPeriod: {\n /** The time unit for the subscription period. */\n unit: \"day\" | \"week\" | \"month\" | \"year\"\n /** The number of units for the subscription period. */\n value: number\n } | null\n\n /** The identifier for the subscription group this product belongs to, if applicable. */\n subscriptionGroupIdentifier?: string | null\n\n /** Whether this product can be shared with family members. */\n isFamilyShareable?: boolean\n\n /** The token for the introductory offer (iOS 18+, Android). Used for purchase verification. */\n introOfferToken?: string | null\n\n /** Additional attributes and metadata associated with the product. */\n attributes: Record<string, any>\n}\n\n/**\n * Represents a store transaction, providing detailed information about a purchase or subscription event.\n * Dates are typically in ISO 8601 format.\n */\nexport interface StoreTransaction {\n /** The request ID from the Superwall configuration that initiated this transaction, if applicable. */\n configRequestId?: string\n /** The ID of the app session during which this transaction occurred. */\n appSessionId?: string\n /** The ISO 8601 date string of when the transaction occurred. */\n transactionDate?: string\n /** The original transaction identifier, useful for linking related transactions (e.g., subscriptions). */\n originalTransactionIdentifier?: string\n /** The transaction identifier provided by the respective app store (App Store, Google Play). */\n storeTransactionId?: string\n /** The ISO 8601 date string of the original transaction date, especially relevant for subscriptions. */\n originalTransactionDate?: string\n /** The web order line item ID, used for auto-renewable subscriptions on some platforms. */\n webOrderLineItemID?: string\n /** The app bundle ID associated with this transaction. */\n appBundleId?: string\n /** The identifier for the subscription group this transaction belongs to. */\n subscriptionGroupId?: string\n /** Indicates if this transaction represents an upgrade from a previous subscription. */\n isUpgraded?: boolean\n /** The ISO 8601 date string of when the subscription or product access expires. */\n expirationDate?: string\n /** The offer ID associated with this transaction, if any. */\n offerId?: string\n /** The ISO 8601 date string if the transaction was revoked by the store or developer. */\n revocationDate?: string\n /** The App Store account token, specific to Apple's App Store. */\n appAccountToken?: string\n /** The purchase token for Android transactions (Google Play). */\n purchaseToken?: string\n /** The signature for Android transactions for verification (Google Play). */\n signature?: string\n}\n\n/**\n * Represents the type of restoration process that occurred.\n */\nexport type RestoreType =\n | {\n /** Indicates that the restoration occurred as part of a purchase attempt. */\n type: \"viaPurchase\"\n /**\n * The store transaction associated with the purchase that led to the restoration, if available.\n * See {@link StoreTransaction}.\n */\n storeTransaction?: StoreTransaction\n }\n | {\n /** Indicates that the restoration was initiated manually by the user (e.g., by tapping a \"Restore Purchases\" button). */\n type: \"viaRestore\"\n }\n\n/**\n * Defines the possible statuses of a paywall presentation request.\n * - `presentation`: A paywall is being or will be presented.\n * - `noPresentation`: No paywall will be presented.\n * - `timeout`: The request to determine presentation timed out.\n */\nexport type PaywallPresentationRequestStatusType = \"presentation\" | \"noPresentation\" | \"timeout\"\n\n/**\n * Represents the status of a request to present a paywall.\n */\nexport interface PaywallPresentationRequestStatus {\n /** The overall status of the paywall presentation request. See {@link PaywallPresentationRequestStatusType}. */\n status: PaywallPresentationRequestStatusType\n}\n\n/**\n * Provides the reason behind the status of a paywall presentation request, especially when no paywall is shown.\n */\nexport type PaywallPresentationRequestStatusReason =\n | {\n /** A paywall was presented because the debugger is active. */\n reason: \"debuggerPresented\"\n }\n | {\n /** No paywall was presented because one is already being displayed. */\n reason: \"paywallAlreadyPresented\"\n }\n | {\n /** No paywall was presented because the user is in a holdout group of an experiment. */\n reason: \"holdout\"\n /**\n * Information about the experiment that led to this holdout.\n * See {@link Experiment}.\n */\n experiment: Experiment\n }\n | {\n /** No paywall was presented because the user did not match any audience rules. */\n reason: \"noRuleMatch\"\n }\n | {\n /** No paywall was presented because the triggering event was not found. */\n reason: \"eventNotFound\"\n }\n | {\n /** No paywall was presented because the paywall view controller is not available (native SDK specific). */\n reason: \"noPaywallViewController\"\n }\n | {\n /** No paywall was presented because there is no view controller available to present it on (native SDK specific). */\n reason: \"noViewController\"\n }\n | {\n /** No paywall was presented because the user is already subscribed. */\n reason: \"userIsSubscribed\"\n }\n | {\n /** No paywall was presented due to an error. */\n reason: \"error\"\n /** A string describing the error. */\n error: string\n }\n | {\n /** No paywall was presented because it is gated by some condition. */\n reason: \"paywallIsGated\"\n /**\n * Information about the paywall that was gated.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n }\n\n/**\n * Represents a Superwall event that can be tracked by the SDK.\n * This is a discriminated union type where the `event` property determines the specific event and its associated payload.\n * These events provide insights into user behavior, SDK operations, and paywall interactions.\n */\n\n// Individual Superwall Event Interfaces/Types\n\n/**\n * User's first time seeing a Superwall-related element or paywall.\n */\nexport interface FirstSeenEvent {\n /** User's first time seeing a Superwall-related element or paywall. */\n event: \"firstSeen\"\n}\n\n/**\n * The application was opened.\n */\nexport interface AppOpenEvent {\n /** The application was opened. */\n event: \"appOpen\"\n}\n\n/**\n * The application was launched.\n */\nexport interface AppLaunchEvent {\n /** The application was launched. */\n event: \"appLaunch\"\n}\n\n/**\n * An alias was set for the user's identity.\n */\nexport interface IdentityAliasEvent {\n /** An alias was set for the user's identity. */\n event: \"identityAlias\"\n}\n\n/**\n * The application was installed.\n */\nexport interface AppInstallEvent {\n /** The application was installed. */\n event: \"appInstall\"\n}\n\n/**\n * A new user session started.\n */\nexport interface SessionStartEvent {\n /** A new user session started. */\n event: \"sessionStart\"\n}\n\n/**\n * The user's identity was reset (logged out).\n */\nexport interface ResetEvent {\n /** The user's identity was reset (logged out). */\n event: \"reset\"\n}\n\n/**\n * The Superwall configuration was refreshed.\n */\nexport interface ConfigRefreshEvent {\n /** The Superwall configuration was refreshed. */\n event: \"configRefresh\"\n}\n\n/**\n * Failed to refresh the Superwall configuration.\n */\nexport interface ConfigFailEvent {\n /** Failed to refresh the Superwall configuration. */\n event: \"configFail\"\n}\n\n/**\n * Attributes were passed with the Superwall configuration.\n */\nexport interface ConfigAttributesEvent {\n /** Attributes were passed with the Superwall configuration. */\n event: \"configAttributes\"\n}\n\n/**\n * All pending paywall assignments have been confirmed.\n */\nexport interface ConfirmAllAssignmentsEvent {\n /** All pending paywall assignments have been confirmed. */\n event: \"confirmAllAssignments\"\n}\n\n/**\n * A touch event began on the screen (generic).\n */\nexport interface TouchesBeganEvent {\n /** A touch event began on the screen (generic). */\n event: \"touchesBegan\"\n}\n\n/**\n * A survey was closed.\n */\nexport interface SurveyCloseEvent {\n /** A survey was closed. */\n event: \"surveyClose\"\n}\n\n/**\n * Restoration of purchases started.\n */\nexport interface RestoreStartEvent {\n /** Restoration of purchases started. */\n event: \"restoreStart\"\n}\n\n/**\n * Restoration of purchases completed successfully.\n */\nexport interface RestoreCompleteEvent {\n /** Restoration of purchases completed successfully. */\n event: \"restoreComplete\"\n}\n\n/**\n * Restoration of purchases failed.\n */\nexport interface RestoreFailEvent {\n /** Restoration of purchases failed. */\n event: \"restoreFail\"\n /** The error message. */\n message: string\n}\n\n/**\n * Request for AdServices token started.\n */\nexport interface AdServicesTokenRequestStartEvent {\n /** Request for AdServices token started. */\n event: \"adServicesTokenRequestStart\"\n}\n\n/**\n * Request for AdServices token failed.\n */\nexport interface AdServicesTokenRequestFailEvent {\n /** Request for AdServices token failed. */\n event: \"adServicesTokenRequestFail\"\n /** The error message. */\n error: string\n}\n\n/**\n * Request for AdServices token completed.\n */\nexport interface AdServicesTokenRequestCompleteEvent {\n /** Request for AdServices token completed. */\n event: \"adServicesTokenRequestComplete\"\n /** The AdServices token. */\n token: string\n}\n\n/**\n * Shimmer view (placeholder loading) started.\n */\nexport interface ShimmerViewStartEvent {\n /** Shimmer view (placeholder loading) started. */\n event: \"shimmerViewStart\"\n}\n\n/**\n * Shimmer view (placeholder loading) completed.\n */\nexport interface ShimmerViewCompleteEvent {\n /** Shimmer view (placeholder loading) completed. */\n event: \"shimmerViewComplete\"\n}\n\n/**\n * Redemption of a promotional code started.\n */\nexport interface RedemptionStartEvent {\n /** Redemption of a promotional code started. */\n event: \"redemptionStart\"\n}\n\n/**\n * Redemption of a promotional code completed.\n */\nexport interface RedemptionCompleteEvent {\n /** Redemption of a promotional code completed. */\n event: \"redemptionComplete\"\n}\n\n/**\n * Redemption of a promotional code failed.\n */\nexport interface RedemptionFailEvent {\n /** Redemption of a promotional code failed. */\n event: \"redemptionFail\"\n}\n\n/**\n * Data enrichment process started.\n */\nexport interface EnrichmentStartEvent {\n /** Data enrichment process started. */\n event: \"enrichmentStart\"\n}\n\n/**\n * Data enrichment process completed.\n */\nexport interface EnrichmentCompleteEvent {\n /** Data enrichment process completed. */\n event: \"enrichmentComplete\"\n /** Enriched user data, if any. */\n userEnrichment?: Record<string, any>\n /** Enriched device data, if any. */\n deviceEnrichment?: Record<string, any>\n}\n\n/**\n * Data enrichment process failed.\n */\nexport interface EnrichmentFailEvent {\n /** Data enrichment process failed. */\n event: \"enrichmentFail\"\n}\n\n/**\n * An unknown or uncategorized event occurred.\n */\nexport interface UnknownEvent {\n /** An unknown or uncategorized event occurred. */\n event: \"unknown\"\n}\n\n/**\n * Device attributes were updated.\n */\nexport interface DeviceAttributesEvent {\n /** Device attributes were updated. */\n event: \"deviceAttributes\"\n /** The updated device attributes. */\n attributes: Record<string, any>\n}\n\n/**\n * The user's subscription status changed.\n */\nexport interface SubscriptionStatusDidChangeEvent {\n /** The user's subscription status changed. */\n event: \"subscriptionStatusDidChange\"\n /**\n * The new subscription status.\n * See {@link SubscriptionStatus}.\n */\n subscriptionStatus: SubscriptionStatus\n}\n\n/**\n * The application was closed.\n */\nexport interface AppCloseEvent {\n /** The application was closed. */\n event: \"appClose\"\n}\n\n/**\n * A deep link was opened by the application, potentially via Superwall.\n */\nexport interface DeepLinkEvent {\n /** A deep link was opened by the application, potentially via Superwall. */\n event: \"deepLink\"\n /** The URL of the deep link. */\n url: string\n}\n\n/**\n * A trigger was fired based on an event or placement.\n */\nexport interface TriggerFireEvent {\n /** A trigger was fired based on an event or placement. */\n event: \"triggerFire\"\n /** The name of the event or placement that caused the trigger to fire. */\n placementName: string\n /**\n * The result of the trigger evaluation, determining what action Superwall will take.\n * See {@link TriggerResult}.\n */\n result: TriggerResult\n}\n\n/**\n * A paywall was opened.\n */\nexport interface PaywallOpenEvent {\n /** A paywall was opened. */\n event: \"paywallOpen\"\n /**\n * Information about the paywall that was opened.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * A paywall was closed.\n */\nexport interface PaywallCloseEvent {\n /** A paywall was closed. */\n event: \"paywallClose\"\n /**\n * Information about the paywall that was closed.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * The user explicitly declined a paywall.\n */\nexport interface PaywallDeclineEvent {\n /** The user explicitly declined a paywall. */\n event: \"paywallDecline\"\n /**\n * Information about the paywall that was declined.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * A transaction (purchase, restore) was initiated.\n */\nexport interface TransactionStartEvent {\n /** A transaction (purchase, restore) was initiated. */\n event: \"transactionStart\"\n /**\n * Identifier of the product involved in the transaction.\n * See {@link TransactionProductIdentifier}.\n */\n product: TransactionProductIdentifier\n /**\n * Information about the paywall from which the transaction was initiated.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * A transaction failed.\n */\nexport interface TransactionFailEvent {\n /** A transaction failed. */\n event: \"transactionFail\"\n /** The error message from the transaction failure. */\n error: string\n /**\n * Information about the paywall associated with the failed transaction.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * A transaction was abandoned by the user.\n */\nexport interface TransactionAbandonEvent {\n /** A transaction was abandoned by the user. */\n event: \"transactionAbandon\"\n /**\n * Identifier of the product involved in the abandoned transaction.\n * See {@link TransactionProductIdentifier}.\n */\n product: TransactionProductIdentifier\n /**\n * Information about the paywall associated with the abandoned transaction.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * A transaction was successfully completed.\n */\nexport interface TransactionCompleteEvent {\n /** A transaction was successfully completed. */\n event: \"transactionComplete\"\n /**\n * Detailed information about the store transaction, if available.\n * See {@link StoreTransaction}.\n */\n transaction?: StoreTransaction\n /**\n * Identifier of the product involved in the completed transaction.\n * See {@link TransactionProductIdentifier}.\n */\n product: TransactionProductIdentifier\n /** The type of the transaction (e.g., \"purchase\", \"restore\"). */\n type: string\n /**\n * Information about the paywall associated with the completed transaction.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * A new subscription was started.\n */\nexport interface SubscriptionStartEvent {\n /** A new subscription was started. */\n event: \"subscriptionStart\"\n /**\n * Identifier of the product for which the subscription started.\n * See {@link TransactionProductIdentifier}.\n */\n product: TransactionProductIdentifier\n /**\n * Information about the paywall associated with the subscription start.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * A free trial was started.\n */\nexport interface FreeTrialStartEvent {\n /** A free trial was started. */\n event: \"freeTrialStart\"\n /**\n * Identifier of the product for which the free trial started.\n * See {@link TransactionProductIdentifier}.\n */\n product: TransactionProductIdentifier\n /**\n * Information about the paywall associated with the free trial start.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * A transaction was restored.\n */\nexport interface TransactionRestoreEvent {\n /** A transaction was restored. */\n event: \"transactionRestore\"\n /**\n * The type of restoration process.\n * See {@link RestoreType}.\n */\n restoreType: RestoreType\n /**\n * Information about the paywall associated with the restoration.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * A transaction timed out.\n */\nexport interface TransactionTimeoutEvent {\n /** A transaction timed out. */\n event: \"transactionTimeout\"\n /**\n * Information about the paywall associated with the timed-out transaction.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * User attributes were updated.\n */\nexport interface UserAttributesEvent {\n /** User attributes were updated. */\n event: \"userAttributes\"\n /** The updated user attributes. */\n attributes: Record<string, any>\n}\n\n/**\n * A non-recurring product was purchased.\n */\nexport interface NonRecurringProductPurchaseEvent {\n /** A non-recurring product was purchased. */\n event: \"nonRecurringProductPurchase\"\n /**\n * Identifier of the purchased non-recurring product.\n * See {@link TransactionProductIdentifier}.\n */\n product: TransactionProductIdentifier\n /**\n * Information about the paywall associated with the purchase.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * Loading of the paywall response from the server started.\n */\nexport interface PaywallResponseLoadStartEvent {\n /** Loading of the paywall response from the server started. */\n event: \"paywallResponseLoadStart\"\n /** The name of the event or placement that triggered this load. */\n triggeredEventName: string\n}\n\n/**\n * The paywall response was not found on the server.\n */\nexport interface PaywallResponseLoadNotFoundEvent {\n /** The paywall response was not found on the server. */\n event: \"paywallResponseLoadNotFound\"\n /** The name of the event or placement that triggered this load. */\n triggeredEventName: string\n}\n\n/**\n * Loading of the paywall response from the server failed.\n */\nexport interface PaywallResponseLoadFailEvent {\n /** Loading of the paywall response from the server failed. */\n event: \"paywallResponseLoadFail\"\n /** The name of the event or placement that triggered this load. */\n triggeredEventName: string\n}\n\n/**\n * Loading of the paywall response from the server completed successfully.\n */\nexport interface PaywallResponseLoadCompleteEvent {\n /** Loading of the paywall response from the server completed successfully. */\n event: \"paywallResponseLoadComplete\"\n /** The name of the event or placement that triggered this load. */\n triggeredEventName: string\n /**\n * Information about the loaded paywall.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * The web view started loading the paywall's content.\n */\nexport interface PaywallWebviewLoadStartEvent {\n /** The web view started loading the paywall's content. */\n event: \"paywallWebviewLoadStart\"\n /**\n * Information about the paywall whose web view is loading.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * The web view failed to load the paywall's content.\n */\nexport interface PaywallWebviewLoadFailEvent {\n /** The web view failed to load the paywall's content. */\n event: \"paywallWebviewLoadFail\"\n /**\n * Information about the paywall whose web view failed to load.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * The web view completed loading the paywall's content.\n */\nexport interface PaywallWebviewLoadCompleteEvent {\n /** The web view completed loading the paywall's content. */\n event: \"paywallWebviewLoadComplete\"\n /**\n * Information about the paywall whose web view completed loading.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * The web view timed out while loading the paywall's content.\n */\nexport interface PaywallWebviewLoadTimeoutEvent {\n /** The web view timed out while loading the paywall's content. */\n event: \"paywallWebviewLoadTimeout\"\n /**\n * Information about the paywall whose web view timed out.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * The web view used fallback content for the paywall due to a loading issue.\n */\nexport interface PaywallWebviewLoadFallbackEvent {\n /** The web view used fallback content for the paywall due to a loading issue. */\n event: \"paywallWebviewLoadFallback\"\n /**\n * Information about the paywall that used fallback content.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * Loading of products for the paywall started.\n */\nexport interface PaywallProductsLoadStartEvent {\n /** Loading of products for the paywall started. */\n event: \"paywallProductsLoadStart\"\n /** The name of the event or placement that triggered this load. */\n triggeredEventName: string\n /**\n * Information about the paywall for which products are loading.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * Loading of products for the paywall failed.\n */\nexport interface PaywallProductsLoadFailEvent {\n /** Loading of products for the paywall failed. */\n event: \"paywallProductsLoadFail\"\n /** The name of the event or placement that triggered this load. */\n triggeredEventName: string\n /**\n * Information about the paywall for which product loading failed.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * Loading of products for the paywall completed successfully.\n */\nexport interface PaywallProductsLoadCompleteEvent {\n /** Loading of products for the paywall completed successfully. */\n event: \"paywallProductsLoadComplete\"\n /** The name of the event or placement that triggered this load. */\n triggeredEventName: string\n /**\n * Information about the paywall for which products completed loading.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * Retrying the loading of products for the paywall.\n */\nexport interface PaywallProductsLoadRetryEvent {\n /** Retrying the loading of products for the paywall. */\n event: \"paywallProductsLoadRetry\"\n /** The name of the event or placement that triggered this load. */\n triggeredEventName: string\n /**\n * Information about the paywall for which product loading is being retried.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n /** The attempt number for this retry. */\n attempt: number\n}\n\n/**\n * A response to a survey was submitted by the user.\n */\nexport interface SurveyResponseEvent {\n /** A response to a survey was submitted by the user. */\n event: \"surveyResponse\"\n /**\n * The survey that was responded to.\n * See {@link Survey}.\n */\n survey: Survey\n /**\n * The option selected by the user in the survey.\n * See {@link SurveyOption}.\n */\n selectedOption: SurveyOption\n /** The custom response text entered by the user, if any. */\n customResponse?: string\n /**\n * Information about the paywall where the survey was presented.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * A request to present a paywall was made.\n */\nexport interface PaywallPresentationRequestEvent {\n /** A request to present a paywall was made. */\n event: \"paywallPresentationRequest\"\n /**\n * The status of the presentation request.\n * See {@link PaywallPresentationRequestStatus}.\n */\n status: PaywallPresentationRequestStatus\n /**\n * The reason for the status, if applicable (e.g., why a paywall was not presented).\n * See {@link PaywallPresentationRequestStatusReason}.\n */\n reason?: PaywallPresentationRequestStatusReason\n}\n\n/**\n * A custom placement (defined by the developer) was executed.\n */\nexport interface CustomPlacementEvent {\n /** A custom placement (defined by the developer) was executed. */\n event: \"customPlacement\"\n /** The name of the custom placement. */\n name: string\n /** Parameters associated with the custom placement. */\n params: Record<string, any>\n /**\n * Information about the paywall shown for this placement, if any.\n * See {@link PaywallInfo}.\n */\n paywallInfo?: PaywallInfo\n}\n\n/**\n * The paywall's web view content process was terminated.\n */\nexport interface PaywallWebviewProcessTerminatedEvent {\n /** The paywall's web view content process was terminated. */\n event: \"paywallWebviewProcessTerminated\"\n /**\n * Information about the paywall whose web view process was terminated.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * Products for the paywall are missing from the store.\n */\nexport interface PaywallProductsLoadMissingProductsEvent {\n /** Products for the paywall are missing from the store. */\n event: \"paywallProductsLoadMissingProducts\"\n /** The name of the event or placement that triggered this load. */\n triggeredEventName: string\n /**\n * Information about the paywall with missing products.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n /** The product identifiers that are missing. */\n identifiers: string[]\n}\n\n/**\n * A network response failed to decode.\n */\nexport interface NetworkDecodingFailEvent {\n /** A network response failed to decode. */\n event: \"networkDecodingFail\"\n}\n\n/**\n * The customer info did change.\n */\nexport interface CustomerInfoDidChangeEvent {\n /** The customer info did change. */\n event: \"customerInfoDidChange\"\n}\n\n/**\n * Integration attributes were set.\n */\nexport interface IntegrationAttributesEvent {\n /** Integration attributes were set. */\n event: \"integrationAttributes\"\n /** The integration attributes. */\n attributes: Record<string, any>\n}\n\n/**\n * A review was requested from the user.\n */\nexport interface ReviewRequestedEvent {\n /** A review was requested from the user. */\n event: \"reviewRequested\"\n /** The number of times a review has been requested. */\n count: number\n}\n\n/**\n * A permission was requested from a paywall.\n */\nexport interface PermissionRequestedEvent {\n /** A permission was requested from a paywall. */\n event: \"permissionRequested\"\n /** The name of the permission that was requested. */\n permissionName: string\n /** The identifier of the paywall that requested the permission. */\n paywallIdentifier: string\n}\n\n/**\n * A permission was granted after being requested from a paywall.\n */\nexport interface PermissionGrantedEvent {\n /** A permission was granted after being requested from a paywall. */\n event: \"permissionGranted\"\n /** The name of the permission that was granted. */\n permissionName: string\n /** The identifier of the paywall that requested the permission. */\n paywallIdentifier: string\n}\n\n/**\n * A permission was denied after being requested from a paywall.\n */\nexport interface PermissionDeniedEvent {\n /** A permission was denied after being requested from a paywall. */\n event: \"permissionDenied\"\n /** The name of the permission that was denied. */\n permissionName: string\n /** The identifier of the paywall that requested the permission. */\n paywallIdentifier: string\n}\n\n/**\n * Paywall preloading has started.\n */\nexport interface PaywallPreloadStartEvent {\n /** Paywall preloading has started. */\n event: \"paywallPreloadStart\"\n /** The number of paywalls being preloaded. */\n paywallCount: number\n}\n\n/**\n * Paywall preloading has completed.\n */\nexport interface PaywallPreloadCompleteEvent {\n /** Paywall preloading has completed. */\n event: \"paywallPreloadComplete\"\n /** The number of paywalls that were preloaded. */\n paywallCount: number\n}\n\n/**\n * The test mode modal was opened.\n */\nexport interface TestModeModalOpenEvent {\n /** The test mode modal was opened. */\n event: \"testModeModalOpen\"\n}\n\n/**\n * The test mode modal was closed.\n */\nexport interface TestModeModalCloseEvent {\n /** The test mode modal was closed. */\n event: \"testModeModalClose\"\n}\n\n/**\n * A Stripe checkout session started.\n */\nexport interface StripeCheckoutStartEvent {\n /** A Stripe checkout session started. */\n event: \"stripeCheckoutStart\"\n /** Information about the paywall associated with this checkout. */\n paywallInfo: PaywallInfo\n}\n\n/**\n * A Stripe checkout form was submitted.\n */\nexport interface StripeCheckoutSubmitEvent {\n /** A Stripe checkout form was submitted. */\n event: \"stripeCheckoutSubmit\"\n /** Information about the paywall associated with this checkout. */\n paywallInfo: PaywallInfo\n}\n\n/**\n * A Stripe checkout session completed.\n */\nexport interface StripeCheckoutCompleteEvent {\n /** A Stripe checkout session completed. */\n event: \"stripeCheckoutComplete\"\n /** Information about the paywall associated with this checkout. */\n paywallInfo: PaywallInfo\n}\n\n/**\n * A Stripe checkout session failed.\n */\nexport interface StripeCheckoutFailEvent {\n /** A Stripe checkout session failed. */\n event: \"stripeCheckoutFail\"\n /** Information about the paywall associated with this checkout. */\n paywallInfo: PaywallInfo\n}\n\n/**\n * Page-specific details for a multi-page paywall page view.\n */\nexport interface PageViewData {\n /** The unique identifier for the page node. */\n pageNodeId: string\n /** The zero-based index of the page in the paywall flow. */\n flowPosition: number\n /** The display name of the page. */\n pageName: string\n /** The unique identifier for the navigation node. */\n navigationNodeId: string\n /** The unique identifier for the previous page node, if any. */\n previousPageNodeId?: string\n /** The flow position of the previous page, if any. */\n previousFlowPosition?: number\n /**\n * How the user navigated to the page.\n * Possible values: `\"entry\"`, `\"forward\"`, `\"back\"`, `\"auto_transition\"`.\n */\n navigationType: string\n /** Time spent on the previous page in milliseconds, if any. */\n timeOnPreviousPageMs?: number\n}\n\n/**\n * The user navigated to a page in a multi-page paywall.\n */\nexport interface PaywallPageViewEvent {\n /** The user navigated to a page in a multi-page paywall. */\n event: \"paywallPageView\"\n /** Information about the paywall associated with this page view. */\n paywallInfo: PaywallInfo\n /** Details about the page that was navigated to. */\n data: PageViewData\n}\n\n/**\n * A union of all possible string literal values for the `event` property from all specific Superwall event types.\n * This type can be used when you need to refer to an event type name itself.\n */\nexport type SuperwallEventType =\n | FirstSeenEvent[\"event\"]\n | AppOpenEvent[\"event\"]\n | AppLaunchEvent[\"event\"]\n | IdentityAliasEvent[\"event\"]\n | AppInstallEvent[\"event\"]\n | SessionStartEvent[\"event\"]\n | ResetEvent[\"event\"]\n | ConfigRefreshEvent[\"event\"]\n | ConfigFailEvent[\"event\"]\n | ConfigAttributesEvent[\"event\"]\n | ConfirmAllAssignmentsEvent[\"event\"]\n | TouchesBeganEvent[\"event\"]\n | SurveyCloseEvent[\"event\"]\n | RestoreStartEvent[\"event\"]\n | RestoreCompleteEvent[\"event\"]\n | RestoreFailEvent[\"event\"]\n | AdServicesTokenRequestStartEvent[\"event\"]\n | AdServicesTokenRequestFailEvent[\"event\"]\n | AdServicesTokenRequestCompleteEvent[\"event\"]\n | ShimmerViewStartEvent[\"event\"]\n | ShimmerViewCompleteEvent[\"event\"]\n | RedemptionStartEvent[\"event\"]\n | RedemptionCompleteEvent[\"event\"]\n | RedemptionFailEvent[\"event\"]\n | EnrichmentStartEvent[\"event\"]\n | EnrichmentCompleteEvent[\"event\"]\n | EnrichmentFailEvent[\"event\"]\n | UnknownEvent[\"event\"]\n | DeviceAttributesEvent[\"event\"]\n | SubscriptionStatusDidChangeEvent[\"event\"]\n | AppCloseEvent[\"event\"]\n | DeepLinkEvent[\"event\"]\n | TriggerFireEvent[\"event\"]\n | PaywallOpenEvent[\"event\"]\n | PaywallCloseEvent[\"event\"]\n | PaywallDeclineEvent[\"event\"]\n | TransactionStartEvent[\"event\"]\n | TransactionFailEvent[\"event\"]\n | TransactionAbandonEvent[\"event\"]\n | TransactionCompleteEvent[\"event\"]\n | SubscriptionStartEvent[\"event\"]\n | FreeTrialStartEvent[\"event\"]\n | TransactionRestoreEvent[\"event\"]\n | TransactionTimeoutEvent[\"event\"]\n | UserAttributesEvent[\"event\"]\n | NonRecurringProductPurchaseEvent[\"event\"]\n | PaywallResponseLoadStartEvent[\"event\"]\n | PaywallResponseLoadNotFoundEvent[\"event\"]\n | PaywallResponseLoadFailEvent[\"event\"]\n | PaywallResponseLoadCompleteEvent[\"event\"]\n | PaywallWebviewLoadStartEvent[\"event\"]\n | PaywallWebviewLoadFailEvent[\"event\"]\n | PaywallWebviewLoadCompleteEvent[\"event\"]\n | PaywallWebviewLoadTimeoutEvent[\"event\"]\n | PaywallWebviewLoadFallbackEvent[\"event\"]\n | PaywallProductsLoadStartEvent[\"event\"]\n | PaywallProductsLoadFailEvent[\"event\"]\n | PaywallProductsLoadCompleteEvent[\"event\"]\n | PaywallProductsLoadRetryEvent[\"event\"]\n | SurveyResponseEvent[\"event\"]\n | PaywallPresentationRequestEvent[\"event\"]\n | CustomPlacementEvent[\"event\"]\n | PaywallWebviewProcessTerminatedEvent[\"event\"]\n | PaywallProductsLoadMissingProductsEvent[\"event\"]\n | NetworkDecodingFailEvent[\"event\"]\n | CustomerInfoDidChangeEvent[\"event\"]\n | IntegrationAttributesEvent[\"event\"]\n | ReviewRequestedEvent[\"event\"]\n | PermissionRequestedEvent[\"event\"]\n | PermissionGrantedEvent[\"event\"]\n | PermissionDeniedEvent[\"event\"]\n | PaywallPreloadStartEvent[\"event\"]\n | PaywallPreloadCompleteEvent[\"event\"]\n | TestModeModalOpenEvent[\"event\"]\n | TestModeModalCloseEvent[\"event\"]\n | StripeCheckoutStartEvent[\"event\"]\n | StripeCheckoutSubmitEvent[\"event\"]\n | StripeCheckoutCompleteEvent[\"event\"]\n | StripeCheckoutFailEvent[\"event\"]\n | PaywallPageViewEvent[\"event\"]\n\n/**\n * Represents a Superwall event that can be tracked by the SDK.\n * This is a discriminated union type where the `event` property determines the specific event and its associated payload.\n * These events provide insights into user behavior, SDK operations, and paywall interactions.\n */\nexport type SuperwallEvent =\n | FirstSeenEvent\n | AppOpenEvent\n | AppLaunchEvent\n | IdentityAliasEvent\n | AppInstallEvent\n | SessionStartEvent\n | ResetEvent\n | ConfigRefreshEvent\n | ConfigFailEvent\n | ConfigAttributesEvent\n | ConfirmAllAssignmentsEvent\n | TouchesBeganEvent\n | SurveyCloseEvent\n | RestoreStartEvent\n | RestoreCompleteEvent\n | RestoreFailEvent\n | AdServicesTokenRequestStartEvent\n | AdServicesTokenRequestFailEvent\n | AdServicesTokenRequestCompleteEvent\n | ShimmerViewStartEvent\n | ShimmerViewCompleteEvent\n | RedemptionStartEvent\n | RedemptionCompleteEvent\n | RedemptionFailEvent\n | EnrichmentStartEvent\n | EnrichmentCompleteEvent\n | EnrichmentFailEvent\n | UnknownEvent\n | DeviceAttributesEvent\n | SubscriptionStatusDidChangeEvent\n | AppCloseEvent\n | DeepLinkEvent\n | TriggerFireEvent\n | PaywallOpenEvent\n | PaywallCloseEvent\n | PaywallDeclineEvent\n | TransactionStartEvent\n | TransactionFailEvent\n | TransactionAbandonEvent\n | TransactionCompleteEvent\n | SubscriptionStartEvent\n | FreeTrialStartEvent\n | TransactionRestoreEvent\n | TransactionTimeoutEvent\n | UserAttributesEvent\n | NonRecurringProductPurchaseEvent\n | PaywallResponseLoadStartEvent\n | PaywallResponseLoadNotFoundEvent\n | PaywallResponseLoadFailEvent\n | PaywallResponseLoadCompleteEvent\n | PaywallWebviewLoadStartEvent\n | PaywallWebviewLoadFailEvent\n | PaywallWebviewLoadCompleteEvent\n | PaywallWebviewLoadTimeoutEvent\n | PaywallWebviewLoadFallbackEvent\n | PaywallProductsLoadStartEvent\n | PaywallProductsLoadFailEvent\n | PaywallProductsLoadCompleteEvent\n | PaywallProductsLoadRetryEvent\n | SurveyResponseEvent\n | PaywallPresentationRequestEvent\n | CustomPlacementEvent\n | PaywallWebviewProcessTerminatedEvent\n | PaywallProductsLoadMissingProductsEvent\n | NetworkDecodingFailEvent\n | CustomerInfoDidChangeEvent\n | IntegrationAttributesEvent\n | ReviewRequestedEvent\n | PermissionRequestedEvent\n | PermissionGrantedEvent\n | PermissionDeniedEvent\n | PaywallPreloadStartEvent\n | PaywallPreloadCompleteEvent\n | TestModeModalOpenEvent\n | TestModeModalCloseEvent\n | StripeCheckoutStartEvent\n | StripeCheckoutSubmitEvent\n | StripeCheckoutCompleteEvent\n | StripeCheckoutFailEvent\n | PaywallPageViewEvent\n\n/**\n * Contains information about a Superwall event, including the specific {@link SuperwallEvent}\n * that occurred and any associated parameters. This structure is used by the `onSuperwallEvent` callback\n * in {@link SuperwallEventCallbacks} and the `handleSuperwallEvent` in {@link SuperwallExpoModuleEvents}.\n */\nexport interface SuperwallEventInfo {\n /** The specific Superwall event that occurred. See {@link SuperwallEvent}. */\n event: SuperwallEvent\n /**\n * Additional parameters associated with the event. The structure of these parameters\n * depends on the specific event type and often mirrors the properties defined within\n * the {@link SuperwallEvent} union members.\n */\n params: Record<string, any>\n}\n\n/**\n * Defines the verbosity level for logging within the Superwall SDK.\n * - `debug`: Outputs detailed debugging information, useful for development and troubleshooting.\n * - `info`: Outputs general information about SDK activity and state changes.\n * - `warn`: Outputs warnings about potential issues or deprecated usage.\n * - `error`: Outputs error messages for issues encountered by the SDK.\n * - `none`: Disables all logging from the SDK.\n */\nexport type LogLevel = \"debug\" | \"info\" | \"warn\" | \"error\" | \"none\"\n\n/**\n * Defines the scope of logging within the Superwall SDK, allowing for targeted logging of specific SDK components or features.\n * Using these scopes can help narrow down logs to relevant areas when debugging.\n *\n * Possible values include:\n * - `localizationManager`: Logs related to localization and language settings.\n * - `bounceButton`: Logs related to the animated bounce button feature.\n * - `coreData`: Logs related to internal data storage (native specific).\n * - `configManager`: Logs related to fetching and managing Superwall configurations.\n * - `identityManager`: Logs related to user identification and session management.\n * - `debugManager`: Logs related to the Superwall debugger.\n * - `debugViewController`: Logs related to the debugger's view controller (native specific).\n * - `localizationViewController`: Logs related to localization view controllers (native specific).\n * - `gameControllerManager`: Logs related to game controller interactions (native specific).\n * - `device`: Logs related to device information and properties.\n * - `network`: Logs related to network requests made by the SDK.\n * - `paywallEvents`: Logs related to events occurring on the paywall itself.\n * - `productsManager`: Logs related to fetching and managing product information from app stores.\n * - `storeKitManager`: Logs related to StoreKit interactions (iOS specific).\n * - `placements`: Logs related to placements and their evaluation.\n * - `receipts`: Logs related to App Store receipt validation and processing.\n * - `superwallCore`: Logs related to the core functionalities of the Superwall SDK.\n * - `paywallPresentation`: Logs related to the presentation logic of paywalls.\n * - `paywallTransactions`: Logs related to transactions initiated from paywalls.\n * - `paywallViewController`: Logs related to the paywall view controller (native specific).\n * - `cache`: Logs related to caching mechanisms within the SDK.\n * - `all`: Enables logging for all scopes.\n */\nexport type LogScope =\n | \"localizationManager\"\n | \"bounceButton\"\n | \"coreData\"\n | \"configManager\"\n | \"identityManager\"\n | \"debugManager\"\n | \"debugViewController\"\n | \"localizationViewController\"\n | \"gameControllerManager\"\n | \"device\"\n | \"network\"\n | \"paywallEvents\"\n | \"productsManager\"\n | \"storeKitManager\"\n | \"placements\"\n | \"receipts\"\n | \"superwallCore\"\n | \"paywallPresentation\"\n | \"paywallTransactions\"\n | \"paywallViewController\"\n | \"cache\"\n | \"all\"\n\nexport type OnPurchaseParamsIOS = {\n productId: string\n platform: \"ios\"\n /**\n * The store that backs the product being purchased. See {@link ProductStore}.\n * When the value is `\"CUSTOM\"`, the product is not backed by StoreKit and your\n * purchase handler must implement the purchase itself (e.g., calling your backend).\n * May be `undefined` if the product cannot be matched against the most recently\n * presented paywall (e.g., during background flows).\n */\n store?: ProductStore\n}\n\nexport type OnPurchaseParamsAndroid = {\n productId: string\n platform: \"android\"\n basePlanId: string\n offerId?: string\n}\n\nexport type OnPurchaseParams = OnPurchaseParamsIOS | OnPurchaseParamsAndroid\n\n/**\n * Represents the result of a purchase restoration attempt.\n * - `restored`: The restoration completed successfully.\n * - `failed`: The restoration failed, with an accompanying error message.\n */\nexport type RestorationResultResponse =\n | { result: \"restored\" }\n | { result: \"failed\"; errorMessage: string | null }\n\n/**\n * Defines the events emitted by the native Superwall Expo module that can be listened to.\n * These events provide a way to react to various SDK activities and user interactions.\n * Use `SuperwallExpoModule.addListener(eventName, callback)` to subscribe.\n */\nexport type SuperwallExpoModuleEvents = {\n /**\n * Emitted when a paywall is presented to the user.\n * @param params - Event parameters.\n * @param params.paywallInfoJson - JSON representation of {@link PaywallInfo} for the presented paywall.\n * @param params.handlerId - Identifier for the handler that triggered this presentation (e.g., from `usePlacement`).\n */\n onPaywallPresent: (params: { paywallInfoJson: PaywallInfo; handlerId: string }) => void\n /**\n * Emitted when a paywall is dismissed by the user or programmatically.\n * @param params - Event parameters.\n * @param params.paywallInfoJson - JSON representation of {@link PaywallInfo} for the dismissed paywall.\n * @param params.result - The result of the paywall interaction. See {@link PaywallResult}.\n * @param params.handlerId - Identifier for the handler associated with this paywall.\n */\n onPaywallDismiss: (params: {\n paywallInfoJson: PaywallInfo\n result: PaywallResult\n handlerId: string\n }) => void\n /**\n * Emitted when an error occurs during the paywall presentation process.\n * @param params - Event parameters.\n * @param params.errorString - A string describing the error.\n * @param params.handlerId - Identifier for the handler associated with this error, if applicable.\n */\n onPaywallError: (params: { errorString: string; handlerId: string }) => void\n /**\n * Emitted when a paywall presentation is skipped (e.g., user is in a holdout group, no rule match).\n * @param params - Event parameters.\n * @param params.skippedReason - The reason why the paywall was skipped. See {@link PaywallSkippedReason}.\n * @param params.handlerId - Identifier for the handler associated with this skipped paywall.\n */\n onPaywallSkip: (params: { skippedReason: PaywallSkippedReason; handlerId: string }) => void\n\n // --- SuperwallDelegateBridge Events ---\n /**\n * Emitted when the user's subscription status changes.\n * @param params - Event parameters.\n * @param params.from - The previous subscription status. See {@link SubscriptionStatus}.\n * @param params.to - The new subscription status. See {@link SubscriptionStatus}.\n */\n subscriptionStatusDidChange: (params: {\n from: SubscriptionStatus\n to: SubscriptionStatus\n }) => void\n /**\n * Emitted for various internal Superwall events, providing a detailed stream of SDK activity.\n * @param params - Event parameters.\n * @param params.eventInfo - Detailed information about the Superwall event. See {@link SuperwallEventInfo}.\n */\n handleSuperwallEvent: (params: { eventInfo: SuperwallEventInfo }) => void\n /**\n * Emitted when a custom action is invoked from a paywall's JavaScript.\n * @param params - Event parameters.\n * @param params.name - The name of the custom action that was invoked.\n */\n handleCustomPaywallAction: (params: { name: string }) => void\n /**\n * Emitted just before a paywall is dismissed.\n * @param params - Event parameters.\n * @param params.info - Information about the paywall that will be dismissed. See {@link PaywallInfo}.\n */\n willDismissPaywall: (params: { info: PaywallInfo }) => void\n /**\n * Emitted just before a paywall is presented.\n * @param params - Event parameters.\n * @param params.info - Information about the paywall that will be presented. See {@link PaywallInfo}.\n */\n willPresentPaywall: (params: { info: PaywallInfo }) => void\n /**\n * Emitted after a paywall has been dismissed.\n * @param params - Event parameters.\n * @param params.info - Information about the paywall that was dismissed. See {@link PaywallInfo}.\n */\n didDismissPaywall: (params: { info: PaywallInfo }) => void\n /**\n * Emitted after a paywall has been presented.\n * @param params - Event parameters.\n * @param params.info - Information about the paywall that was presented. See {@link PaywallInfo}.\n */\n didPresentPaywall: (params: { info: PaywallInfo }) => void\n /**\n * Emitted when the paywall intends to open an external URL.\n * @param params - Event parameters.\n * @param params.url - The URL that the paywall intends to open.\n */\n paywallWillOpenURL: (params: { url: string }) => void\n /**\n * Emitted when the paywall intends to open a deep link.\n * @param params - Event parameters.\n * @param params.url - The deep link URL that the paywall intends to open.\n */\n paywallWillOpenDeepLink: (params: { url: string }) => void\n /**\n * Emitted for logging messages generated by the native SDK.\n * @param params - Log parameters.\n * @param params.level - The log level. See {@link LogLevel}.\n * @param params.scope - The scope of the log. See {@link LogScope}.\n * @param params.message - The log message (can be null).\n * @param params.info - Additional structured information for the log (can be null).\n * @param params.error - Error message if the log represents an error (can be null).\n */\n handleLog: (params: {\n level: LogLevel\n scope: LogScope\n message: string | null\n info: Record<string, any> | null\n error: string | null\n }) => void\n /**\n * Emitted before the SDK attempts to redeem a promotional link or code.\n * @param params - Event parameters. For iOS, this is typically an empty dictionary.\n */\n willRedeemLink: (params: Record<string, never> | null) => void\n /**\n * Emitted after the SDK has attempted to redeem a promotional link or code.\n * @param params - The result of the redemption attempt. See {@link RedemptionResult}.\n */\n didRedeemLink: (params: RedemptionResult) => void\n\n // Purchase Events\n /**\n * Emitted when a purchase is initiated by the user from a paywall.\n * @param params - Parameters related to the purchase.\n * - For iOS: `{ productId: string; platform: \"ios\" }`\n * - For Android: `{ productId: string; platform: \"android\"; basePlanId: string; offerId?: string }`\n * (offerId is optional for Android).\n */\n onPurchase: (params: OnPurchaseParams) => void\n /**\n * Emitted when a purchase restoration process is initiated by the user.\n * @param params - Event parameters. For iOS, this is `null`.\n */\n onPurchaseRestore: () => void\n /**\n * Emitted when the back button is pressed while a paywall is displayed (Android only).\n * This is only triggered when `rerouteBackButton` is enabled in the paywall settings.\n * @param params - Event parameters.\n * @param params.paywallInfo - Information about the paywall that is currently displayed. See {@link PaywallInfo}.\n * @platform Android\n */\n onBackPressed: (params: { paywallInfo: PaywallInfo }) => void\n /**\n * Emitted when a custom callback is invoked from a paywall.\n * The handler should process the callback and return a result via `didHandleCustomCallback`.\n * @param params - Event parameters.\n * @param params.callbackId - Unique identifier for this callback invocation, used to return the result.\n * @param params.name - The name of the custom callback.\n * @param params.variables - Optional variables passed from the paywall.\n * @param params.handlerId - Identifier for the handler associated with this callback.\n */\n onCustomCallback: (params: {\n callbackId: string\n name: string\n variables?: Record<string, any>\n handlerId: string\n }) => void\n}\n"]}
1
+ {"version":3,"file":"SuperwallExpoModule.types.js","sourceRoot":"","sources":["../../src/SuperwallExpoModule.types.ts"],"names":[],"mappings":"AAAA,mCAAmC","sourcesContent":["// src/SuperwallExpoModule.types.ts\n\n/**\n * @file Defines the core data types, interfaces, and event structures used by the Superwall Expo SDK.\n * These types are crucial for understanding the data flow and interactions with the native Superwall modules.\n */\n\n/**\n * Defines the type of an experiment variant, indicating whether the user sees a paywall or is in a holdout group.\n * - `TREATMENT`: The user is assigned to a treatment group and will be presented with a paywall.\n * - `HOLDOUT`: The user is assigned to a holdout group and will not be presented with a paywall for this experiment.\n */\nexport type VariantType = \"TREATMENT\" | \"HOLDOUT\"\n\n/**\n * Represents an experiment variant, detailing its identifier, type, and associated paywall.\n */\nexport interface Variant {\n /**\n * The unique identifier for this specific variant of an experiment.\n */\n id: string\n /**\n * The type of the variant, determining the user's experience (e.g., seeing a paywall or being in a holdout).\n * See {@link VariantType}.\n */\n type: VariantType\n /**\n * The identifier of the paywall associated with this variant.\n * This will be an empty string if no paywall is linked (e.g., for `HOLDOUT` variants).\n */\n paywallId: string\n}\n\n/**\n * Represents a Superwall experiment, including its ID, group ID, and the variant assigned to the user.\n */\nexport interface Experiment {\n /**\n * The unique identifier for the experiment.\n */\n id: string\n /**\n * The identifier of the group to which this experiment belongs.\n * Experiments are often grouped for organizational or analytical purposes.\n */\n groupId: string\n /**\n * The specific variant of the experiment that the current user has been assigned to.\n * See {@link Variant}.\n */\n variant: Variant\n}\n\n/**\n * Defines the type of an entitlement, typically indicating a level of service or access.\n * - `SERVICE_LEVEL`: Represents an entitlement that grants a certain service level.\n */\nexport type EntitlementType = \"SERVICE_LEVEL\" // Currently, only \"SERVICE_LEVEL\" is used.\n\n/**\n * Represents a user entitlement, signifying a feature or content piece the user has access to.\n */\nexport interface Entitlement {\n /**\n * The unique identifier for the entitlement.\n */\n id: string\n /**\n * The type of the entitlement. See {@link EntitlementType}.\n */\n type: EntitlementType\n}\n\n/**\n * Third-party integration providers supported by Superwall.\n * Use these values with `setIntegrationAttributes()` to link user IDs from\n * attribution and analytics platforms.\n */\nexport type IntegrationAttribute =\n | \"adjustId\"\n | \"amplitudeDeviceId\"\n | \"amplitudeUserId\"\n | \"appsflyerId\"\n | \"brazeAliasName\"\n | \"brazeAliasLabel\"\n | \"onesignalId\"\n | \"fbAnonId\"\n | \"firebaseAppInstanceId\"\n | \"iterableUserId\"\n | \"iterableCampaignId\"\n | \"iterableTemplateId\"\n | \"mixpanelDistinctId\"\n | \"mparticleId\"\n | \"clevertapId\"\n | \"airshipChannelId\"\n | \"kochavaDeviceId\"\n | \"tenjinId\"\n | \"posthogUserId\"\n | \"customerioId\"\n | \"appstackId\"\n | \"singularDeviceId\"\n\n/**\n * Object with optional keys for third-party integration provider IDs.\n * Used with `setIntegrationAttributes()` to link attribution and analytics platforms.\n *\n * Available keys: adjustId, amplitudeDeviceId, amplitudeUserId, appsflyerId,\n * brazeAliasName, brazeAliasLabel, onesignalId, fbAnonId, firebaseAppInstanceId,\n * iterableUserId, iterableCampaignId, iterableTemplateId, mixpanelDistinctId,\n * mparticleId, clevertapId, airshipChannelId, kochavaDeviceId, tenjinId,\n * posthogUserId, customerioId, appstackId\n *\n * @example\n * ```typescript\n * setIntegrationAttributes({\n * adjustId: \"adjust_123\",\n * amplitudeUserId: \"user_456\",\n * airshipChannelId: \"channel_789\"\n * })\n * ```\n */\nexport type IntegrationAttributes = {\n [K in IntegrationAttribute]?: string\n}\n\n/**\n * Contains information about the user's entitlements, separated into active and inactive.\n * This is typically fetched from Superwall's servers to determine what content or features\n * the user has access to.\n */\nexport interface EntitlementsInfo {\n /**\n * Array of all entitlements known for the user.\n * Present when the native bridge exposes the full entitlement set.\n */\n all?: Entitlement[]\n /**\n * Array of entitlements that are currently active for the user.\n * See {@link Entitlement}.\n */\n active: Entitlement[]\n /**\n * Array of entitlements that are not currently active for the user.\n * See {@link Entitlement}.\n */\n inactive: Entitlement[]\n}\n\n/**\n * Describes the reason why a paywall presentation was skipped for the user.\n * This can happen due to various conditions like being in a holdout group,\n * not matching audience rules, or if the specified placement doesn't exist.\n */\nexport type PaywallSkippedReason =\n | {\n /**\n * The user was assigned to a holdout group within an experiment, so the paywall was intentionally skipped.\n */\n type: \"Holdout\"\n /**\n * Detailed information about the experiment that led to this holdout.\n * See {@link Experiment}.\n */\n experiment: Experiment\n }\n | {\n /**\n * The user did not match any of the audience rules defined for the campaign or trigger.\n */\n type: \"NoAudienceMatch\"\n }\n | {\n /**\n * The placement ID specified for the paywall presentation was not found in the Superwall dashboard configuration.\n */\n type: \"PlacementNotFound\"\n }\n\n/**\n * Represents the outcome of a user's interaction with a paywall.\n * This includes scenarios like purchasing a product, declining the paywall, or restoring purchases.\n */\nexport type PaywallResult =\n | {\n /**\n * The user successfully purchased a product through the paywall.\n */\n type: \"purchased\"\n /**\n * The identifier of the product that was purchased.\n */\n productId: string\n }\n | {\n /**\n * The user explicitly declined or closed the paywall without making a purchase.\n */\n type: \"declined\"\n }\n | {\n /**\n * The user successfully restored their previous purchases through the paywall.\n */\n type: \"restored\"\n }\n\n/**\n * Represents the subscription status of the user.\n * It indicates whether the user is unknown, inactive, or active with specific entitlements.\n */\nexport type SubscriptionStatus =\n | {\n /**\n * The subscription status has not yet been determined or is unavailable.\n * This can be an initial state before the SDK fetches the status.\n */\n status: \"UNKNOWN\"\n }\n | {\n /**\n * The user does not have an active subscription.\n * They are not currently entitled to any subscription-based features.\n */\n status: \"INACTIVE\"\n }\n | {\n /**\n * The user has an active subscription.\n */\n status: \"ACTIVE\"\n /**\n * A list of entitlements the user has access to due to their active subscription.\n * This array is only present when the status is \"ACTIVE\".\n * See {@link Entitlement}.\n */\n entitlements: Entitlement[]\n }\n\n/**\n * Specifies the reason why a paywall was closed.\n * This helps in understanding the flow of paywall presentations and user interactions.\n * - `systemLogic`: Closed automatically by the SDK due to internal logic (e.g., another paywall is about to open).\n * - `forNextPaywall`: Closed because another paywall is scheduled to be presented immediately after.\n * - `webViewFailedToLoad`: Closed because the web view component failed to load the paywall content.\n * - `manualClose`: Closed due to a direct user action (e.g., tapping a close button on the paywall).\n * - `none`: No specific reason, or the reason is unknown.\n */\nexport type PaywallCloseReason =\n | \"systemLogic\"\n | \"forNextPaywall\"\n | \"webViewFailedToLoad\"\n | \"manualClose\"\n | \"none\"\n\n/**\n * Defines the feature gating behavior for a paywall or feature.\n * - `gated`: The feature or content is gated and requires a specific condition (e.g., active subscription) to be met for access.\n * - `nonGated`: The feature or content is not gated and is available to all users, regardless of subscription status.\n */\nexport type FeatureGatingBehavior = \"gated\" | \"nonGated\"\n\n/**\n * Specifies the conditions under which a survey should be presented to the user.\n * - `ON_MANUAL_CLOSE`: Present the survey when the user manually closes the paywall.\n * - `ON_PURCHASE`: Present the survey after the user completes a purchase.\n */\nexport type SurveyShowCondition = \"ON_MANUAL_CLOSE\" | \"ON_PURCHASE\"\n\n/**\n * Represents a single option within a survey.\n */\nexport interface SurveyOption {\n /**\n * The unique identifier for this survey option.\n */\n id: string\n /**\n * The text displayed to the user for this option.\n */\n title: string\n}\n\n/**\n * Represents a survey that can be presented to the user, typically after a paywall interaction.\n */\nexport interface Survey {\n /**\n * The unique identifier for the survey.\n */\n id: string\n /**\n * A key used for assigning this survey to a user, often for A/B testing or specific targeting.\n */\n assignmentKey: string\n /**\n * The title of the survey, displayed to the user.\n */\n title: string\n /**\n * The main message or question of the survey.\n */\n message: string\n /**\n * An array of options available for the user to choose from in the survey.\n * See {@link SurveyOption}.\n */\n options: SurveyOption[]\n /**\n * The condition that triggers the presentation of this survey.\n * See {@link SurveyShowCondition}.\n */\n presentationCondition: SurveyShowCondition\n /**\n * The probability (ranging from 0.0 to 1.0) that this survey will be presented if its condition is met.\n */\n presentationProbability: number\n /**\n * If true, an \"Other\" option with a free-text input field will be included in the survey.\n */\n includeOtherOption: boolean\n /**\n * If true, a close button or option will be available on the survey, allowing the user to dismiss it.\n */\n includeCloseOption: boolean\n}\n\n/**\n * Defines the types of local notifications that Superwall can schedule.\n * - `trialStarted`: A notification to inform the user that their free trial has started.\n */\nexport type LocalNotificationType = \"trialStarted\" // Currently, only \"trialStarted\" is used.\n\n/**\n * Represents a local notification that can be scheduled by the Superwall SDK.\n */\nexport interface LocalNotification {\n /**\n * The type of the local notification. See {@link LocalNotificationType}.\n */\n type: LocalNotificationType\n /**\n * The title of the notification.\n */\n title: string\n /**\n * The main body text of the notification.\n */\n body: string\n /**\n * The delay in seconds before the notification is shown to the user, relative to the scheduling time.\n */\n delay: number\n /**\n * An optional subtitle for the notification.\n */\n subtitle?: string\n}\n\n/**\n * Represents a request for a computed property that the Superwall SDK needs to evaluate.\n * Computed properties are dynamic values based on user attributes or other data.\n */\nexport interface ComputedPropertyRequest {\n /**\n * The type or name of the computed property being requested.\n */\n type: string\n /**\n * The name of the placement associated with this computed property request, if applicable.\n */\n placementName: string\n}\n\n/**\n * The store that backs a {@link Product}.\n * - `APP_STORE`: Apple App Store product (iOS).\n * - `PLAY_STORE`: Google Play Store product (Android).\n * - `STRIPE`: Stripe-managed product.\n * - `PADDLE`: Paddle-managed product.\n * - `SUPERWALL`: Manually granted entitlement from the Superwall dashboard.\n * - `CUSTOM`: A custom product purchased through a `PurchaseController` outside of any\n * storefront. When you receive a custom product in `onPurchase`, you must implement the\n * purchase yourself (e.g., calling your backend) instead of going through StoreKit / Billing.\n * - `OTHER`: An unknown or unsupported store.\n */\nexport type ProductStore =\n | \"APP_STORE\"\n | \"PLAY_STORE\"\n | \"STRIPE\"\n | \"PADDLE\"\n | \"SUPERWALL\"\n | \"CUSTOM\"\n | \"OTHER\"\n\n/**\n * The Apple App Store-specific data for a {@link Product}.\n */\nexport interface AppStoreProductIdentifier {\n /** The App Store product identifier. */\n id: string\n}\n\n/**\n * The Stripe-specific data for a {@link Product}.\n */\nexport interface StripeProductIdentifier {\n /** The Stripe price/product identifier. */\n id: string\n /** The number of trial days for this product, if any. */\n trialDays?: number\n}\n\n/**\n * The Paddle-specific data for a {@link Product}.\n */\nexport interface PaddleProductIdentifier {\n /** The Paddle product identifier. */\n id: string\n}\n\n/**\n * The custom-product data for a {@link Product}.\n * Custom products are purchased via your `PurchaseController` rather than through a storefront.\n */\nexport interface CustomStoreProductIdentifier {\n /** The custom product identifier (as configured on the Superwall dashboard). */\n id: string\n}\n\n/**\n * The offer type that applied to a {@link SubscriptionTransaction}.\n *\n * @platform Android\n */\nexport type SubscriptionOfferType =\n | \"trial\"\n | \"code\"\n | \"subscription\"\n | \"promotional\"\n | \"winback\"\n | \"revoked\"\n\n/**\n * A subscription transaction recorded in the customer's purchase history.\n *\n * @platform Android — currently only delivered by the Android SDK.\n */\nexport interface SubscriptionTransaction {\n /** The unique identifier for the transaction. */\n transactionId: string\n /** The product identifier of the subscription. */\n productId: string\n /** ISO-8601 timestamp of when the user was charged. */\n purchaseDate: string\n /** Whether the subscription is set to renew. */\n willRenew: boolean\n /** Whether the transaction has been revoked. */\n isRevoked: boolean\n /** Whether the subscription is in a billing grace period. */\n isInGracePeriod: boolean\n /** Whether the subscription is in a billing retry period. */\n isInBillingRetryPeriod: boolean\n /** Whether the subscription is currently active. */\n isActive: boolean\n /** ISO-8601 expiration date, or `null` if non-renewing. */\n expirationDate?: string | null\n /** Store the transaction came from (e.g. `\"PLAY_STORE\"`). */\n store: string\n /** Offer type, if any was applied. */\n offerType?: SubscriptionOfferType\n /** iOS-only — the subscription group identifier. */\n subscriptionGroupId?: string\n}\n\n/**\n * A non-subscription (one-time / consumable) transaction in the customer's purchase history.\n *\n * @platform Android — currently only delivered by the Android SDK.\n */\nexport interface NonSubscriptionTransaction {\n /** The unique identifier for the transaction. */\n transactionId: string\n /** The product identifier of the in-app purchase. */\n productId: string\n /** ISO-8601 timestamp of when the user was charged. */\n purchaseDate: string\n /** Whether the in-app purchase is consumable. */\n isConsumable: boolean\n /** Whether the transaction has been revoked. */\n isRevoked: boolean\n /** Store the transaction came from (e.g. `\"PLAY_STORE\"`). */\n store: string\n}\n\n/**\n * The latest subscription and entitlement state for the customer.\n * Snapshots are immutable and don't auto-update.\n *\n * @platform Android — currently only delivered by the Android SDK.\n */\nexport interface CustomerInfo {\n /** The user ID at the time the snapshot was taken. */\n userId: string\n /** All subscription transactions, ordered by purchase date ascending. */\n subscriptions: SubscriptionTransaction[]\n /** All non-subscription transactions, ordered by purchase date ascending. */\n nonSubscriptions: NonSubscriptionTransaction[]\n /** All entitlements available to the user. */\n entitlements: Entitlement[]\n}\n\n/**\n * Represents a product available for purchase on a paywall, as defined within {@link PaywallInfo}.\n * This provides a simplified view of a product, focusing on its ID, name, store, and granted entitlements.\n */\nexport interface Product {\n /**\n * The unique identifier of the product (e.g., from the App Store or Google Play).\n */\n id: string\n /**\n * The name of the product, if available.\n */\n name?: string\n /**\n * A list of entitlements that are granted to the user upon purchasing this product.\n * See {@link Entitlement}.\n */\n entitlements: Entitlement[]\n /**\n * The store that backs this product. See {@link ProductStore}.\n * Use this to detect `CUSTOM` products in `onPurchase` and route them to your own\n * purchase logic instead of StoreKit / Google Play Billing.\n *\n * @platform iOS — present on iOS 4.15.0+. May be absent on older Android SDK versions.\n */\n store?: ProductStore\n /**\n * App Store-specific product data, present when `store === \"APP_STORE\"`.\n * @platform iOS\n */\n appStoreProduct?: AppStoreProductIdentifier\n /**\n * Stripe-specific product data, present when `store === \"STRIPE\"`.\n * @platform iOS\n */\n stripeProduct?: StripeProductIdentifier\n /**\n * Paddle-specific product data, present when `store === \"PADDLE\"`.\n * @platform iOS\n */\n paddleProduct?: PaddleProductIdentifier\n /**\n * Custom-product data, present when `store === \"CUSTOM\"`.\n * @platform iOS\n */\n customProduct?: CustomStoreProductIdentifier\n}\n\n/**\n * Contains comprehensive information about a paywall, including its configuration, associated experiment,\n * products, loading times, and other metadata. This object is central to understanding paywall behavior.\n */\nexport interface PaywallInfo {\n /** The unique identifier of the paywall, as configured in the Superwall dashboard. */\n identifier: string\n /** The name of the paywall, as configured in the Superwall dashboard. */\n name: string\n /** The URL where the paywall's web content is hosted. */\n url: string\n /**\n * A unique identifier for this paywall presentation, used to correlate all events\n * within a single presentation lifecycle.\n */\n presentationId?: string\n /**\n * The experiment associated with this paywall presentation, if applicable.\n * See {@link Experiment}.\n */\n experiment?: Experiment\n /**\n * A list of products available for purchase on this paywall.\n * See {@link Product}.\n */\n products: Product[]\n /** A list of product identifiers (SKUs) available on this paywall. */\n productIds: string[]\n /**\n * The name of the event or placement that triggered the presentation of this paywall, if applicable.\n * Corresponds to `presentedByPlacementWithName` in the native Swift SDK.\n */\n presentedByEventWithName?: string\n /**\n * The identifier of the event or placement that triggered the presentation of this paywall, if applicable.\n * Corresponds to `presentedByPlacementWithId` in the native Swift SDK.\n */\n presentedByEventWithId?: string\n /**\n * The Unix timestamp (in seconds or milliseconds) of when the event triggering this paywall occurred, if applicable.\n * Corresponds to `presentedByPlacementAt` in the native Swift SDK.\n */\n presentedByEventAt?: number\n /**\n * The source that initiated the paywall presentation (e.g., \"implicit\", \"explicit\", \"getPaywall\").\n */\n presentedBy: string\n /**\n * The type of the source that led to the paywall presentation (e.g., \"Register\" for `Superwall.shared.register(event:)`, \"Track\" for `Superwall.shared.track(event:)`).\n */\n presentationSourceType?: string\n /** The Unix timestamp when the request to load the paywall configuration and rules (response) started. */\n responseLoadStartTime?: number\n /** The Unix timestamp when the paywall response successfully loaded. */\n responseLoadCompleteTime?: number\n /** The Unix timestamp if the paywall response failed to load. */\n responseLoadFailTime?: number\n /** The duration (typically in milliseconds) it took to load the paywall response. */\n responseLoadDuration?: number\n /** Indicates whether a free trial is available for any of the products on this paywall. */\n isFreeTrialAvailable: boolean\n /**\n * The feature gating behavior for this paywall.\n * See {@link FeatureGatingBehavior}.\n */\n featureGatingBehavior: FeatureGatingBehavior\n /**\n * The reason why the paywall was closed.\n * See {@link PaywallCloseReason}.\n */\n closeReason: PaywallCloseReason\n /** The Unix timestamp when the web view started loading the paywall's HTML content. */\n webViewLoadStartTime?: number\n /** The Unix timestamp when the web view successfully loaded the paywall's HTML content. */\n webViewLoadCompleteTime?: number\n /** The Unix timestamp if the web view failed to load the paywall's HTML content. */\n webViewLoadFailTime?: number\n /** The duration (typically in milliseconds) it took for the web view to load the paywall's content. */\n webViewLoadDuration?: number\n /** The Unix timestamp when the loading of product information (from App Store/Google Play) started. */\n productsLoadStartTime?: number\n /** The Unix timestamp when the product information successfully loaded. */\n productsLoadCompleteTime?: number\n /** The Unix timestamp if loading product information failed. */\n productsLoadFailTime?: number\n /** The duration (typically in milliseconds) it took to load the product information. */\n productsLoadDuration?: number\n /** The version of the `paywall.js` script used in the paywall, if available. */\n paywalljsVersion?: string\n /**\n * A list of computed property requests associated with this paywall presentation.\n * See {@link ComputedPropertyRequest}.\n */\n computedPropertyRequests: ComputedPropertyRequest[]\n /**\n * A list of surveys associated with this paywall that may be presented.\n * See {@link Survey}.\n */\n surveys: Survey[]\n /**\n * A list of local notifications that may be scheduled as a result of this paywall presentation.\n * See {@link LocalNotification}.\n */\n localNotifications: LocalNotification[]\n /**\n * The state of the paywall, updated on paywall dismiss.\n * Contains key-value pairs representing the paywall's current state.\n */\n state: Record<string, any>\n /**\n * A snapshot of the customer's subscription and entitlement state at the time\n * the paywall was presented.\n *\n * @platform Android — currently only populated by the Android SDK (2.7.12+).\n * Will be `undefined` on iOS.\n */\n customerInfo?: CustomerInfo\n}\n\n/**\n * Represents a custom callback invoked from a paywall.\n * Custom callbacks allow paywalls to communicate with the app to perform\n * operations like validation, data fetching, etc.\n */\nexport interface CustomCallback {\n /** The name of the callback as defined in the paywall. */\n name: string\n /** Optional variables passed from the paywall. */\n variables?: Record<string, any>\n}\n\n/**\n * The status of a custom callback result.\n * - `success`: The callback completed successfully.\n * - `failure`: The callback failed.\n */\nexport type CustomCallbackResultStatus = \"success\" | \"failure\"\n\n/**\n * The result to return from a custom callback handler.\n * Determines which branch (onSuccess/onFailure) executes in the paywall.\n */\nexport interface CustomCallbackResult {\n /** Whether the callback succeeded or failed. */\n status: CustomCallbackResultStatus\n /** Optional key-value pairs to return to the paywall. */\n data?: Record<string, any>\n}\n\n/**\n * Provides information about an error that occurred during a promotional code redemption attempt.\n */\nexport interface RedemptionErrorInfo {\n /**\n * A developer-readable message describing the error.\n */\n message: string\n}\n\n/**\n * Provides information about an expired promotional code during a redemption attempt.\n */\nexport interface RedemptionExpiredCodeInfo {\n /**\n * Indicates whether a new code was resent to the user (e.g., via email) if applicable.\n */\n resent: boolean\n /**\n * The obfuscated email address to which a new code was resent, if applicable.\n */\n obfuscatedEmail?: string\n}\n\n/**\n * Defines who owns the item or subscription obtained through a promotional code redemption.\n */\nexport type RedemptionOwnership =\n | {\n /**\n * Ownership of the redeemed item is tied to a specific application user ID.\n */\n type: \"APP_USER\"\n /**\n * The application user ID of the owner.\n */\n appUserId: string\n }\n | {\n /**\n * Ownership of the redeemed item is tied to a specific device ID.\n */\n type: \"DEVICE\"\n /**\n * The device ID of the owner.\n */\n deviceId: string\n }\n\n/**\n * Contains store-specific identifiers for a purchaser, relevant for tracking redemptions across different billing systems.\n */\nexport type RedemptionStoreIdentifiers =\n | {\n /**\n * The purchase or subscription is managed by Stripe.\n */\n store: \"STRIPE\"\n /**\n * The Stripe customer ID.\n */\n stripeCustomerId: string\n /**\n * The Stripe subscription IDs associated with the customer.\n */\n stripeSubscriptionIds: string[]\n }\n | {\n /**\n * The purchase or subscription is managed by Paddle.\n */\n store: \"PADDLE\"\n /**\n * The Paddle customer ID.\n */\n paddleCustomerId: string\n /**\n * The Paddle subscription IDs associated with the customer.\n */\n paddleSubscriptionIds: string[]\n }\n | {\n /**\n * The store is unknown or not explicitly handled by this type definition.\n */\n store: string // Allows for other store names not explicitly defined\n /**\n * Allows for additional properties specific to other or future store integrations.\n */\n [key: string]: any\n }\n\n/**\n * Information about the purchaser involved in a promotional code redemption.\n */\nexport interface RedemptionPurchaserInfo {\n /**\n * The application user ID of the purchaser.\n */\n appUserId: string\n /**\n * The email address of the purchaser, if available.\n */\n email?: string\n /**\n * Store-specific identifiers for the purchaser.\n * See {@link RedemptionStoreIdentifiers}.\n */\n storeIdentifiers: RedemptionStoreIdentifiers\n}\n\n/**\n * Represents a product involved in a redemption transaction with comprehensive pricing and localization information.\n */\nexport interface PaywallProduct {\n /** The unique identifier of the product */\n identifier: string\n /** Language code for localization */\n languageCode: string\n /** Locale string */\n locale: string\n /** Currency code (e.g., \"USD\") */\n currencyCode: string\n /** Currency symbol (e.g., \"$\") */\n currencySymbol: string\n /** Subscription period */\n period: string\n /** Periodly description */\n periodly: string\n /** Localized period description */\n localizedPeriod: string\n /** Alternative period description */\n periodAlt: string\n /** Period length in days */\n periodDays: number\n /** Period length in weeks */\n periodWeeks: number\n /** Period length in months */\n periodMonths: number\n /** Period length in years */\n periodYears: number\n /** Raw price as a number */\n rawPrice: number\n /** Formatted price string */\n price: string\n /** Daily equivalent price */\n dailyPrice: string\n /** Weekly equivalent price */\n weeklyPrice: string\n /** Monthly equivalent price */\n monthlyPrice: string\n /** Yearly equivalent price */\n yearlyPrice: string\n /** Raw trial period price */\n rawTrialPeriodPrice: number\n /** Formatted trial period price */\n trialPeriodPrice: string\n /** Trial period daily price */\n trialPeriodDailyPrice: string\n /** Trial period weekly price */\n trialPeriodWeeklyPrice: string\n /** Trial period monthly price */\n trialPeriodMonthlyPrice: string\n /** Trial period yearly price */\n trialPeriodYearlyPrice: string\n /** Trial period length in days */\n trialPeriodDays: number\n /** Trial period length in weeks */\n trialPeriodWeeks: number\n /** Trial period length in months */\n trialPeriodMonths: number\n /** Trial period length in years */\n trialPeriodYears: number\n /** Trial period description text */\n trialPeriodText: string\n /** Trial period end date string */\n trialPeriodEndDate: string\n}\n\n/**\n * Information about the paywall that was involved in or led to a promotional code redemption.\n */\nexport interface RedemptionPaywallInfo {\n /**\n * The identifier of the paywall.\n */\n identifier: string\n /**\n * The name of the placement that triggered the paywall presentation.\n */\n placementName: string\n /**\n * Parameters associated with the placement.\n */\n placementParams: Record<string, any>\n /**\n * The ID of the experiment variant shown to the user.\n */\n variantId: string\n /**\n * The ID of the experiment the user was part of.\n */\n experimentId: string\n /**\n * The product identifier associated with the paywall, if any.\n * @deprecated Use `product.identifier` instead. This property will be removed in a future version.\n */\n productIdentifier?: string\n /**\n * The product associated with the paywall, if any.\n */\n product?: PaywallProduct\n}\n\n/**\n * Contains detailed information about a successful promotional code redemption\n * or an expired subscription that was previously redeemed.\n */\nexport interface RedemptionInfo {\n /**\n * Information about who owns the redeemed item or subscription.\n * See {@link RedemptionOwnership}.\n */\n ownership: RedemptionOwnership\n /**\n * Information about the purchaser.\n * See {@link RedemptionPurchaserInfo}.\n */\n purchaserInfo: RedemptionPurchaserInfo\n /**\n * Information about the paywall related to this redemption, if applicable.\n * See {@link RedemptionPaywallInfo}.\n */\n paywallInfo?: RedemptionPaywallInfo\n /**\n * A list of entitlements granted by this redemption.\n * See {@link Entitlement}.\n */\n entitlements: Entitlement[]\n}\n\n/**\n * Represents the result of an attempt to redeem a promotional code.\n * This is a discriminated union type based on the `status` property.\n */\nexport type RedemptionResult =\n | {\n /**\n * The promotional code was successfully redeemed.\n */\n status: \"SUCCESS\"\n /**\n * The promotional code that was redeemed.\n */\n code: string\n /**\n * Detailed information about the successful redemption.\n * See {@link RedemptionInfo}.\n */\n redemptionInfo: RedemptionInfo\n }\n | {\n /**\n * An error occurred during the redemption attempt.\n */\n status: \"ERROR\"\n /**\n * The promotional code that was attempted.\n */\n code: string\n /**\n * Information about the error that occurred.\n * See {@link RedemptionErrorInfo}.\n */\n error: RedemptionErrorInfo\n }\n | {\n /**\n * The promotional code has expired and cannot be redeemed.\n */\n status: \"CODE_EXPIRED\"\n /**\n * The expired promotional code.\n */\n code: string\n /**\n * Information related to the expired code, such as whether a new one was resent.\n * See {@link RedemptionExpiredCodeInfo}.\n */\n expired: RedemptionExpiredCodeInfo\n }\n | {\n /**\n * The promotional code is invalid or does not exist.\n */\n status: \"INVALID_CODE\"\n /**\n * The invalid promotional code that was attempted.\n */\n code: string\n }\n | {\n /**\n * The subscription associated with the promotional code has expired,\n * but the code was successfully redeemed in the past.\n */\n status: \"EXPIRED_SUBSCRIPTION\"\n /**\n * The promotional code associated with the expired subscription.\n */\n code: string\n /**\n * Detailed information about the prior redemption.\n * See {@link RedemptionInfo}.\n */\n redemptionInfo: RedemptionInfo\n }\n\n/**\n * Represents the result of a trigger evaluation.\n * This determines what action Superwall will take in response to an event or placement registration.\n */\nexport type TriggerResult =\n | {\n /** The specified placement ID was not found in the Superwall dashboard configuration. */\n result: \"placementNotFound\"\n }\n | {\n /** The user did not match any audience rules for the trigger. */\n result: \"noAudienceMatch\"\n }\n | {\n /** A paywall will be presented to the user as a result of this trigger. */\n result: \"paywall\"\n /**\n * Information about the experiment that led to this paywall presentation.\n * See {@link Experiment}.\n */\n experiment: Experiment\n }\n | {\n /** The user was assigned to a holdout group, and no paywall will be shown. */\n result: \"holdout\"\n /**\n * Information about the experiment that led to this holdout assignment.\n * See {@link Experiment}.\n */\n experiment: Experiment\n }\n | {\n /** An error occurred during the trigger evaluation process. */\n result: \"error\"\n /** A string describing the error. */\n error: string\n }\n\n/**\n * Represents comprehensive information about a product involved in a transaction event.\n * This interface includes detailed pricing, subscription, trial, and localization information\n * from both the native iOS (StoreProduct) and Android (Product) implementations.\n */\nexport interface TransactionProductIdentifier {\n /** The unique identifier of the product (e.g., SKU). */\n id: string\n\n /** The product identifier from the store. */\n productIdentifier: string\n\n /** The full identifier including any additional qualifiers. */\n fullIdentifier: string\n\n /** The raw price of the product as a number. */\n price: number\n\n /** The price formatted according to the device's locale and currency. */\n localizedPrice: string\n\n /** The subscription period formatted for display (e.g., \"1 month\"). */\n localizedSubscriptionPeriod: string\n\n /** The subscription period type (e.g., \"month\", \"year\"). */\n period: string\n\n /** The subscription period with \"ly\" suffix (e.g., \"monthly\", \"yearly\"). */\n periodly: string\n\n /** The number of weeks in the subscription period. */\n periodWeeks: number\n\n /** The weeks duration as a formatted string. */\n periodWeeksString: string\n\n /** The number of months in the subscription period. */\n periodMonths: number\n\n /** The months duration as a formatted string. */\n periodMonthsString: string\n\n /** The number of years in the subscription period. */\n periodYears: number\n\n /** The years duration as a formatted string. */\n periodYearsString: string\n\n /** The number of days in the subscription period. */\n periodDays: number\n\n /** The days duration as a formatted string. */\n periodDaysString: string\n\n /** The calculated daily price of the product. */\n dailyPrice: string\n\n /** The calculated weekly price of the product. */\n weeklyPrice: string\n\n /** The calculated monthly price of the product. */\n monthlyPrice: string\n\n /** The calculated yearly price of the product. */\n yearlyPrice: string\n\n /** Whether the product includes a free trial period. */\n hasFreeTrial: boolean\n\n /** The trial period price formatted for display. */\n localizedTrialPeriodPrice: string\n\n /** The trial period price as a number. */\n trialPeriodPrice: number\n\n /** The end date of the trial period as an ISO string, or null if no trial. */\n trialPeriodEndDate: string | null\n\n /** The trial period end date formatted as a display string. */\n trialPeriodEndDateString: string\n\n /** The number of days in the trial period. */\n trialPeriodDays: number\n\n /** The trial days duration as a formatted string. */\n trialPeriodDaysString: string\n\n /** The number of weeks in the trial period. */\n trialPeriodWeeks: number\n\n /** The trial weeks duration as a formatted string. */\n trialPeriodWeeksString: string\n\n /** The number of months in the trial period. */\n trialPeriodMonths: number\n\n /** The trial months duration as a formatted string. */\n trialPeriodMonthsString: string\n\n /** The number of years in the trial period. */\n trialPeriodYears: number\n\n /** The trial years duration as a formatted string. */\n trialPeriodYearsString: string\n\n /** The trial period formatted as descriptive text (e.g., \"7-day free trial\"). */\n trialPeriodText: string\n\n /** The locale identifier for the product (e.g., \"en_US\"). */\n locale: string\n\n /** The language code extracted from the locale, or null if unavailable. */\n languageCode: string | null\n\n /** The currency code for the product's price (e.g., \"USD\"). */\n currencyCode: string | null\n\n /** The currency symbol for the product's price (e.g., \"$\"). */\n currencySymbol: string | null\n\n /** The region code extracted from the locale, or null if unavailable. */\n regionCode: string | null\n\n /**\n * The structured subscription period information.\n * Contains the unit of time and the value for that unit.\n */\n subscriptionPeriod: {\n /** The time unit for the subscription period. */\n unit: \"day\" | \"week\" | \"month\" | \"year\"\n /** The number of units for the subscription period. */\n value: number\n } | null\n\n /** The identifier for the subscription group this product belongs to, if applicable. */\n subscriptionGroupIdentifier?: string | null\n\n /** Whether this product can be shared with family members. */\n isFamilyShareable?: boolean\n\n /** The token for the introductory offer (iOS 18+, Android). Used for purchase verification. */\n introOfferToken?: string | null\n\n /** Additional attributes and metadata associated with the product. */\n attributes: Record<string, any>\n}\n\n/**\n * Represents a store transaction, providing detailed information about a purchase or subscription event.\n * Dates are typically in ISO 8601 format.\n */\nexport interface StoreTransaction {\n /** The request ID from the Superwall configuration that initiated this transaction, if applicable. */\n configRequestId?: string\n /** The ID of the app session during which this transaction occurred. */\n appSessionId?: string\n /** The ISO 8601 date string of when the transaction occurred. */\n transactionDate?: string\n /** The original transaction identifier, useful for linking related transactions (e.g., subscriptions). */\n originalTransactionIdentifier?: string\n /** The transaction identifier provided by the respective app store (App Store, Google Play). */\n storeTransactionId?: string\n /** The ISO 8601 date string of the original transaction date, especially relevant for subscriptions. */\n originalTransactionDate?: string\n /** The web order line item ID, used for auto-renewable subscriptions on some platforms. */\n webOrderLineItemID?: string\n /** The app bundle ID associated with this transaction. */\n appBundleId?: string\n /** The identifier for the subscription group this transaction belongs to. */\n subscriptionGroupId?: string\n /** Indicates if this transaction represents an upgrade from a previous subscription. */\n isUpgraded?: boolean\n /** The ISO 8601 date string of when the subscription or product access expires. */\n expirationDate?: string\n /** The offer ID associated with this transaction, if any. */\n offerId?: string\n /** The ISO 8601 date string if the transaction was revoked by the store or developer. */\n revocationDate?: string\n /** The App Store account token, specific to Apple's App Store. */\n appAccountToken?: string\n /** The purchase token for Android transactions (Google Play). */\n purchaseToken?: string\n /** The signature for Android transactions for verification (Google Play). */\n signature?: string\n}\n\n/**\n * Represents the type of restoration process that occurred.\n */\nexport type RestoreType =\n | {\n /** Indicates that the restoration occurred as part of a purchase attempt. */\n type: \"viaPurchase\"\n /**\n * The store transaction associated with the purchase that led to the restoration, if available.\n * See {@link StoreTransaction}.\n */\n storeTransaction?: StoreTransaction\n }\n | {\n /** Indicates that the restoration was initiated manually by the user (e.g., by tapping a \"Restore Purchases\" button). */\n type: \"viaRestore\"\n }\n\n/**\n * Defines the possible statuses of a paywall presentation request.\n * - `presentation`: A paywall is being or will be presented.\n * - `noPresentation`: No paywall will be presented.\n * - `timeout`: The request to determine presentation timed out.\n */\nexport type PaywallPresentationRequestStatusType = \"presentation\" | \"noPresentation\" | \"timeout\"\n\n/**\n * Represents the status of a request to present a paywall.\n */\nexport interface PaywallPresentationRequestStatus {\n /** The overall status of the paywall presentation request. See {@link PaywallPresentationRequestStatusType}. */\n status: PaywallPresentationRequestStatusType\n}\n\n/**\n * Provides the reason behind the status of a paywall presentation request, especially when no paywall is shown.\n */\nexport type PaywallPresentationRequestStatusReason =\n | {\n /** A paywall was presented because the debugger is active. */\n reason: \"debuggerPresented\"\n }\n | {\n /** No paywall was presented because one is already being displayed. */\n reason: \"paywallAlreadyPresented\"\n }\n | {\n /** No paywall was presented because the user is in a holdout group of an experiment. */\n reason: \"holdout\"\n /**\n * Information about the experiment that led to this holdout.\n * See {@link Experiment}.\n */\n experiment: Experiment\n }\n | {\n /** No paywall was presented because the user did not match any audience rules. */\n reason: \"noRuleMatch\"\n }\n | {\n /** No paywall was presented because the triggering event was not found. */\n reason: \"eventNotFound\"\n }\n | {\n /** No paywall was presented because the paywall view controller is not available (native SDK specific). */\n reason: \"noPaywallViewController\"\n }\n | {\n /** No paywall was presented because there is no view controller available to present it on (native SDK specific). */\n reason: \"noViewController\"\n }\n | {\n /** No paywall was presented because the user is already subscribed. */\n reason: \"userIsSubscribed\"\n }\n | {\n /** No paywall was presented due to an error. */\n reason: \"error\"\n /** A string describing the error. */\n error: string\n }\n | {\n /** No paywall was presented because it is gated by some condition. */\n reason: \"paywallIsGated\"\n /**\n * Information about the paywall that was gated.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n }\n\n/**\n * Represents a Superwall event that can be tracked by the SDK.\n * This is a discriminated union type where the `event` property determines the specific event and its associated payload.\n * These events provide insights into user behavior, SDK operations, and paywall interactions.\n */\n\n// Individual Superwall Event Interfaces/Types\n\n/**\n * User's first time seeing a Superwall-related element or paywall.\n */\nexport interface FirstSeenEvent {\n /** User's first time seeing a Superwall-related element or paywall. */\n event: \"firstSeen\"\n}\n\n/**\n * The application was opened.\n */\nexport interface AppOpenEvent {\n /** The application was opened. */\n event: \"appOpen\"\n}\n\n/**\n * The application was launched.\n */\nexport interface AppLaunchEvent {\n /** The application was launched. */\n event: \"appLaunch\"\n}\n\n/**\n * An alias was set for the user's identity.\n */\nexport interface IdentityAliasEvent {\n /** An alias was set for the user's identity. */\n event: \"identityAlias\"\n}\n\n/**\n * The application was installed.\n */\nexport interface AppInstallEvent {\n /** The application was installed. */\n event: \"appInstall\"\n}\n\n/**\n * A new user session started.\n */\nexport interface SessionStartEvent {\n /** A new user session started. */\n event: \"sessionStart\"\n}\n\n/**\n * The user's identity was reset (logged out).\n */\nexport interface ResetEvent {\n /** The user's identity was reset (logged out). */\n event: \"reset\"\n}\n\n/**\n * The Superwall configuration was refreshed.\n */\nexport interface ConfigRefreshEvent {\n /** The Superwall configuration was refreshed. */\n event: \"configRefresh\"\n}\n\n/**\n * Failed to refresh the Superwall configuration.\n */\nexport interface ConfigFailEvent {\n /** Failed to refresh the Superwall configuration. */\n event: \"configFail\"\n}\n\n/**\n * Attributes were passed with the Superwall configuration.\n */\nexport interface ConfigAttributesEvent {\n /** Attributes were passed with the Superwall configuration. */\n event: \"configAttributes\"\n}\n\n/**\n * All pending paywall assignments have been confirmed.\n */\nexport interface ConfirmAllAssignmentsEvent {\n /** All pending paywall assignments have been confirmed. */\n event: \"confirmAllAssignments\"\n}\n\n/**\n * A touch event began on the screen (generic).\n */\nexport interface TouchesBeganEvent {\n /** A touch event began on the screen (generic). */\n event: \"touchesBegan\"\n}\n\n/**\n * A survey was closed.\n */\nexport interface SurveyCloseEvent {\n /** A survey was closed. */\n event: \"surveyClose\"\n}\n\n/**\n * Restoration of purchases started.\n */\nexport interface RestoreStartEvent {\n /** Restoration of purchases started. */\n event: \"restoreStart\"\n}\n\n/**\n * Restoration of purchases completed successfully.\n */\nexport interface RestoreCompleteEvent {\n /** Restoration of purchases completed successfully. */\n event: \"restoreComplete\"\n}\n\n/**\n * Restoration of purchases failed.\n */\nexport interface RestoreFailEvent {\n /** Restoration of purchases failed. */\n event: \"restoreFail\"\n /** The error message. */\n message: string\n}\n\n/**\n * Request for AdServices token started.\n */\nexport interface AdServicesTokenRequestStartEvent {\n /** Request for AdServices token started. */\n event: \"adServicesTokenRequestStart\"\n}\n\n/**\n * Request for AdServices token failed.\n */\nexport interface AdServicesTokenRequestFailEvent {\n /** Request for AdServices token failed. */\n event: \"adServicesTokenRequestFail\"\n /** The error message. */\n error: string\n}\n\n/**\n * Request for AdServices token completed.\n */\nexport interface AdServicesTokenRequestCompleteEvent {\n /** Request for AdServices token completed. */\n event: \"adServicesTokenRequestComplete\"\n /** The AdServices token. */\n token: string\n}\n\n/**\n * Shimmer view (placeholder loading) started.\n */\nexport interface ShimmerViewStartEvent {\n /** Shimmer view (placeholder loading) started. */\n event: \"shimmerViewStart\"\n}\n\n/**\n * Shimmer view (placeholder loading) completed.\n */\nexport interface ShimmerViewCompleteEvent {\n /** Shimmer view (placeholder loading) completed. */\n event: \"shimmerViewComplete\"\n}\n\n/**\n * Redemption of a promotional code started.\n */\nexport interface RedemptionStartEvent {\n /** Redemption of a promotional code started. */\n event: \"redemptionStart\"\n}\n\n/**\n * Redemption of a promotional code completed.\n */\nexport interface RedemptionCompleteEvent {\n /** Redemption of a promotional code completed. */\n event: \"redemptionComplete\"\n}\n\n/**\n * Redemption of a promotional code failed.\n */\nexport interface RedemptionFailEvent {\n /** Redemption of a promotional code failed. */\n event: \"redemptionFail\"\n}\n\n/**\n * Data enrichment process started.\n */\nexport interface EnrichmentStartEvent {\n /** Data enrichment process started. */\n event: \"enrichmentStart\"\n}\n\n/**\n * Data enrichment process completed.\n */\nexport interface EnrichmentCompleteEvent {\n /** Data enrichment process completed. */\n event: \"enrichmentComplete\"\n /** Enriched user data, if any. */\n userEnrichment?: Record<string, any>\n /** Enriched device data, if any. */\n deviceEnrichment?: Record<string, any>\n}\n\n/**\n * Data enrichment process failed.\n */\nexport interface EnrichmentFailEvent {\n /** Data enrichment process failed. */\n event: \"enrichmentFail\"\n}\n\n/**\n * An unknown or uncategorized event occurred.\n */\nexport interface UnknownEvent {\n /** An unknown or uncategorized event occurred. */\n event: \"unknown\"\n}\n\n/**\n * Device attributes were updated.\n */\nexport interface DeviceAttributesEvent {\n /** Device attributes were updated. */\n event: \"deviceAttributes\"\n /** The updated device attributes. */\n attributes: Record<string, any>\n}\n\n/**\n * The user's subscription status changed.\n */\nexport interface SubscriptionStatusDidChangeEvent {\n /** The user's subscription status changed. */\n event: \"subscriptionStatusDidChange\"\n /**\n * The new subscription status.\n * See {@link SubscriptionStatus}.\n */\n subscriptionStatus: SubscriptionStatus\n}\n\n/**\n * The application was closed.\n */\nexport interface AppCloseEvent {\n /** The application was closed. */\n event: \"appClose\"\n}\n\n/**\n * A deep link was opened by the application, potentially via Superwall.\n */\nexport interface DeepLinkEvent {\n /** A deep link was opened by the application, potentially via Superwall. */\n event: \"deepLink\"\n /** The URL of the deep link. */\n url: string\n}\n\n/**\n * A trigger was fired based on an event or placement.\n */\nexport interface TriggerFireEvent {\n /** A trigger was fired based on an event or placement. */\n event: \"triggerFire\"\n /** The name of the event or placement that caused the trigger to fire. */\n placementName: string\n /**\n * The result of the trigger evaluation, determining what action Superwall will take.\n * See {@link TriggerResult}.\n */\n result: TriggerResult\n}\n\n/**\n * A paywall was opened.\n */\nexport interface PaywallOpenEvent {\n /** A paywall was opened. */\n event: \"paywallOpen\"\n /**\n * Information about the paywall that was opened.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * A paywall was closed.\n */\nexport interface PaywallCloseEvent {\n /** A paywall was closed. */\n event: \"paywallClose\"\n /**\n * Information about the paywall that was closed.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * The user explicitly declined a paywall.\n */\nexport interface PaywallDeclineEvent {\n /** The user explicitly declined a paywall. */\n event: \"paywallDecline\"\n /**\n * Information about the paywall that was declined.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * A transaction (purchase, restore) was initiated.\n */\nexport interface TransactionStartEvent {\n /** A transaction (purchase, restore) was initiated. */\n event: \"transactionStart\"\n /**\n * Identifier of the product involved in the transaction.\n * See {@link TransactionProductIdentifier}.\n */\n product: TransactionProductIdentifier\n /**\n * Information about the paywall from which the transaction was initiated.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * A transaction failed.\n */\nexport interface TransactionFailEvent {\n /** A transaction failed. */\n event: \"transactionFail\"\n /** The error message from the transaction failure. */\n error: string\n /**\n * Information about the paywall associated with the failed transaction.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * A transaction was abandoned by the user.\n */\nexport interface TransactionAbandonEvent {\n /** A transaction was abandoned by the user. */\n event: \"transactionAbandon\"\n /**\n * Identifier of the product involved in the abandoned transaction.\n * See {@link TransactionProductIdentifier}.\n */\n product: TransactionProductIdentifier\n /**\n * Information about the paywall associated with the abandoned transaction.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * A transaction was successfully completed.\n */\nexport interface TransactionCompleteEvent {\n /** A transaction was successfully completed. */\n event: \"transactionComplete\"\n /**\n * Detailed information about the store transaction, if available.\n * See {@link StoreTransaction}.\n */\n transaction?: StoreTransaction\n /**\n * Identifier of the product involved in the completed transaction.\n * See {@link TransactionProductIdentifier}.\n */\n product: TransactionProductIdentifier\n /** The type of the transaction (e.g., \"purchase\", \"restore\"). */\n type: string\n /**\n * Information about the paywall associated with the completed transaction.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * A new subscription was started.\n */\nexport interface SubscriptionStartEvent {\n /** A new subscription was started. */\n event: \"subscriptionStart\"\n /**\n * Identifier of the product for which the subscription started.\n * See {@link TransactionProductIdentifier}.\n */\n product: TransactionProductIdentifier\n /**\n * Information about the paywall associated with the subscription start.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * A free trial was started.\n */\nexport interface FreeTrialStartEvent {\n /** A free trial was started. */\n event: \"freeTrialStart\"\n /**\n * Identifier of the product for which the free trial started.\n * See {@link TransactionProductIdentifier}.\n */\n product: TransactionProductIdentifier\n /**\n * Information about the paywall associated with the free trial start.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * A transaction was restored.\n */\nexport interface TransactionRestoreEvent {\n /** A transaction was restored. */\n event: \"transactionRestore\"\n /**\n * The type of restoration process.\n * See {@link RestoreType}.\n */\n restoreType: RestoreType\n /**\n * Information about the paywall associated with the restoration.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * A transaction timed out.\n */\nexport interface TransactionTimeoutEvent {\n /** A transaction timed out. */\n event: \"transactionTimeout\"\n /**\n * Information about the paywall associated with the timed-out transaction.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * User attributes were updated.\n */\nexport interface UserAttributesEvent {\n /** User attributes were updated. */\n event: \"userAttributes\"\n /** The updated user attributes. */\n attributes: Record<string, any>\n}\n\n/**\n * A non-recurring product was purchased.\n */\nexport interface NonRecurringProductPurchaseEvent {\n /** A non-recurring product was purchased. */\n event: \"nonRecurringProductPurchase\"\n /**\n * Identifier of the purchased non-recurring product.\n * See {@link TransactionProductIdentifier}.\n */\n product: TransactionProductIdentifier\n /**\n * Information about the paywall associated with the purchase.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * Loading of the paywall response from the server started.\n */\nexport interface PaywallResponseLoadStartEvent {\n /** Loading of the paywall response from the server started. */\n event: \"paywallResponseLoadStart\"\n /** The name of the event or placement that triggered this load. */\n triggeredEventName: string\n}\n\n/**\n * The paywall response was not found on the server.\n */\nexport interface PaywallResponseLoadNotFoundEvent {\n /** The paywall response was not found on the server. */\n event: \"paywallResponseLoadNotFound\"\n /** The name of the event or placement that triggered this load. */\n triggeredEventName: string\n}\n\n/**\n * Loading of the paywall response from the server failed.\n */\nexport interface PaywallResponseLoadFailEvent {\n /** Loading of the paywall response from the server failed. */\n event: \"paywallResponseLoadFail\"\n /** The name of the event or placement that triggered this load. */\n triggeredEventName: string\n}\n\n/**\n * Loading of the paywall response from the server completed successfully.\n */\nexport interface PaywallResponseLoadCompleteEvent {\n /** Loading of the paywall response from the server completed successfully. */\n event: \"paywallResponseLoadComplete\"\n /** The name of the event or placement that triggered this load. */\n triggeredEventName: string\n /**\n * Information about the loaded paywall.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * The web view started loading the paywall's content.\n */\nexport interface PaywallWebviewLoadStartEvent {\n /** The web view started loading the paywall's content. */\n event: \"paywallWebviewLoadStart\"\n /**\n * Information about the paywall whose web view is loading.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * The web view failed to load the paywall's content.\n */\nexport interface PaywallWebviewLoadFailEvent {\n /** The web view failed to load the paywall's content. */\n event: \"paywallWebviewLoadFail\"\n /**\n * Information about the paywall whose web view failed to load.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * The web view completed loading the paywall's content.\n */\nexport interface PaywallWebviewLoadCompleteEvent {\n /** The web view completed loading the paywall's content. */\n event: \"paywallWebviewLoadComplete\"\n /**\n * Information about the paywall whose web view completed loading.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * The web view timed out while loading the paywall's content.\n */\nexport interface PaywallWebviewLoadTimeoutEvent {\n /** The web view timed out while loading the paywall's content. */\n event: \"paywallWebviewLoadTimeout\"\n /**\n * Information about the paywall whose web view timed out.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * The web view used fallback content for the paywall due to a loading issue.\n */\nexport interface PaywallWebviewLoadFallbackEvent {\n /** The web view used fallback content for the paywall due to a loading issue. */\n event: \"paywallWebviewLoadFallback\"\n /**\n * Information about the paywall that used fallback content.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * Loading of products for the paywall started.\n */\nexport interface PaywallProductsLoadStartEvent {\n /** Loading of products for the paywall started. */\n event: \"paywallProductsLoadStart\"\n /** The name of the event or placement that triggered this load. */\n triggeredEventName: string\n /**\n * Information about the paywall for which products are loading.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * Loading of products for the paywall failed.\n */\nexport interface PaywallProductsLoadFailEvent {\n /** Loading of products for the paywall failed. */\n event: \"paywallProductsLoadFail\"\n /** The name of the event or placement that triggered this load. */\n triggeredEventName: string\n /**\n * Information about the paywall for which product loading failed.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * Loading of products for the paywall completed successfully.\n */\nexport interface PaywallProductsLoadCompleteEvent {\n /** Loading of products for the paywall completed successfully. */\n event: \"paywallProductsLoadComplete\"\n /** The name of the event or placement that triggered this load. */\n triggeredEventName: string\n /**\n * Information about the paywall for which products completed loading.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * Retrying the loading of products for the paywall.\n */\nexport interface PaywallProductsLoadRetryEvent {\n /** Retrying the loading of products for the paywall. */\n event: \"paywallProductsLoadRetry\"\n /** The name of the event or placement that triggered this load. */\n triggeredEventName: string\n /**\n * Information about the paywall for which product loading is being retried.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n /** The attempt number for this retry. */\n attempt: number\n}\n\n/**\n * A response to a survey was submitted by the user.\n */\nexport interface SurveyResponseEvent {\n /** A response to a survey was submitted by the user. */\n event: \"surveyResponse\"\n /**\n * The survey that was responded to.\n * See {@link Survey}.\n */\n survey: Survey\n /**\n * The option selected by the user in the survey.\n * See {@link SurveyOption}.\n */\n selectedOption: SurveyOption\n /** The custom response text entered by the user, if any. */\n customResponse?: string\n /**\n * Information about the paywall where the survey was presented.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * A request to present a paywall was made.\n */\nexport interface PaywallPresentationRequestEvent {\n /** A request to present a paywall was made. */\n event: \"paywallPresentationRequest\"\n /**\n * The status of the presentation request.\n * See {@link PaywallPresentationRequestStatus}.\n */\n status: PaywallPresentationRequestStatus\n /**\n * The reason for the status, if applicable (e.g., why a paywall was not presented).\n * See {@link PaywallPresentationRequestStatusReason}.\n */\n reason?: PaywallPresentationRequestStatusReason\n}\n\n/**\n * A custom placement (defined by the developer) was executed.\n */\nexport interface CustomPlacementEvent {\n /** A custom placement (defined by the developer) was executed. */\n event: \"customPlacement\"\n /** The name of the custom placement. */\n name: string\n /** Parameters associated with the custom placement. */\n params: Record<string, any>\n /**\n * Information about the paywall shown for this placement, if any.\n * See {@link PaywallInfo}.\n */\n paywallInfo?: PaywallInfo\n}\n\n/**\n * The paywall's web view content process was terminated.\n */\nexport interface PaywallWebviewProcessTerminatedEvent {\n /** The paywall's web view content process was terminated. */\n event: \"paywallWebviewProcessTerminated\"\n /**\n * Information about the paywall whose web view process was terminated.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n}\n\n/**\n * Products for the paywall are missing from the store.\n */\nexport interface PaywallProductsLoadMissingProductsEvent {\n /** Products for the paywall are missing from the store. */\n event: \"paywallProductsLoadMissingProducts\"\n /** The name of the event or placement that triggered this load. */\n triggeredEventName: string\n /**\n * Information about the paywall with missing products.\n * See {@link PaywallInfo}.\n */\n paywallInfo: PaywallInfo\n /** The product identifiers that are missing. */\n identifiers: string[]\n}\n\n/**\n * A network response failed to decode.\n */\nexport interface NetworkDecodingFailEvent {\n /** A network response failed to decode. */\n event: \"networkDecodingFail\"\n}\n\n/**\n * The customer info did change.\n */\nexport interface CustomerInfoDidChangeEvent {\n /** The customer info did change. */\n event: \"customerInfoDidChange\"\n}\n\n/**\n * Integration attributes were set.\n */\nexport interface IntegrationAttributesEvent {\n /** Integration attributes were set. */\n event: \"integrationAttributes\"\n /** The integration attributes. */\n attributes: Record<string, any>\n}\n\n/**\n * A review was requested from the user.\n */\nexport interface ReviewRequestedEvent {\n /** A review was requested from the user. */\n event: \"reviewRequested\"\n /** The number of times a review has been requested. */\n count: number\n}\n\n/**\n * A permission was requested from a paywall.\n */\nexport interface PermissionRequestedEvent {\n /** A permission was requested from a paywall. */\n event: \"permissionRequested\"\n /** The name of the permission that was requested. */\n permissionName: string\n /** The identifier of the paywall that requested the permission. */\n paywallIdentifier: string\n}\n\n/**\n * A permission was granted after being requested from a paywall.\n */\nexport interface PermissionGrantedEvent {\n /** A permission was granted after being requested from a paywall. */\n event: \"permissionGranted\"\n /** The name of the permission that was granted. */\n permissionName: string\n /** The identifier of the paywall that requested the permission. */\n paywallIdentifier: string\n}\n\n/**\n * A permission was denied after being requested from a paywall.\n */\nexport interface PermissionDeniedEvent {\n /** A permission was denied after being requested from a paywall. */\n event: \"permissionDenied\"\n /** The name of the permission that was denied. */\n permissionName: string\n /** The identifier of the paywall that requested the permission. */\n paywallIdentifier: string\n}\n\n/**\n * Paywall preloading has started.\n */\nexport interface PaywallPreloadStartEvent {\n /** Paywall preloading has started. */\n event: \"paywallPreloadStart\"\n /** The number of paywalls being preloaded. */\n paywallCount: number\n}\n\n/**\n * Paywall preloading has completed.\n */\nexport interface PaywallPreloadCompleteEvent {\n /** Paywall preloading has completed. */\n event: \"paywallPreloadComplete\"\n /** The number of paywalls that were preloaded. */\n paywallCount: number\n}\n\n/**\n * The test mode modal was opened.\n */\nexport interface TestModeModalOpenEvent {\n /** The test mode modal was opened. */\n event: \"testModeModalOpen\"\n}\n\n/**\n * The test mode modal was closed.\n */\nexport interface TestModeModalCloseEvent {\n /** The test mode modal was closed. */\n event: \"testModeModalClose\"\n}\n\n/**\n * A Stripe checkout session started.\n */\nexport interface StripeCheckoutStartEvent {\n /** A Stripe checkout session started. */\n event: \"stripeCheckoutStart\"\n /** Information about the paywall associated with this checkout. */\n paywallInfo: PaywallInfo\n}\n\n/**\n * A Stripe checkout form was submitted.\n */\nexport interface StripeCheckoutSubmitEvent {\n /** A Stripe checkout form was submitted. */\n event: \"stripeCheckoutSubmit\"\n /** Information about the paywall associated with this checkout. */\n paywallInfo: PaywallInfo\n}\n\n/**\n * A Stripe checkout session completed.\n */\nexport interface StripeCheckoutCompleteEvent {\n /** A Stripe checkout session completed. */\n event: \"stripeCheckoutComplete\"\n /** Information about the paywall associated with this checkout. */\n paywallInfo: PaywallInfo\n}\n\n/**\n * A Stripe checkout session failed.\n */\nexport interface StripeCheckoutFailEvent {\n /** A Stripe checkout session failed. */\n event: \"stripeCheckoutFail\"\n /** Information about the paywall associated with this checkout. */\n paywallInfo: PaywallInfo\n}\n\n/**\n * Page-specific details for a multi-page paywall page view.\n */\nexport interface PageViewData {\n /** The unique identifier for the page node. */\n pageNodeId: string\n /** The zero-based index of the page in the paywall flow. */\n flowPosition: number\n /** The display name of the page. */\n pageName: string\n /** The unique identifier for the navigation node. */\n navigationNodeId: string\n /** The unique identifier for the previous page node, if any. */\n previousPageNodeId?: string\n /** The flow position of the previous page, if any. */\n previousFlowPosition?: number\n /**\n * How the user navigated to the page.\n * Possible values: `\"entry\"`, `\"forward\"`, `\"back\"`, `\"auto_transition\"`.\n */\n navigationType: string\n /** Time spent on the previous page in milliseconds, if any. */\n timeOnPreviousPageMs?: number\n}\n\n/**\n * The user navigated to a page in a multi-page paywall.\n */\nexport interface PaywallPageViewEvent {\n /** The user navigated to a page in a multi-page paywall. */\n event: \"paywallPageView\"\n /** Information about the paywall associated with this page view. */\n paywallInfo: PaywallInfo\n /** Details about the page that was navigated to. */\n data: PageViewData\n}\n\n/**\n * A union of all possible string literal values for the `event` property from all specific Superwall event types.\n * This type can be used when you need to refer to an event type name itself.\n */\nexport type SuperwallEventType =\n | FirstSeenEvent[\"event\"]\n | AppOpenEvent[\"event\"]\n | AppLaunchEvent[\"event\"]\n | IdentityAliasEvent[\"event\"]\n | AppInstallEvent[\"event\"]\n | SessionStartEvent[\"event\"]\n | ResetEvent[\"event\"]\n | ConfigRefreshEvent[\"event\"]\n | ConfigFailEvent[\"event\"]\n | ConfigAttributesEvent[\"event\"]\n | ConfirmAllAssignmentsEvent[\"event\"]\n | TouchesBeganEvent[\"event\"]\n | SurveyCloseEvent[\"event\"]\n | RestoreStartEvent[\"event\"]\n | RestoreCompleteEvent[\"event\"]\n | RestoreFailEvent[\"event\"]\n | AdServicesTokenRequestStartEvent[\"event\"]\n | AdServicesTokenRequestFailEvent[\"event\"]\n | AdServicesTokenRequestCompleteEvent[\"event\"]\n | ShimmerViewStartEvent[\"event\"]\n | ShimmerViewCompleteEvent[\"event\"]\n | RedemptionStartEvent[\"event\"]\n | RedemptionCompleteEvent[\"event\"]\n | RedemptionFailEvent[\"event\"]\n | EnrichmentStartEvent[\"event\"]\n | EnrichmentCompleteEvent[\"event\"]\n | EnrichmentFailEvent[\"event\"]\n | UnknownEvent[\"event\"]\n | DeviceAttributesEvent[\"event\"]\n | SubscriptionStatusDidChangeEvent[\"event\"]\n | AppCloseEvent[\"event\"]\n | DeepLinkEvent[\"event\"]\n | TriggerFireEvent[\"event\"]\n | PaywallOpenEvent[\"event\"]\n | PaywallCloseEvent[\"event\"]\n | PaywallDeclineEvent[\"event\"]\n | TransactionStartEvent[\"event\"]\n | TransactionFailEvent[\"event\"]\n | TransactionAbandonEvent[\"event\"]\n | TransactionCompleteEvent[\"event\"]\n | SubscriptionStartEvent[\"event\"]\n | FreeTrialStartEvent[\"event\"]\n | TransactionRestoreEvent[\"event\"]\n | TransactionTimeoutEvent[\"event\"]\n | UserAttributesEvent[\"event\"]\n | NonRecurringProductPurchaseEvent[\"event\"]\n | PaywallResponseLoadStartEvent[\"event\"]\n | PaywallResponseLoadNotFoundEvent[\"event\"]\n | PaywallResponseLoadFailEvent[\"event\"]\n | PaywallResponseLoadCompleteEvent[\"event\"]\n | PaywallWebviewLoadStartEvent[\"event\"]\n | PaywallWebviewLoadFailEvent[\"event\"]\n | PaywallWebviewLoadCompleteEvent[\"event\"]\n | PaywallWebviewLoadTimeoutEvent[\"event\"]\n | PaywallWebviewLoadFallbackEvent[\"event\"]\n | PaywallProductsLoadStartEvent[\"event\"]\n | PaywallProductsLoadFailEvent[\"event\"]\n | PaywallProductsLoadCompleteEvent[\"event\"]\n | PaywallProductsLoadRetryEvent[\"event\"]\n | SurveyResponseEvent[\"event\"]\n | PaywallPresentationRequestEvent[\"event\"]\n | CustomPlacementEvent[\"event\"]\n | PaywallWebviewProcessTerminatedEvent[\"event\"]\n | PaywallProductsLoadMissingProductsEvent[\"event\"]\n | NetworkDecodingFailEvent[\"event\"]\n | CustomerInfoDidChangeEvent[\"event\"]\n | IntegrationAttributesEvent[\"event\"]\n | ReviewRequestedEvent[\"event\"]\n | PermissionRequestedEvent[\"event\"]\n | PermissionGrantedEvent[\"event\"]\n | PermissionDeniedEvent[\"event\"]\n | PaywallPreloadStartEvent[\"event\"]\n | PaywallPreloadCompleteEvent[\"event\"]\n | TestModeModalOpenEvent[\"event\"]\n | TestModeModalCloseEvent[\"event\"]\n | StripeCheckoutStartEvent[\"event\"]\n | StripeCheckoutSubmitEvent[\"event\"]\n | StripeCheckoutCompleteEvent[\"event\"]\n | StripeCheckoutFailEvent[\"event\"]\n | PaywallPageViewEvent[\"event\"]\n\n/**\n * Represents a Superwall event that can be tracked by the SDK.\n * This is a discriminated union type where the `event` property determines the specific event and its associated payload.\n * These events provide insights into user behavior, SDK operations, and paywall interactions.\n */\nexport type SuperwallEvent =\n | FirstSeenEvent\n | AppOpenEvent\n | AppLaunchEvent\n | IdentityAliasEvent\n | AppInstallEvent\n | SessionStartEvent\n | ResetEvent\n | ConfigRefreshEvent\n | ConfigFailEvent\n | ConfigAttributesEvent\n | ConfirmAllAssignmentsEvent\n | TouchesBeganEvent\n | SurveyCloseEvent\n | RestoreStartEvent\n | RestoreCompleteEvent\n | RestoreFailEvent\n | AdServicesTokenRequestStartEvent\n | AdServicesTokenRequestFailEvent\n | AdServicesTokenRequestCompleteEvent\n | ShimmerViewStartEvent\n | ShimmerViewCompleteEvent\n | RedemptionStartEvent\n | RedemptionCompleteEvent\n | RedemptionFailEvent\n | EnrichmentStartEvent\n | EnrichmentCompleteEvent\n | EnrichmentFailEvent\n | UnknownEvent\n | DeviceAttributesEvent\n | SubscriptionStatusDidChangeEvent\n | AppCloseEvent\n | DeepLinkEvent\n | TriggerFireEvent\n | PaywallOpenEvent\n | PaywallCloseEvent\n | PaywallDeclineEvent\n | TransactionStartEvent\n | TransactionFailEvent\n | TransactionAbandonEvent\n | TransactionCompleteEvent\n | SubscriptionStartEvent\n | FreeTrialStartEvent\n | TransactionRestoreEvent\n | TransactionTimeoutEvent\n | UserAttributesEvent\n | NonRecurringProductPurchaseEvent\n | PaywallResponseLoadStartEvent\n | PaywallResponseLoadNotFoundEvent\n | PaywallResponseLoadFailEvent\n | PaywallResponseLoadCompleteEvent\n | PaywallWebviewLoadStartEvent\n | PaywallWebviewLoadFailEvent\n | PaywallWebviewLoadCompleteEvent\n | PaywallWebviewLoadTimeoutEvent\n | PaywallWebviewLoadFallbackEvent\n | PaywallProductsLoadStartEvent\n | PaywallProductsLoadFailEvent\n | PaywallProductsLoadCompleteEvent\n | PaywallProductsLoadRetryEvent\n | SurveyResponseEvent\n | PaywallPresentationRequestEvent\n | CustomPlacementEvent\n | PaywallWebviewProcessTerminatedEvent\n | PaywallProductsLoadMissingProductsEvent\n | NetworkDecodingFailEvent\n | CustomerInfoDidChangeEvent\n | IntegrationAttributesEvent\n | ReviewRequestedEvent\n | PermissionRequestedEvent\n | PermissionGrantedEvent\n | PermissionDeniedEvent\n | PaywallPreloadStartEvent\n | PaywallPreloadCompleteEvent\n | TestModeModalOpenEvent\n | TestModeModalCloseEvent\n | StripeCheckoutStartEvent\n | StripeCheckoutSubmitEvent\n | StripeCheckoutCompleteEvent\n | StripeCheckoutFailEvent\n | PaywallPageViewEvent\n\n/**\n * Contains information about a Superwall event, including the specific {@link SuperwallEvent}\n * that occurred and any associated parameters. This structure is used by the `onSuperwallEvent` callback\n * in {@link SuperwallEventCallbacks} and the `handleSuperwallEvent` in {@link SuperwallExpoModuleEvents}.\n */\nexport interface SuperwallEventInfo {\n /** The specific Superwall event that occurred. See {@link SuperwallEvent}. */\n event: SuperwallEvent\n /**\n * Additional parameters associated with the event. The structure of these parameters\n * depends on the specific event type and often mirrors the properties defined within\n * the {@link SuperwallEvent} union members.\n */\n params: Record<string, any>\n}\n\n/**\n * Defines the verbosity level for logging within the Superwall SDK.\n * - `debug`: Outputs detailed debugging information, useful for development and troubleshooting.\n * - `info`: Outputs general information about SDK activity and state changes.\n * - `warn`: Outputs warnings about potential issues or deprecated usage.\n * - `error`: Outputs error messages for issues encountered by the SDK.\n * - `none`: Disables all logging from the SDK.\n */\nexport type LogLevel = \"debug\" | \"info\" | \"warn\" | \"error\" | \"none\"\n\n/**\n * Defines the scope of logging within the Superwall SDK, allowing for targeted logging of specific SDK components or features.\n * Using these scopes can help narrow down logs to relevant areas when debugging.\n *\n * Possible values include:\n * - `localizationManager`: Logs related to localization and language settings.\n * - `bounceButton`: Logs related to the animated bounce button feature.\n * - `coreData`: Logs related to internal data storage (native specific).\n * - `configManager`: Logs related to fetching and managing Superwall configurations.\n * - `identityManager`: Logs related to user identification and session management.\n * - `debugManager`: Logs related to the Superwall debugger.\n * - `debugViewController`: Logs related to the debugger's view controller (native specific).\n * - `localizationViewController`: Logs related to localization view controllers (native specific).\n * - `gameControllerManager`: Logs related to game controller interactions (native specific).\n * - `device`: Logs related to device information and properties.\n * - `network`: Logs related to network requests made by the SDK.\n * - `paywallEvents`: Logs related to events occurring on the paywall itself.\n * - `productsManager`: Logs related to fetching and managing product information from app stores.\n * - `storeKitManager`: Logs related to StoreKit interactions (iOS specific).\n * - `placements`: Logs related to placements and their evaluation.\n * - `receipts`: Logs related to App Store receipt validation and processing.\n * - `superwallCore`: Logs related to the core functionalities of the Superwall SDK.\n * - `paywallPresentation`: Logs related to the presentation logic of paywalls.\n * - `paywallTransactions`: Logs related to transactions initiated from paywalls.\n * - `paywallViewController`: Logs related to the paywall view controller (native specific).\n * - `cache`: Logs related to caching mechanisms within the SDK.\n * - `all`: Enables logging for all scopes.\n */\nexport type LogScope =\n | \"localizationManager\"\n | \"bounceButton\"\n | \"coreData\"\n | \"configManager\"\n | \"identityManager\"\n | \"debugManager\"\n | \"debugViewController\"\n | \"localizationViewController\"\n | \"gameControllerManager\"\n | \"device\"\n | \"network\"\n | \"paywallEvents\"\n | \"productsManager\"\n | \"storeKitManager\"\n | \"placements\"\n | \"receipts\"\n | \"superwallCore\"\n | \"paywallPresentation\"\n | \"paywallTransactions\"\n | \"paywallViewController\"\n | \"cache\"\n | \"all\"\n\nexport type OnPurchaseParamsIOS = {\n productId: string\n platform: \"ios\"\n /**\n * The store that backs the product being purchased. See {@link ProductStore}.\n * When the value is `\"CUSTOM\"`, the product is not backed by StoreKit and your\n * purchase handler must implement the purchase itself (e.g., calling your backend).\n * May be `undefined` if the product cannot be matched against the most recently\n * presented paywall (e.g., during background flows).\n */\n store?: ProductStore\n}\n\nexport type OnPurchaseParamsAndroid = {\n productId: string\n platform: \"android\"\n basePlanId: string\n offerId?: string\n}\n\nexport type OnPurchaseParams = OnPurchaseParamsIOS | OnPurchaseParamsAndroid\n\n/**\n * Represents the result of a purchase restoration attempt.\n * - `restored`: The restoration completed successfully.\n * - `failed`: The restoration failed, with an accompanying error message.\n */\nexport type RestorationResultResponse =\n | { result: \"restored\" }\n | { result: \"failed\"; errorMessage: string | null }\n\n/**\n * Defines the events emitted by the native Superwall Expo module that can be listened to.\n * These events provide a way to react to various SDK activities and user interactions.\n * Use `SuperwallExpoModule.addListener(eventName, callback)` to subscribe.\n */\nexport type SuperwallExpoModuleEvents = {\n /**\n * Emitted when a paywall is presented to the user.\n * @param params - Event parameters.\n * @param params.paywallInfoJson - JSON representation of {@link PaywallInfo} for the presented paywall.\n * @param params.handlerId - Identifier for the handler that triggered this presentation (e.g., from `usePlacement`).\n */\n onPaywallPresent: (params: { paywallInfoJson: PaywallInfo; handlerId: string }) => void\n /**\n * Emitted when a paywall is dismissed by the user or programmatically.\n * @param params - Event parameters.\n * @param params.paywallInfoJson - JSON representation of {@link PaywallInfo} for the dismissed paywall.\n * @param params.result - The result of the paywall interaction. See {@link PaywallResult}.\n * @param params.handlerId - Identifier for the handler associated with this paywall.\n */\n onPaywallDismiss: (params: {\n paywallInfoJson: PaywallInfo\n result: PaywallResult\n handlerId: string\n }) => void\n /**\n * Emitted when an error occurs during the paywall presentation process.\n * @param params - Event parameters.\n * @param params.errorString - A string describing the error.\n * @param params.handlerId - Identifier for the handler associated with this error, if applicable.\n */\n onPaywallError: (params: { errorString: string; handlerId: string }) => void\n /**\n * Emitted when a paywall presentation is skipped (e.g., user is in a holdout group, no rule match).\n * @param params - Event parameters.\n * @param params.skippedReason - The reason why the paywall was skipped. See {@link PaywallSkippedReason}.\n * @param params.handlerId - Identifier for the handler associated with this skipped paywall.\n */\n onPaywallSkip: (params: { skippedReason: PaywallSkippedReason; handlerId: string }) => void\n\n // --- SuperwallDelegateBridge Events ---\n /**\n * Emitted when the user's subscription status changes.\n * @param params - Event parameters.\n * @param params.from - The previous subscription status. See {@link SubscriptionStatus}.\n * @param params.to - The new subscription status. See {@link SubscriptionStatus}.\n */\n subscriptionStatusDidChange: (params: {\n from: SubscriptionStatus\n to: SubscriptionStatus\n }) => void\n /**\n * Emitted for various internal Superwall events, providing a detailed stream of SDK activity.\n * @param params - Event parameters.\n * @param params.eventInfo - Detailed information about the Superwall event. See {@link SuperwallEventInfo}.\n */\n handleSuperwallEvent: (params: { eventInfo: SuperwallEventInfo }) => void\n /**\n * Emitted when a custom action is invoked from a paywall's JavaScript.\n * @param params - Event parameters.\n * @param params.name - The name of the custom action that was invoked.\n */\n handleCustomPaywallAction: (params: { name: string }) => void\n /**\n * Emitted just before a paywall is dismissed.\n * @param params - Event parameters.\n * @param params.info - Information about the paywall that will be dismissed. See {@link PaywallInfo}.\n */\n willDismissPaywall: (params: { info: PaywallInfo }) => void\n /**\n * Emitted just before a paywall is presented.\n * @param params - Event parameters.\n * @param params.info - Information about the paywall that will be presented. See {@link PaywallInfo}.\n */\n willPresentPaywall: (params: { info: PaywallInfo }) => void\n /**\n * Emitted after a paywall has been dismissed.\n * @param params - Event parameters.\n * @param params.info - Information about the paywall that was dismissed. See {@link PaywallInfo}.\n */\n didDismissPaywall: (params: { info: PaywallInfo }) => void\n /**\n * Emitted after a paywall has been presented.\n * @param params - Event parameters.\n * @param params.info - Information about the paywall that was presented. See {@link PaywallInfo}.\n */\n didPresentPaywall: (params: { info: PaywallInfo }) => void\n /**\n * Emitted when the paywall intends to open an external URL.\n * @param params - Event parameters.\n * @param params.url - The URL that the paywall intends to open.\n */\n paywallWillOpenURL: (params: { url: string }) => void\n /**\n * Emitted when the paywall intends to open a deep link.\n * @param params - Event parameters.\n * @param params.url - The deep link URL that the paywall intends to open.\n */\n paywallWillOpenDeepLink: (params: { url: string }) => void\n /**\n * Emitted for logging messages generated by the native SDK.\n * @param params - Log parameters.\n * @param params.level - The log level. See {@link LogLevel}.\n * @param params.scope - The scope of the log. See {@link LogScope}.\n * @param params.message - The log message (can be null).\n * @param params.info - Additional structured information for the log (can be null).\n * @param params.error - Error message if the log represents an error (can be null).\n */\n handleLog: (params: {\n level: LogLevel\n scope: LogScope\n message: string | null\n info: Record<string, any> | null\n error: string | null\n }) => void\n /**\n * Emitted before the SDK attempts to redeem a promotional link or code.\n * @param params - Event parameters. For iOS, this is typically an empty dictionary.\n */\n willRedeemLink: (params: Record<string, never> | null) => void\n /**\n * Emitted after the SDK has attempted to redeem a promotional link or code.\n * @param params - The result of the redemption attempt. See {@link RedemptionResult}.\n */\n didRedeemLink: (params: RedemptionResult) => void\n\n // Purchase Events\n /**\n * Emitted when a purchase is initiated by the user from a paywall.\n * @param params - Parameters related to the purchase.\n * - For iOS: `{ productId: string; platform: \"ios\" }`\n * - For Android: `{ productId: string; platform: \"android\"; basePlanId: string; offerId?: string }`\n * (offerId is optional for Android).\n */\n onPurchase: (params: OnPurchaseParams) => void\n /**\n * Emitted when a purchase restoration process is initiated by the user.\n * @param params - Event parameters. For iOS, this is `null`.\n */\n onPurchaseRestore: () => void\n /**\n * Emitted when the back button is pressed while a paywall is displayed (Android only).\n * This is only triggered when `rerouteBackButton` is enabled in the paywall settings.\n * @param params - Event parameters.\n * @param params.paywallInfo - Information about the paywall that is currently displayed. See {@link PaywallInfo}.\n * @platform Android\n */\n onBackPressed: (params: { paywallInfo: PaywallInfo }) => void\n /**\n * Emitted when a custom callback is invoked from a paywall.\n * The handler should process the callback and return a result via `didHandleCustomCallback`.\n * @param params - Event parameters.\n * @param params.callbackId - Unique identifier for this callback invocation, used to return the result.\n * @param params.name - The name of the custom callback.\n * @param params.variables - Optional variables passed from the paywall.\n * @param params.handlerId - Identifier for the handler associated with this callback.\n */\n onCustomCallback: (params: {\n callbackId: string\n name: string\n variables?: Record<string, any>\n handlerId: string\n }) => void\n}\n"]}
@@ -29,6 +29,13 @@ export type TransactionBackgroundView = "spinner" | "none";
29
29
  * Controls when the SDK enters test mode.
30
30
  */
31
31
  export type TestModeBehavior = "automatic" | "whenEnabledForUser" | "never" | "always";
32
+ /**
33
+ * Controls which events Superwall collects, for GDPR/data-collection control.
34
+ * - "all": collect all events (default)
35
+ * - "superwallOnly": only Superwall-internal events
36
+ * - "none": collect nothing
37
+ */
38
+ export type EventTrackingBehavior = "all" | "superwallOnly" | "none";
32
39
  /**
33
40
  * @category Types
34
41
  * @since 1.2.0
@@ -85,7 +92,9 @@ export interface PaywallOptions {
85
92
  export interface SuperwallOptions {
86
93
  paywalls: PaywallOptions;
87
94
  networkEnvironment: NetworkEnvironment;
95
+ /** @deprecated Use {@link eventTrackingBehavior} instead. */
88
96
  isExternalDataCollectionEnabled: boolean;
97
+ eventTrackingBehavior?: EventTrackingBehavior;
89
98
  localeIdentifier?: string;
90
99
  isGameControllerEnabled: boolean;
91
100
  logging: LoggingOptions;
@@ -131,7 +140,9 @@ export interface PartialSuperwallOptions {
131
140
  restoreFailed?: Partial<RestoreFailed>;
132
141
  };
133
142
  networkEnvironment?: NetworkEnvironment;
143
+ /** @deprecated Use {@link eventTrackingBehavior} instead. */
134
144
  isExternalDataCollectionEnabled?: boolean;
145
+ eventTrackingBehavior?: EventTrackingBehavior;
135
146
  localeIdentifier?: string;
136
147
  isGameControllerEnabled?: boolean;
137
148
  logging?: Partial<LoggingOptions>;
@@ -1 +1 @@
1
- {"version":3,"file":"SuperwallOptions.d.ts","sourceRoot":"","sources":["../../src/SuperwallOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAE9D;;;;GAIG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAA;AAEnE;;;;GAIG;AACH,MAAM,MAAM,QAAQ,GAChB,qBAAqB,GACrB,cAAc,GACd,UAAU,GACV,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,qBAAqB,GACrB,4BAA4B,GAC5B,uBAAuB,GACvB,QAAQ,GACR,SAAS,GACT,eAAe,GACf,iBAAiB,GACjB,iBAAiB,GACjB,YAAY,GACZ,UAAU,GACV,eAAe,GACf,qBAAqB,GACrB,qBAAqB,GACrB,uBAAuB,GACvB,OAAO,GACP,KAAK,CAAA;AAET;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,kBAAkB,GAAG,WAAW,CAAA;AAE7E;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,SAAS,GAAG,MAAM,CAAA;AAE1D;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,oBAAoB,GAAG,OAAO,GAAG,QAAQ,CAAA;AAEtF;;;;;;;;;;GAUG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAA;AAE7D;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,gBAAgB,EAAE,MAAM,CAAA;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,QAAQ,CAAA;IACf,MAAM,EAAE,QAAQ,EAAE,CAAA;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,uBAAuB,EAAE,OAAO,CAAA;IAChC,aAAa,EAAE,aAAa,CAAA;IAC5B,8BAA8B,EAAE,OAAO,CAAA;IACvC,aAAa,EAAE,OAAO,CAAA;IACtB,oBAAoB,EAAE,OAAO,CAAA;IAC7B,yBAAyB,EAAE,yBAAyB,CAAA;IACpD,sCAAsC,EAAE,OAAO,CAAA;IAC/C,aAAa,CAAC,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,OAAO,CAAA;CACtD;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,cAAc,CAAA;IACxB,kBAAkB,EAAE,kBAAkB,CAAA;IACtC,+BAA+B,EAAE,OAAO,CAAA;IACxC,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,uBAAuB,EAAE,OAAO,CAAA;IAChC,OAAO,EAAE,cAAc,CAAA;IACvB,0BAA0B,EAAE,OAAO,CAAA;IACnC,eAAe,CAAC,EAAE,WAAW,GAAG,WAAW,CAAA;IAC3C,iCAAiC,EAAE,OAAO,CAAA;IAC1C,wBAAwB,EAAE,OAAO,CAAA;IACjC;;;;OAIG;IACH,sBAAsB,EAAE,OAAO,CAAA;IAC/B;;;OAGG;IACH,+BAA+B,EAAE,OAAO,CAAA;IACxC;;;;OAIG;IACH,mBAAmB,EAAE,MAAM,CAAA;IAC3B;;;OAGG;IACH,cAAc,EAAE,OAAO,CAAA;IACvB;;;OAGG;IACH,gBAAgB,EAAE,gBAAgB,CAAA;CACnC;AAED;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG;QACnC,aAAa,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAA;KACvC,CAAA;IACD,kBAAkB,CAAC,EAAE,kBAAkB,CAAA;IACvC,+BAA+B,CAAC,EAAE,OAAO,CAAA;IACzC,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAA;IACjC,0BAA0B,CAAC,EAAE,OAAO,CAAA;IACpC,eAAe,CAAC,EAAE,WAAW,GAAG,WAAW,CAAA;IAC3C,iCAAiC,CAAC,EAAE,OAAO,CAAA;IAC3C,wBAAwB,CAAC,EAAE,OAAO,CAAA;IAClC;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC;;;OAGG;IACH,+BAA+B,CAAC,EAAE,OAAO,CAAA;IACzC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;IACnC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;CAC/C;AAED;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,gBA6BrC,CAAA"}
1
+ {"version":3,"file":"SuperwallOptions.d.ts","sourceRoot":"","sources":["../../src/SuperwallOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAE9D;;;;GAIG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAA;AAEnE;;;;GAIG;AACH,MAAM,MAAM,QAAQ,GAChB,qBAAqB,GACrB,cAAc,GACd,UAAU,GACV,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,qBAAqB,GACrB,4BAA4B,GAC5B,uBAAuB,GACvB,QAAQ,GACR,SAAS,GACT,eAAe,GACf,iBAAiB,GACjB,iBAAiB,GACjB,YAAY,GACZ,UAAU,GACV,eAAe,GACf,qBAAqB,GACrB,qBAAqB,GACrB,uBAAuB,GACvB,OAAO,GACP,KAAK,CAAA;AAET;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,kBAAkB,GAAG,WAAW,CAAA;AAE7E;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,SAAS,GAAG,MAAM,CAAA;AAE1D;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,oBAAoB,GAAG,OAAO,GAAG,QAAQ,CAAA;AAEtF;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAAG,KAAK,GAAG,eAAe,GAAG,MAAM,CAAA;AAEpE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAA;AAE7D;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,gBAAgB,EAAE,MAAM,CAAA;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,QAAQ,CAAA;IACf,MAAM,EAAE,QAAQ,EAAE,CAAA;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,uBAAuB,EAAE,OAAO,CAAA;IAChC,aAAa,EAAE,aAAa,CAAA;IAC5B,8BAA8B,EAAE,OAAO,CAAA;IACvC,aAAa,EAAE,OAAO,CAAA;IACtB,oBAAoB,EAAE,OAAO,CAAA;IAC7B,yBAAyB,EAAE,yBAAyB,CAAA;IACpD,sCAAsC,EAAE,OAAO,CAAA;IAC/C,aAAa,CAAC,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,OAAO,CAAA;CACtD;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,cAAc,CAAA;IACxB,kBAAkB,EAAE,kBAAkB,CAAA;IACtC,6DAA6D;IAC7D,+BAA+B,EAAE,OAAO,CAAA;IACxC,qBAAqB,CAAC,EAAE,qBAAqB,CAAA;IAC7C,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,uBAAuB,EAAE,OAAO,CAAA;IAChC,OAAO,EAAE,cAAc,CAAA;IACvB,0BAA0B,EAAE,OAAO,CAAA;IACnC,eAAe,CAAC,EAAE,WAAW,GAAG,WAAW,CAAA;IAC3C,iCAAiC,EAAE,OAAO,CAAA;IAC1C,wBAAwB,EAAE,OAAO,CAAA;IACjC;;;;OAIG;IACH,sBAAsB,EAAE,OAAO,CAAA;IAC/B;;;OAGG;IACH,+BAA+B,EAAE,OAAO,CAAA;IACxC;;;;OAIG;IACH,mBAAmB,EAAE,MAAM,CAAA;IAC3B;;;OAGG;IACH,cAAc,EAAE,OAAO,CAAA;IACvB;;;OAGG;IACH,gBAAgB,EAAE,gBAAgB,CAAA;CACnC;AAED;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG;QACnC,aAAa,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAA;KACvC,CAAA;IACD,kBAAkB,CAAC,EAAE,kBAAkB,CAAA;IACvC,6DAA6D;IAC7D,+BAA+B,CAAC,EAAE,OAAO,CAAA;IACzC,qBAAqB,CAAC,EAAE,qBAAqB,CAAA;IAC7C,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAA;IACjC,0BAA0B,CAAC,EAAE,OAAO,CAAA;IACpC,eAAe,CAAC,EAAE,WAAW,GAAG,WAAW,CAAA;IAC3C,iCAAiC,CAAC,EAAE,OAAO,CAAA;IAC3C,wBAAwB,CAAC,EAAE,OAAO,CAAA;IAClC;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC;;;OAGG;IACH,+BAA+B,CAAC,EAAE,OAAO,CAAA;IACzC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;IACnC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;CAC/C;AAED;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,gBA6BrC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"SuperwallOptions.js","sourceRoot":"","sources":["../../src/SuperwallOptions.ts"],"names":[],"mappings":"AA8NA;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAqB;IACvD,QAAQ,EAAE;QACR,uBAAuB,EAAE,IAAI;QAC7B,aAAa,EAAE;YACb,KAAK,EAAE,uBAAuB;YAC9B,OAAO,EAAE,2DAA2D;YACpE,gBAAgB,EAAE,MAAM;SACzB;QACD,8BAA8B,EAAE,IAAI;QACpC,aAAa,EAAE,KAAK;QACpB,oBAAoB,EAAE,IAAI;QAC1B,yBAAyB,EAAE,SAAS;QACpC,sCAAsC,EAAE,KAAK;KAC9C;IACD,kBAAkB,EAAE,SAAS;IAC7B,+BAA+B,EAAE,IAAI;IACrC,uBAAuB,EAAE,KAAK;IAC9B,OAAO,EAAE;QACP,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,CAAC,KAAK,CAAC;KAChB;IACD,0BAA0B,EAAE,KAAK;IACjC,iCAAiC,EAAE,KAAK;IACxC,wBAAwB,EAAE,KAAK;IAC/B,sBAAsB,EAAE,KAAK;IAC7B,+BAA+B,EAAE,KAAK;IACtC,mBAAmB,EAAE,CAAC;IACtB,cAAc,EAAE,KAAK;IACrB,gBAAgB,EAAE,WAAW;CAC9B,CAAA","sourcesContent":["import type { PaywallInfo } from \"./SuperwallExpoModule.types\"\n\n/**\n * @category Types\n * @since 0.0.15\n * Defines the log levels for the SDK.\n */\nexport type LogLevel = \"debug\" | \"info\" | \"warn\" | \"error\" | \"none\"\n\n/**\n * @category Types\n * @since 0.0.15\n * Defines the scopes for logging within the SDK.\n */\nexport type LogScope =\n | \"localizationManager\"\n | \"bounceButton\"\n | \"coreData\"\n | \"configManager\"\n | \"identityManager\"\n | \"debugManager\"\n | \"debugViewController\"\n | \"localizationViewController\"\n | \"gameControllerManager\"\n | \"device\"\n | \"network\"\n | \"paywallEvents\"\n | \"productsManager\"\n | \"storeKitManager\"\n | \"placements\"\n | \"receipts\"\n | \"superwallCore\"\n | \"paywallPresentation\"\n | \"paywallTransactions\"\n | \"paywallViewController\"\n | \"cache\"\n | \"all\"\n\n/**\n * @category Types\n * @since 0.0.15\n * Defines the network environment for Superwall.\n */\nexport type NetworkEnvironment = \"release\" | \"releaseCandidate\" | \"developer\"\n\n/**\n * @category Types\n * @since 0.0.15\n * Defines the different types of views that can appear behind Apple's payment sheet during a transaction.\n */\nexport type TransactionBackgroundView = \"spinner\" | \"none\"\n\n/**\n * @category Types\n * @since 0.3.0\n * Controls when the SDK enters test mode.\n */\nexport type TestModeBehavior = \"automatic\" | \"whenEnabledForUser\" | \"never\" | \"always\"\n\n/**\n * @category Types\n * @since 1.2.0\n * A local asset that can be registered with Superwall and served to the paywall webview\n * via the `swlocal://<id>` URL scheme.\n *\n * Accepts:\n * - A Metro `require()` result (e.g. `require(\"./hero.png\")`) — resolved through `expo-asset`.\n * - A string URI: `file://`, `content://`, or an absolute path.\n * - An `{ uri: string }` object (matches `Image` source).\n */\nexport type LocalResource = number | string | { uri: string }\n\n/**\n * @category Models\n * @since 0.0.15\n * Defines the messaging of the alert presented to the user when restoring a transaction fails.\n */\nexport interface RestoreFailed {\n title: string\n message: string\n closeButtonTitle: string\n}\n\n/**\n * @category Models\n * @since 0.0.15\n * Options for configuring logging behavior.\n */\nexport interface LoggingOptions {\n level: LogLevel\n scopes: LogScope[]\n}\n\n/**\n * @category Models\n * @since 0.0.15\n * Options for configuring the appearance and behavior of paywalls.\n */\nexport interface PaywallOptions {\n isHapticFeedbackEnabled: boolean\n restoreFailed: RestoreFailed\n shouldShowPurchaseFailureAlert: boolean\n shouldPreload: boolean\n automaticallyDismiss: boolean\n transactionBackgroundView: TransactionBackgroundView\n shouldShowWebPurchaseConfirmationAlert: boolean\n onBackPressed?: (paywallInfo: PaywallInfo) => boolean\n}\n\n/**\n * @category Models\n * @since 0.0.15\n * Options for configuring the Superwall SDK.\n */\nexport interface SuperwallOptions {\n paywalls: PaywallOptions\n networkEnvironment: NetworkEnvironment\n isExternalDataCollectionEnabled: boolean\n localeIdentifier?: string\n isGameControllerEnabled: boolean\n logging: LoggingOptions\n passIdentifiersToPlayStore: boolean\n storeKitVersion?: \"STOREKIT1\" | \"STOREKIT2\"\n enableExperimentalDeviceVariables: boolean\n manualPurchaseManagement: boolean\n /**\n * Observe purchases made outside of Superwall. When true, Superwall will observe\n * StoreKit/Play Store transactions and report them. Defaults to false.\n * @platform iOS and Android\n */\n shouldObservePurchases: boolean\n /**\n * Disables the app transaction check on SDK launch. Defaults to false.\n * @platform iOS only\n */\n shouldBypassAppTransactionCheck: boolean\n /**\n * Number of times the SDK will attempt to get the Superwall configuration after\n * a network failure before it times out. Defaults to 6.\n * @platform iOS only\n */\n maxConfigRetryCount: number\n /**\n * Enable mock review functionality. Defaults to false.\n * @platform Android only\n */\n useMockReviews: boolean\n /**\n * Controls when the SDK enters test mode. Defaults to \"automatic\".\n * @platform iOS and Android\n */\n testModeBehavior: TestModeBehavior\n}\n\n/**\n * @category Types\n * @since 0.2.8\n * Deep partial type for SuperwallOptions, allowing partial configuration at any nesting level.\n */\nexport interface PartialSuperwallOptions {\n paywalls?: Partial<PaywallOptions> & {\n restoreFailed?: Partial<RestoreFailed>\n }\n networkEnvironment?: NetworkEnvironment\n isExternalDataCollectionEnabled?: boolean\n localeIdentifier?: string\n isGameControllerEnabled?: boolean\n logging?: Partial<LoggingOptions>\n passIdentifiersToPlayStore?: boolean\n storeKitVersion?: \"STOREKIT1\" | \"STOREKIT2\"\n enableExperimentalDeviceVariables?: boolean\n manualPurchaseManagement?: boolean\n /**\n * Observe purchases made outside of Superwall. When true, Superwall will observe\n * StoreKit/Play Store transactions and report them. Defaults to false.\n * @platform iOS and Android\n */\n shouldObservePurchases?: boolean\n /**\n * Disables the app transaction check on SDK launch. Defaults to false.\n * @platform iOS only\n */\n shouldBypassAppTransactionCheck?: boolean\n /**\n * Number of times the SDK will attempt to get the Superwall configuration after\n * a network failure before it times out. Defaults to 6.\n * @platform iOS only\n */\n maxConfigRetryCount?: number\n /**\n * Enable mock review functionality. Defaults to false.\n * @platform Android only\n */\n useMockReviews?: boolean\n /**\n * Controls when the SDK enters test mode. Defaults to \"automatic\".\n * @platform iOS and Android\n */\n testModeBehavior?: TestModeBehavior\n /**\n * A mapping of local resource IDs to local assets. The paywall webview can reference\n * these via the `swlocal://<id>` URL scheme.\n *\n * Resolved at configure time. Pass a Metro `require()`, a file URI string, or `{ uri }`.\n *\n * ```ts\n * <SuperwallProvider\n * apiKeys={...}\n * options={{\n * localResources: {\n * \"hero-image\": require(\"./assets/hero.png\"),\n * \"logo\": { uri: FileSystem.documentDirectory + \"logo.png\" },\n * }\n * }}\n * />\n * ```\n *\n * @platform iOS and Android\n */\n localResources?: Record<string, LocalResource>\n}\n\n/**\n * @category Models\n * @since 0.0.15\n * Default options for the Superwall SDK.\n */\nexport const DefaultSuperwallOptions: SuperwallOptions = {\n paywalls: {\n isHapticFeedbackEnabled: true,\n restoreFailed: {\n title: \"No Subscription Found\",\n message: \"We couldn't find an active subscription for your account.\",\n closeButtonTitle: \"Okay\",\n },\n shouldShowPurchaseFailureAlert: true,\n shouldPreload: false,\n automaticallyDismiss: true,\n transactionBackgroundView: \"spinner\",\n shouldShowWebPurchaseConfirmationAlert: false,\n },\n networkEnvironment: \"release\",\n isExternalDataCollectionEnabled: true,\n isGameControllerEnabled: false,\n logging: {\n level: \"info\",\n scopes: [\"all\"],\n },\n passIdentifiersToPlayStore: false,\n enableExperimentalDeviceVariables: false,\n manualPurchaseManagement: false,\n shouldObservePurchases: false,\n shouldBypassAppTransactionCheck: false,\n maxConfigRetryCount: 6,\n useMockReviews: false,\n testModeBehavior: \"automatic\",\n}\n"]}
1
+ {"version":3,"file":"SuperwallOptions.js","sourceRoot":"","sources":["../../src/SuperwallOptions.ts"],"names":[],"mappings":"AA0OA;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAqB;IACvD,QAAQ,EAAE;QACR,uBAAuB,EAAE,IAAI;QAC7B,aAAa,EAAE;YACb,KAAK,EAAE,uBAAuB;YAC9B,OAAO,EAAE,2DAA2D;YACpE,gBAAgB,EAAE,MAAM;SACzB;QACD,8BAA8B,EAAE,IAAI;QACpC,aAAa,EAAE,KAAK;QACpB,oBAAoB,EAAE,IAAI;QAC1B,yBAAyB,EAAE,SAAS;QACpC,sCAAsC,EAAE,KAAK;KAC9C;IACD,kBAAkB,EAAE,SAAS;IAC7B,+BAA+B,EAAE,IAAI;IACrC,uBAAuB,EAAE,KAAK;IAC9B,OAAO,EAAE;QACP,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,CAAC,KAAK,CAAC;KAChB;IACD,0BAA0B,EAAE,KAAK;IACjC,iCAAiC,EAAE,KAAK;IACxC,wBAAwB,EAAE,KAAK;IAC/B,sBAAsB,EAAE,KAAK;IAC7B,+BAA+B,EAAE,KAAK;IACtC,mBAAmB,EAAE,CAAC;IACtB,cAAc,EAAE,KAAK;IACrB,gBAAgB,EAAE,WAAW;CAC9B,CAAA","sourcesContent":["import type { PaywallInfo } from \"./SuperwallExpoModule.types\"\n\n/**\n * @category Types\n * @since 0.0.15\n * Defines the log levels for the SDK.\n */\nexport type LogLevel = \"debug\" | \"info\" | \"warn\" | \"error\" | \"none\"\n\n/**\n * @category Types\n * @since 0.0.15\n * Defines the scopes for logging within the SDK.\n */\nexport type LogScope =\n | \"localizationManager\"\n | \"bounceButton\"\n | \"coreData\"\n | \"configManager\"\n | \"identityManager\"\n | \"debugManager\"\n | \"debugViewController\"\n | \"localizationViewController\"\n | \"gameControllerManager\"\n | \"device\"\n | \"network\"\n | \"paywallEvents\"\n | \"productsManager\"\n | \"storeKitManager\"\n | \"placements\"\n | \"receipts\"\n | \"superwallCore\"\n | \"paywallPresentation\"\n | \"paywallTransactions\"\n | \"paywallViewController\"\n | \"cache\"\n | \"all\"\n\n/**\n * @category Types\n * @since 0.0.15\n * Defines the network environment for Superwall.\n */\nexport type NetworkEnvironment = \"release\" | \"releaseCandidate\" | \"developer\"\n\n/**\n * @category Types\n * @since 0.0.15\n * Defines the different types of views that can appear behind Apple's payment sheet during a transaction.\n */\nexport type TransactionBackgroundView = \"spinner\" | \"none\"\n\n/**\n * @category Types\n * @since 0.3.0\n * Controls when the SDK enters test mode.\n */\nexport type TestModeBehavior = \"automatic\" | \"whenEnabledForUser\" | \"never\" | \"always\"\n\n/**\n * Controls which events Superwall collects, for GDPR/data-collection control.\n * - \"all\": collect all events (default)\n * - \"superwallOnly\": only Superwall-internal events\n * - \"none\": collect nothing\n */\nexport type EventTrackingBehavior = \"all\" | \"superwallOnly\" | \"none\"\n\n/**\n * @category Types\n * @since 1.2.0\n * A local asset that can be registered with Superwall and served to the paywall webview\n * via the `swlocal://<id>` URL scheme.\n *\n * Accepts:\n * - A Metro `require()` result (e.g. `require(\"./hero.png\")`) — resolved through `expo-asset`.\n * - A string URI: `file://`, `content://`, or an absolute path.\n * - An `{ uri: string }` object (matches `Image` source).\n */\nexport type LocalResource = number | string | { uri: string }\n\n/**\n * @category Models\n * @since 0.0.15\n * Defines the messaging of the alert presented to the user when restoring a transaction fails.\n */\nexport interface RestoreFailed {\n title: string\n message: string\n closeButtonTitle: string\n}\n\n/**\n * @category Models\n * @since 0.0.15\n * Options for configuring logging behavior.\n */\nexport interface LoggingOptions {\n level: LogLevel\n scopes: LogScope[]\n}\n\n/**\n * @category Models\n * @since 0.0.15\n * Options for configuring the appearance and behavior of paywalls.\n */\nexport interface PaywallOptions {\n isHapticFeedbackEnabled: boolean\n restoreFailed: RestoreFailed\n shouldShowPurchaseFailureAlert: boolean\n shouldPreload: boolean\n automaticallyDismiss: boolean\n transactionBackgroundView: TransactionBackgroundView\n shouldShowWebPurchaseConfirmationAlert: boolean\n onBackPressed?: (paywallInfo: PaywallInfo) => boolean\n}\n\n/**\n * @category Models\n * @since 0.0.15\n * Options for configuring the Superwall SDK.\n */\nexport interface SuperwallOptions {\n paywalls: PaywallOptions\n networkEnvironment: NetworkEnvironment\n /** @deprecated Use {@link eventTrackingBehavior} instead. */\n isExternalDataCollectionEnabled: boolean\n eventTrackingBehavior?: EventTrackingBehavior\n localeIdentifier?: string\n isGameControllerEnabled: boolean\n logging: LoggingOptions\n passIdentifiersToPlayStore: boolean\n storeKitVersion?: \"STOREKIT1\" | \"STOREKIT2\"\n enableExperimentalDeviceVariables: boolean\n manualPurchaseManagement: boolean\n /**\n * Observe purchases made outside of Superwall. When true, Superwall will observe\n * StoreKit/Play Store transactions and report them. Defaults to false.\n * @platform iOS and Android\n */\n shouldObservePurchases: boolean\n /**\n * Disables the app transaction check on SDK launch. Defaults to false.\n * @platform iOS only\n */\n shouldBypassAppTransactionCheck: boolean\n /**\n * Number of times the SDK will attempt to get the Superwall configuration after\n * a network failure before it times out. Defaults to 6.\n * @platform iOS only\n */\n maxConfigRetryCount: number\n /**\n * Enable mock review functionality. Defaults to false.\n * @platform Android only\n */\n useMockReviews: boolean\n /**\n * Controls when the SDK enters test mode. Defaults to \"automatic\".\n * @platform iOS and Android\n */\n testModeBehavior: TestModeBehavior\n}\n\n/**\n * @category Types\n * @since 0.2.8\n * Deep partial type for SuperwallOptions, allowing partial configuration at any nesting level.\n */\nexport interface PartialSuperwallOptions {\n paywalls?: Partial<PaywallOptions> & {\n restoreFailed?: Partial<RestoreFailed>\n }\n networkEnvironment?: NetworkEnvironment\n /** @deprecated Use {@link eventTrackingBehavior} instead. */\n isExternalDataCollectionEnabled?: boolean\n eventTrackingBehavior?: EventTrackingBehavior\n localeIdentifier?: string\n isGameControllerEnabled?: boolean\n logging?: Partial<LoggingOptions>\n passIdentifiersToPlayStore?: boolean\n storeKitVersion?: \"STOREKIT1\" | \"STOREKIT2\"\n enableExperimentalDeviceVariables?: boolean\n manualPurchaseManagement?: boolean\n /**\n * Observe purchases made outside of Superwall. When true, Superwall will observe\n * StoreKit/Play Store transactions and report them. Defaults to false.\n * @platform iOS and Android\n */\n shouldObservePurchases?: boolean\n /**\n * Disables the app transaction check on SDK launch. Defaults to false.\n * @platform iOS only\n */\n shouldBypassAppTransactionCheck?: boolean\n /**\n * Number of times the SDK will attempt to get the Superwall configuration after\n * a network failure before it times out. Defaults to 6.\n * @platform iOS only\n */\n maxConfigRetryCount?: number\n /**\n * Enable mock review functionality. Defaults to false.\n * @platform Android only\n */\n useMockReviews?: boolean\n /**\n * Controls when the SDK enters test mode. Defaults to \"automatic\".\n * @platform iOS and Android\n */\n testModeBehavior?: TestModeBehavior\n /**\n * A mapping of local resource IDs to local assets. The paywall webview can reference\n * these via the `swlocal://<id>` URL scheme.\n *\n * Resolved at configure time. Pass a Metro `require()`, a file URI string, or `{ uri }`.\n *\n * ```ts\n * <SuperwallProvider\n * apiKeys={...}\n * options={{\n * localResources: {\n * \"hero-image\": require(\"./assets/hero.png\"),\n * \"logo\": { uri: FileSystem.documentDirectory + \"logo.png\" },\n * }\n * }}\n * />\n * ```\n *\n * @platform iOS and Android\n */\n localResources?: Record<string, LocalResource>\n}\n\n/**\n * @category Models\n * @since 0.0.15\n * Default options for the Superwall SDK.\n */\nexport const DefaultSuperwallOptions: SuperwallOptions = {\n paywalls: {\n isHapticFeedbackEnabled: true,\n restoreFailed: {\n title: \"No Subscription Found\",\n message: \"We couldn't find an active subscription for your account.\",\n closeButtonTitle: \"Okay\",\n },\n shouldShowPurchaseFailureAlert: true,\n shouldPreload: false,\n automaticallyDismiss: true,\n transactionBackgroundView: \"spinner\",\n shouldShowWebPurchaseConfirmationAlert: false,\n },\n networkEnvironment: \"release\",\n isExternalDataCollectionEnabled: true,\n isGameControllerEnabled: false,\n logging: {\n level: \"info\",\n scopes: [\"all\"],\n },\n passIdentifiersToPlayStore: false,\n enableExperimentalDeviceVariables: false,\n manualPurchaseManagement: false,\n shouldObservePurchases: false,\n shouldBypassAppTransactionCheck: false,\n maxConfigRetryCount: 6,\n useMockReviews: false,\n testModeBehavior: \"automatic\",\n}\n"]}
@@ -10,13 +10,14 @@ import type { PresentationResult } from "./lib/PresentationResult";
10
10
  import type { PurchaseController } from "./lib/PurchaseController";
11
11
  import { SubscriptionStatus } from "./lib/SubscriptionStatus";
12
12
  import type { SuperwallDelegate } from "./lib/SuperwallDelegate";
13
- import { type PartialSuperwallOptions } from "./lib/SuperwallOptions";
13
+ import { type EventTrackingBehavior, type PartialSuperwallOptions } from "./lib/SuperwallOptions";
14
14
  export { PaywallResult } from "./lib/PaywallResult";
15
15
  export { PresentationResult, PresentationResultHoldout, PresentationResultNoAudienceMatch, PresentationResultPaywall, PresentationResultPaywallNotAvailable, PresentationResultPlacementNotFound, PresentationResultUserIsSubscribed, } from "./lib/PresentationResult";
16
16
  import type { RestorationResultResponse } from "../SuperwallExpoModule.types";
17
+ export type { RestorationResultResponse } from "../SuperwallExpoModule.types";
17
18
  export { ComputedPropertyRequest } from "./lib/ComputedPropertyRequest";
18
19
  export { ConfigurationStatus } from "./lib/ConfigurationStatus";
19
- export { CustomerInfo, type SubscriptionTransaction, type NonSubscriptionTransaction, type SubscriptionOfferType, } from "./lib/CustomerInfo";
20
+ export { CustomerInfo, type NonSubscriptionTransaction, type SubscriptionOfferType, type SubscriptionTransaction, } from "./lib/CustomerInfo";
20
21
  export { EntitlementsInfo } from "./lib/EntitlementsInfo";
21
22
  export { Experiment } from "./lib/Experiment";
22
23
  export { FeatureGatingBehavior } from "./lib/FeatureGatingBehavior";
@@ -31,12 +32,11 @@ export { PaywallOptions, TransactionBackgroundView, } from "./lib/PaywallOptions
31
32
  export { PaywallPresentationHandler } from "./lib/PaywallPresentationHandler";
32
33
  export { PaywallPresentationRequestStatus } from "./lib/PaywallPresentationRequestStatus";
33
34
  export { PaywallSkippedReason, PaywallSkippedReasonHoldout, PaywallSkippedReasonNoAudienceMatch, PaywallSkippedReasonPlacementNotFound, PaywallSkippedReasonUserIsSubscribed, } from "./lib/PaywallSkippedReason";
34
- export { Product, ProductStore, type AppStoreProductIdentifier, type StripeProductIdentifier, type PaddleProductIdentifier, type CustomStoreProductIdentifier, } from "./lib/Product";
35
+ export { type AppStoreProductIdentifier, type CustomStoreProductIdentifier, type PaddleProductIdentifier, Product, ProductStore, type StripeProductIdentifier, } from "./lib/Product";
35
36
  export { PurchaseController } from "./lib/PurchaseController";
36
37
  export { PurchaseResult, PurchaseResultCancelled, PurchaseResultFailed, PurchaseResultPending, PurchaseResultPurchased, } from "./lib/PurchaseResult";
37
38
  export * from "./lib/RedemptionResults";
38
39
  export { RestorationResult } from "./lib/RestorationResult";
39
- export type { RestorationResultResponse } from "../SuperwallExpoModule.types";
40
40
  export { RestoreType } from "./lib/RestoreType";
41
41
  export { StoreProduct } from "./lib/StoreProduct";
42
42
  export { StoreTransaction } from "./lib/StoreTransaction";
@@ -354,6 +354,7 @@ export default class Superwall {
354
354
  */
355
355
  dismiss(): Promise<void>;
356
356
  setLogLevel(level: LogLevel): Promise<void>;
357
+ setEventTrackingBehavior(behavior: EventTrackingBehavior): Promise<void>;
357
358
  /**
358
359
  * Sets attributes for third-party integrations.
359
360
  * @param attributes - Object mapping IntegrationAttribute string values to their IDs