expo-superwall 0.6.2 → 0.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.4
4
+
5
+ ### Patch Changes
6
+
7
+ - fedde41: fix: compat superwall options on android
8
+
9
+ ## 0.6.3
10
+
11
+ ### Patch Changes
12
+
13
+ - 0278ad4: bump ios to 4.10.0. This fixes missing localization for app2web restore flow
14
+
3
15
  ## 0.6.2
4
16
 
5
17
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-superwall",
3
- "version": "0.6.2",
3
+ "version": "0.6.4",
4
4
  "description": "Offical Expo Integration for Superwall",
5
5
  "main": "build/src/index.js",
6
6
  "types": "build/src/index.d.ts",
@@ -9,7 +9,7 @@ import type { PresentationResult } from "./lib/PresentationResult";
9
9
  import type { PurchaseController } from "./lib/PurchaseController";
10
10
  import { SubscriptionStatus } from "./lib/SubscriptionStatus";
11
11
  import type { SuperwallDelegate } from "./lib/SuperwallDelegate";
12
- import type { SuperwallOptions } from "./lib/SuperwallOptions";
12
+ import { SuperwallOptions } from "./lib/SuperwallOptions";
13
13
  export { PaywallResult } from "./lib/PaywallResult";
14
14
  export { ComputedPropertyRequest } from "./lib/ComputedPropertyRequest";
15
15
  export { ConfigurationStatus } from "./lib/ConfigurationStatus";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/compat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM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GAAG,OAAO,CAAC,IAAI,CAAC;IAKzE;;;;OAIG;IACG,iBAAiB,IAAI,OAAO,CAAC,cAAc,CAAC;IAMlD;;;;;;;;;OASG;IACG,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IAKzC;;;;;;;;;;;OAWG;IACG,eAAe,CAAC,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAKjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACG,iBAAiB,CAAC,cAAc,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAKtE;;;;;OAKG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAIxB,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;CAGlD"}
@@ -8,6 +8,7 @@ import { PaywallSkippedReason } from "./lib/PaywallSkippedReason";
8
8
  import { RedemptionResults } from "./lib/RedemptionResults";
9
9
  import { SubscriptionStatus } from "./lib/SubscriptionStatus";
10
10
  import { SuperwallEventInfo } from "./lib/SuperwallEventInfo";
11
+ import { SuperwallOptions } from "./lib/SuperwallOptions";
11
12
  import { EventEmitter } from "expo";
12
13
  import { version } from "../../package.json";
13
14
  import SuperwallExpoModule from "../SuperwallExpoModule";
@@ -213,7 +214,11 @@ export default class Superwall {
213
214
  */
214
215
  static async configure({ apiKey, options, purchaseController, completion, }) {
215
216
  Superwall.purchaseController = purchaseController;
216
- await SuperwallExpoModule.configure(apiKey, options?.toJson(), !!purchaseController, `${version}compat`);
217
+ // Ensure options is always a SuperwallOptions instance with defaults
218
+ const superwallOptions = options instanceof SuperwallOptions
219
+ ? options
220
+ : new SuperwallOptions(options);
221
+ await SuperwallExpoModule.configure(apiKey, superwallOptions.toJson(), !!purchaseController, `${version}compat`);
217
222
  completion?.();
218
223
  Superwall.setDidConfigure(true);
219
224
  return Superwall._superwall;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRo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;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,WAAW,CAAC,QAAuC;QACvD,MAAM,IAAI,CAAC,WAAW,EAAE,CAAA;QACxB,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC/B,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,iBAAiB;QACrB,MAAM,IAAI,CAAC,WAAW,EAAE,CAAA;QACxB,MAAM,cAAc,GAAmB,MAAM,mBAAmB,CAAC,iBAAiB,EAAE,CAAA;QACpF,OAAO,cAAc,CAAA;IACvB,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,kBAAkB;QACtB,MAAM,IAAI,CAAC,WAAW,EAAE,CAAA;QACxB,MAAM,mBAAmB,CAAC,kBAAkB,EAAE,CAAA;IAChD,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,eAAe,CAAC,cAA2B;QAC/C,MAAM,IAAI,CAAC,WAAW,EAAE,CAAA;QACxB,MAAM,mBAAmB,CAAC,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAA;IACvE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,KAAK,CAAC,iBAAiB,CAAC,cAA8B;QACpD,MAAM,IAAI,CAAC,WAAW,EAAE,CAAA;QACxB,MAAM,mBAAmB,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAA;IAC7D,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,OAAO;QACX,MAAM,mBAAmB,CAAC,OAAO,EAAE,CAAA;IACrC,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,KAAe;QAC/B,MAAM,mBAAmB,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAA;IACzD,CAAC","sourcesContent":["import { Assignment } from \"./lib/Assigments\"\nimport { ConfigurationStatus } from \"./lib/ConfigurationStatus\"\nimport { EntitlementsInfo } from \"./lib/EntitlementsInfo\"\nimport { IdentityOptions } from \"./lib/IdentityOptions\"\nimport type { InterfaceStyle } from \"./lib/InterfaceStyle\"\nimport type { LogLevel } from \"./lib/LogLevel\"\nimport { PaywallInfo } from \"./lib/PaywallInfo\"\nimport type { PaywallPresentationHandler } from \"./lib/PaywallPresentationHandler\"\nimport { fromJson as paywallResultFromJson } from \"./lib/PaywallResult\"\nimport { PaywallSkippedReason } from \"./lib/PaywallSkippedReason\"\nimport type { PresentationResult } from \"./lib/PresentationResult\"\nimport type { PurchaseController } from \"./lib/PurchaseController\"\nimport { RedemptionResults } from \"./lib/RedemptionResults\"\nimport { SubscriptionStatus } from \"./lib/SubscriptionStatus\"\nimport type { SuperwallDelegate } from \"./lib/SuperwallDelegate\"\nimport { SuperwallEventInfo } from \"./lib/SuperwallEventInfo\"\nimport type { SuperwallOptions } from \"./lib/SuperwallOptions\"\n\nexport { PaywallResult } from \"./lib/PaywallResult\"\n\nimport { EventEmitter } from \"expo\"\nimport { version } from \"../../package.json\"\nimport SuperwallExpoModule from \"../SuperwallExpoModule\"\n\nexport { ComputedPropertyRequest } from \"./lib/ComputedPropertyRequest\"\nexport { ConfigurationStatus } from \"./lib/ConfigurationStatus\"\nexport { EntitlementsInfo } from \"./lib/EntitlementsInfo\"\nexport { Experiment } from \"./lib/Experiment\"\nexport { FeatureGatingBehavior } from \"./lib/FeatureGatingBehavior\"\nexport { IdentityOptions } from \"./lib/IdentityOptions\"\nexport { InterfaceStyle } from \"./lib/InterfaceStyle\"\nexport { LocalNotification } from \"./lib/LocalNotification\"\nexport { LogLevel } from \"./lib/LogLevel\"\nexport { LogScope } from \"./lib/LogScope\"\nexport { PaywallCloseReason } from \"./lib/PaywallCloseReason\"\nexport { PaywallInfo } from \"./lib/PaywallInfo\"\nexport {\n PaywallOptions,\n TransactionBackgroundView,\n} from \"./lib/PaywallOptions\"\nexport { PaywallPresentationHandler } from \"./lib/PaywallPresentationHandler\"\nexport { PaywallPresentationRequestStatus } from \"./lib/PaywallPresentationRequestStatus\"\nexport {\n PaywallSkippedReason,\n PaywallSkippedReasonHoldout,\n PaywallSkippedReasonNoAudienceMatch,\n PaywallSkippedReasonPlacementNotFound,\n PaywallSkippedReasonUserIsSubscribed,\n} from \"./lib/PaywallSkippedReason\"\nexport { Product } from \"./lib/Product\"\nexport { PurchaseController } from \"./lib/PurchaseController\"\nexport {\n PurchaseResult,\n PurchaseResultCancelled,\n PurchaseResultFailed,\n PurchaseResultPending,\n PurchaseResultPurchased,\n} from \"./lib/PurchaseResult\"\nexport * from \"./lib/RedemptionResults\"\nexport { RestorationResult } from \"./lib/RestorationResult\"\nexport { RestoreType } from \"./lib/RestoreType\"\nexport { StoreTransaction } from \"./lib/StoreTransaction\"\nexport { StoreProduct } from \"./lib/StoreProduct\"\nexport { SubscriptionStatus } from \"./lib/SubscriptionStatus\"\nexport { SuperwallDelegate } from \"./lib/SuperwallDelegate\"\nexport { EventType, SuperwallEventInfo } from \"./lib/SuperwallEventInfo\"\nexport { SuperwallOptions } from \"./lib/SuperwallOptions\"\nexport { Survey } from \"./lib/Survey\"\nexport { TriggerResult } from \"./lib/TriggerResult\"\n\ninterface UserAttributes {\n [key: string]: any\n}\n\nexport default class Superwall {\n static purchaseController?: PurchaseController\n private static delegate?: SuperwallDelegate\n private static _superwall = new Superwall()\n\n private static configEmitter = new EventEmitter<{\n configured: (isConfigured: boolean) => void\n }>()\n private static didConfigure = false\n private presentationHandlers: Map<string, PaywallPresentationHandler> = new Map()\n subscriptionStatusEmitter = new EventEmitter<{\n change: (status: SubscriptionStatus) => void\n }>()\n\n private static setDidConfigure(didConfigure: boolean) {\n Superwall.didConfigure = didConfigure\n // Emit an event when the bridged state is true\n if (didConfigure) {\n Superwall.configEmitter.emit(\"configured\", didConfigure)\n }\n }\n\n private async awaitConfig(): Promise<void> {\n if (Superwall.didConfigure) {\n return\n }\n\n await new Promise<void>((resolve) => {\n Superwall.configEmitter.addListener(\"configured\", () => {\n resolve()\n })\n })\n }\n\n private constructor() {\n SuperwallExpoModule.addListener(\"onPurchase\", async (data) => {\n if (data.platform === \"ios\") {\n const purchaseResult = await Superwall.purchaseController?.purchaseFromAppStore(\n data.productId,\n )\n if (purchaseResult == null) {\n return\n }\n await SuperwallExpoModule.didPurchase(purchaseResult.toJSON())\n return\n }\n\n if (data.platform === \"android\") {\n const purchaseResult = await Superwall.purchaseController?.purchaseFromGooglePlay(\n data.productId,\n data.basePlanId,\n data.offerId,\n )\n if (purchaseResult == null) {\n return\n }\n await SuperwallExpoModule.didPurchase(purchaseResult.toJSON())\n }\n })\n\n SuperwallExpoModule.addListener(\"onPurchaseRestore\", async () => {\n const restorationResult = await Superwall.purchaseController?.restorePurchases()\n if (restorationResult == null) {\n return\n }\n await SuperwallExpoModule.didRestore(restorationResult.toJson())\n })\n\n SuperwallExpoModule.addListener(\"onPaywallPresent\", (data) => {\n const handler = this.presentationHandlers.get(data.handlerId)\n if (!handler || !handler.onPresentHandler) {\n return\n }\n\n const paywallInfo = PaywallInfo.fromJson(data.paywallInfoJson)\n handler.onPresentHandler(paywallInfo)\n })\n SuperwallExpoModule.addListener(\"onPaywallDismiss\", (data) => {\n const handler = this.presentationHandlers.get(data.handlerId)\n\n if (!handler || !handler.onDismissHandler) {\n return\n }\n\n const info = PaywallInfo.fromJson(data.paywallInfoJson)\n const result = paywallResultFromJson(data.result)\n handler.onDismissHandler(info, result)\n })\n\n SuperwallExpoModule.addListener(\"onPaywallError\", (data) => {\n const handler = this.presentationHandlers.get(data.handlerId)\n\n if (!handler || !handler.onErrorHandler) {\n return\n }\n\n handler.onErrorHandler(data.errorString)\n })\n\n SuperwallExpoModule.addListener(\"onPaywallSkip\", (data) => {\n const handler = this.presentationHandlers.get(data.handlerId)\n\n if (!handler || !handler.onSkipHandler) {\n return\n }\n\n const skippedReason = PaywallSkippedReason.fromJson(data.skippedReason)\n handler.onSkipHandler(skippedReason)\n })\n\n SuperwallExpoModule.addListener(\"onPaywallPresent\", (data) => {\n const handler = this.presentationHandlers.get(data.handlerId)\n\n if (!handler || !handler.onPresentHandler) {\n return\n }\n\n const info = PaywallInfo.fromJson(data.paywallInfoJson)\n handler.onPresentHandler(info)\n })\n\n // MARK: - SuperwallDelegate Listeners\n SuperwallExpoModule.addListener(\"subscriptionStatusDidChange\", async (data) => {\n Superwall.delegate?.subscriptionStatusDidChange(data.from, data.to)\n })\n\n SuperwallExpoModule.addListener(\"handleSuperwallEvent\", async (data) => {\n const eventInfo = SuperwallEventInfo.fromJson(data.eventInfo)\n Superwall.delegate?.handleSuperwallEvent(eventInfo)\n })\n\n SuperwallExpoModule.addListener(\"handleCustomPaywallAction\", async (data) => {\n const name = data.name\n Superwall.delegate?.handleCustomPaywallAction(name)\n })\n\n SuperwallExpoModule.addListener(\"willDismissPaywall\", async (data) => {\n const info = PaywallInfo.fromJson(data.info)\n Superwall.delegate?.willDismissPaywall(info)\n })\n\n SuperwallExpoModule.addListener(\"willPresentPaywall\", async (data) => {\n const info = PaywallInfo.fromJson(data.info)\n Superwall.delegate?.willPresentPaywall(info)\n })\n\n SuperwallExpoModule.addListener(\"didDismissPaywall\", async (data) => {\n const info = PaywallInfo.fromJson(data.info)\n Superwall.delegate?.didDismissPaywall(info)\n })\n\n SuperwallExpoModule.addListener(\"didPresentPaywall\", async (data) => {\n const info = PaywallInfo.fromJson(data.info)\n Superwall.delegate?.didPresentPaywall(info)\n })\n\n SuperwallExpoModule.addListener(\"handleLog\", async (data) => {\n Superwall.delegate?.handleLog(\n data.level,\n data.scope,\n data.message || undefined,\n data.info,\n data.error,\n )\n })\n\n SuperwallExpoModule.addListener(\"paywallWillOpenDeepLink\", async (data) => {\n const url = new URL(data.url)\n Superwall.delegate?.paywallWillOpenDeepLink(url)\n })\n\n SuperwallExpoModule.addListener(\"paywallWillOpenURL\", async (data) => {\n const url = new URL(data.url)\n Superwall.delegate?.paywallWillOpenURL(url)\n })\n\n SuperwallExpoModule.addListener(\"willRedeemLink\", async () => {\n Superwall.delegate?.willRedeemLink()\n })\n\n SuperwallExpoModule.addListener(\"didRedeemLink\", async (data) => {\n const result = RedemptionResults.fromJson(data)\n Superwall.delegate?.didRedeemLink(result)\n })\n\n SuperwallExpoModule.addListener(\"subscriptionStatusDidChange\", async (data) => {\n this.subscriptionStatusEmitter.emit(\"change\", data.to)\n })\n }\n\n /**\n * Returns the configured shared instance of `Superwall`.\n *\n * **Warning:** You must call {@link Superwall.configure} to initialize `Superwall`\n * before accessing this shared instance.\n *\n * @returns {Superwall} The shared `Superwall` instance.\n */\n static get shared(): Superwall {\n return Superwall._superwall\n }\n\n /**\n * Configures a shared instance of `Superwall` for use throughout your app.\n *\n * Call this as soon as your app starts to initialize the Superwall SDK.\n * Check out [Configuring the SDK](https://docs.superwall.com/docs/configuring-the-sdk) for information about how to configure the SDK.\n *\n * @param {object} config - Configuration object.\n * @param {string} config.apiKey - Your lib API Key that you can get from the Superwall dashboard settings.\n * If you don't have an account, you can [sign up for free](https://superwall.com/sign-up).\n * @param {SuperwallOptions} [config.options] - An optional object which allows you to customize the appearance and behavior\n * of the paywall.\n * @param {PurchaseController} [config.purchaseController] - An optional object that conforms to `PurchaseController`.\n * Implement this if you'd like to handle all subscription-related logic yourself. You'll need to also set the `subscriptionStatus`\n * every time the user's entitlements change. You can read more about that in [Purchases and Subscription Status](https://docs.superwall.com/docs/advanced-configuration).\n * If omitted, Superwall will handle all subscription-related logic itself.\n * @param {() => void} [config.completion] - An optional completion handler that lets you know when Superwall has finished configuring.\n *\n * @returns {Promise<Superwall>} The configured `Superwall` instance.\n */\n static async configure({\n apiKey,\n options,\n purchaseController,\n completion,\n }: {\n apiKey: string\n options?: SuperwallOptions\n purchaseController?: PurchaseController\n completion?: () => void\n }): Promise<Superwall> {\n Superwall.purchaseController = purchaseController\n await SuperwallExpoModule.configure(\n apiKey,\n options?.toJson(),\n !!purchaseController,\n `${version}compat`,\n )\n\n completion?.()\n\n Superwall.setDidConfigure(true)\n\n return Superwall._superwall\n }\n\n /**\n * Creates an account with Superwall by linking the provided `userId` to Superwall's automatically generated alias.\n *\n * Call this function as soon as you have a valid `userId`.\n *\n * @param {Object} config - The identification configuration object.\n * @param {string} config.userId - Your user's unique identifier as defined by your backend system.\n * @param {IdentityOptions} [config.options] - An optional {@link IdentityOptions} object. You can set the\n * {@link IdentityOptions.restorePaywallAssignments} property to `true` to instruct the SDK to wait to restore paywall assignments\n * from the server before presenting any paywalls. This option should be used only in advanced cases\n * (e.g., when users frequently switch accounts or reinstall the app).\n *\n * @returns {Promise<void>} A promise that resolves once the identification process is complete.\n */\n async identify({\n userId,\n options,\n }: {\n userId: string\n options?: IdentityOptions\n }): Promise<void> {\n await this.awaitConfig()\n const serializedOptions = options ? options.toJson() : new IdentityOptions().toJson()\n await SuperwallExpoModule.identify(userId, serializedOptions)\n }\n\n /**\n * Resets the `userId`, on-device paywall assignments, and data stored by Superwall.\n *\n * @returns {Promise<void>} A promise that resolves once reset is complete.\n */\n async reset(): Promise<void> {\n await this.awaitConfig()\n await SuperwallExpoModule.reset()\n }\n\n /**\n * Handles a deep link.\n *\n * @param {string} url - The deep link to handle.\n * @returns {Promise<Boolean>} A promise that resolves to a boolean indicating whether the deep link was handled.\n */\n async handleDeepLink(url: string): Promise<boolean> {\n await this.awaitConfig()\n return await SuperwallExpoModule.handleDeepLink(url)\n }\n\n /**\n * Registers a placement to access a feature.\n *\n * When the placement is added to a campaign on the [Superwall Dashboard](https://superwall.com/dashboard),\n * it can trigger a paywall if the following conditions are met:\n * - The provided placement is included in a campaign on the Superwall Dashboard.\n * - The user matches an audience filter defined in the campaign.\n * - The user does not have an active subscription.\n *\n * Before using this method, ensure you have created a campaign and added the placement on the\n * [Superwall Dashboard](https://superwall.com/dashboard).\n *\n * The displayed paywall is determined by the audience filters set in the campaign.\n * Once a user is assigned a paywall within an audience, that paywall will continue to be shown unless\n * you remove it from the audience or reset the paywall assignments.\n *\n * @param {string} [params.placement] - The name of the placement to register.\n * @param {Map<string, any> | Record<string, any>} [params.params] - Optional parameters to pass with your placement.\n * These parameters can be referenced within the audience filters of your campaign. Keys beginning with `$`\n * are reserved for Superwall and will be omitted. Values can be any JSON-encodable value, URL, or Date.\n * Arrays and dictionaries are not supported and will be dropped.\n * @param {PaywallPresentationHandler} [params.handler] - An optional handler that receives status updates\n * about the paywall presentation.\n * @param {() => void} [params.feature] - An optional callback that will be executed after registration completes.\n * If provided, this callback will be executed after the registration process completes successfully.\n * If not provided, you can chain a `.then()` block to the returned promise to execute your feature logic.\n *\n * @returns {Promise<void>} if [feature] is provided this promise resolves when register is executed, otherwise a promise that resolves when register completes successfully after which you can chain a `.then()` block to execute your feature logic.\n *\n * @remarks\n * This behavior is remotely configurable via the [Superwall Dashboard](https://superwall.com/dashboard):\n *\n * - For _Non Gated_ paywalls, the feature block is executed when the paywall is dismissed or if the user is already paying.\n * - For _Gated_ paywalls, the feature block is executed only if the user is already paying or if they begin paying.\n * - If no paywall is configured, the feature block is executed immediately.\n * - If no feature block is provided, the returned promise will resolve when registration completes.\n * - If a feature block is provided, the returned promise will always resolve after the feature block is executed.\n * Note: The feature block will not be executed if an error occurs during registration. Such errors can be detected via the\n * `handler`.\n *\n * @example\n * // Using the feature callback:\n * Superwall.register({\n * placement: \"somePlacement\",\n * feature: () => {\n * console.log(\"Feature logic executed after registration\");\n * }\n * });\n *\n * // Alternatively, chaining feature logic after registration:\n * Superwall.register({ placement: \"somePlacement\" })\n * .then(() => {\n * // Execute your feature logic here after registration.\n * console.log(\"Placement registered, now executing feature logic.\");\n * })\n */\n async register(params: {\n placement: string\n params?: Map<string, any> | Record<string, any>\n handler?: PaywallPresentationHandler\n feature?: () => void\n }): Promise<void> {\n await this.awaitConfig()\n let handlerId: string | null = null\n\n if (params.handler) {\n const uuid = (+new Date() * Math.random()).toString(36)\n this.presentationHandlers.set(uuid, params.handler)\n handlerId = uuid\n }\n\n let paramsObject = {}\n if (params.params) {\n paramsObject =\n params.params instanceof Map ? Object.fromEntries(params.params) : params.params\n }\n\n if (params.feature) {\n return await SuperwallExpoModule.registerPlacement(\n params.placement,\n paramsObject,\n handlerId,\n ).then(() => {\n params.feature!() //TODO: This is wrong, the feature should be executed only if the native SDK calls the feature block\n // not after awaiting the promise\n })\n }\n\n return SuperwallExpoModule.registerPlacement(params.placement, paramsObject, handlerId)\n }\n\n /**\n * Confirms all experiment assignments and returns them in an array.\n *\n * Note that the assignments may differ when a placement is registered due to changes\n * in user, placement, or device parameters used in audience filters.\n *\n * @returns {Promise<Assignment[]>} A promise that resolves to an array of {@link Assignment} objects.\n */\n async confirmAllAssignments(): Promise<Assignment[]> {\n await this.awaitConfig()\n const assignments = await SuperwallExpoModule.confirmAllAssignments()\n return assignments.map((assignment: any) => Assignment.fromJson(assignment))\n }\n\n /**\n * Gets all the experiment assignments and returns them in an array.\n *\n * This method tracks the {@link SuperwallEvent.getAssignments} event in the delegate.\n *\n * Note that the assignments may differ when a placement is registered due to changes\n * in user, placement, or device parameters used in audience filters.\n *\n * @returns {Promise<Assignment[]>} A promise that resolves to an array of {@link Assignment} objects.\n */\n async getAssignments(): Promise<Assignment[]> {\n await this.awaitConfig()\n const assignments = await SuperwallExpoModule.getAssignments()\n return assignments.map((assignment: any) => Assignment.fromJson(assignment))\n }\n\n /**\n * Preemptively gets the result of registering a placement.\n *\n * This helps you determine whether a particular placement will present a paywall in the future.\n * Note that this method does not present a paywall. To present a paywall, use the `register` function.\n *\n * @param {Object} options - Options for obtaining the presentation result.\n * @param {string} options.placement - The name of the placement you want to register.\n * @param {Map<string, any>} [options.params] - Optional parameters to pass with your placement.\n *\n * @returns {Promise<PresentationResult>} A promise that resolves to a {@link PresentationResult} indicating the result of registering the placement.\n */\n async getPresentationResult({\n placement,\n params,\n }: {\n placement: string\n params?: Map<string, any>\n }): Promise<PresentationResult> {\n await this.awaitConfig()\n let paramsObject = {}\n if (params) {\n paramsObject = Object.fromEntries(params)\n }\n return await SuperwallExpoModule.getPresentationResult(placement, paramsObject)\n }\n\n /**\n * Retrieves the current configuration status of the Superwall SDK.\n *\n * This function returns a promise that resolves to the current configuration status,\n * indicating whether the SDK has finished configuring. Initially, the status is\n * {@link ConfigurationStatus.PENDING}. Once the configuration completes successfully, it\n * changes to {@link ConfigurationStatus.CONFIGURED}. If the configuration fails, the status\n * will be {@link ConfigurationStatus.FAILED}.\n *\n * @returns {Promise<ConfigurationStatus>} A promise that resolves with the current configuration status.\n */\n async getConfigurationStatus(): Promise<ConfigurationStatus> {\n const configurationStatusString = await SuperwallExpoModule.getConfigurationStatus()\n return ConfigurationStatus.fromString(configurationStatusString)\n }\n\n /**\n * Retrieves the entitlements tied to the device.\n *\n * @returns {Promise<EntitlementsInfo>} A promise that resolves to an {@link EntitlementsInfo} object.\n */\n async getEntitlements(): Promise<EntitlementsInfo> {\n await this.awaitConfig()\n const entitlementsJson = await SuperwallExpoModule.getEntitlements()\n return EntitlementsInfo.fromObject(entitlementsJson)\n }\n\n /**\n * Sets the subscription status of the user.\n *\n * When using a PurchaseController, you must call this method to update the user's subscription status.\n * Alternatively, you can implement the {@link SuperwallDelegate.subscriptionStatusDidChange} delegate callback to receive notifications\n * whenever the subscription status changes.\n *\n * @param {SubscriptionStatus} status - The new subscription status.\n *\n * @returns {Promise<void>} A promise that resolves once the subscription status has been updated.\n */\n async setSubscriptionStatus(status: SubscriptionStatus): Promise<void> {\n await this.awaitConfig()\n await SuperwallExpoModule.setSubscriptionStatus(status)\n }\n\n async getSubscriptionStatus(): Promise<SubscriptionStatus> {\n await this.awaitConfig()\n const subscriptionStatusData = await SuperwallExpoModule.getSubscriptionStatus()\n return SubscriptionStatus.fromJson(subscriptionStatusData)\n }\n /**\n * Sets the user interface style, which overrides the system setting.\n *\n * Provide a value of type {@link InterfaceStyle} to explicitly set the interface style.\n * Pass `null` to revert back to the system's default interface style.\n *\n * @param {InterfaceStyle | null} style - The desired interface style, or `null` to use the system setting.\n *\n * @returns {Promise<void>} A promise that resolves once the interface style has been updated.\n */\n async setInterfaceStyle(style: InterfaceStyle | null): Promise<void> {\n await SuperwallExpoModule.setInterfaceStyle(style?.toString())\n }\n\n /**\n * Sets the delegate that handles Superwall lifecycle events.\n *\n * @param {SuperwallDelegate | undefined} delegate - An object implementing the {@link SuperwallDelegate} interface,\n * or `undefined` to remove the current delegate.\n *\n * @returns {Promise<void>} A promise that resolves once the delegate has been updated.\n */\n async setDelegate(delegate: SuperwallDelegate | undefined): Promise<void> {\n await this.awaitConfig()\n Superwall.delegate = delegate\n }\n\n /**\n * Retrieves the user attributes, set using {@link setUserAttributes}.\n *\n * @returns {Promise<UserAttributes>} A promise that resolves with an object representing the user's attributes.\n */\n async getUserAttributes(): Promise<UserAttributes> {\n await this.awaitConfig()\n const userAttributes: UserAttributes = await SuperwallExpoModule.getUserAttributes()\n return userAttributes\n }\n\n /**\n * Preloads all paywalls that the user may see based on campaigns and placements in your Superwall dashboard.\n *\n * To use this, first set `PaywallOptions.shouldPreload` to `false` when configuring the SDK.\n * Then call this function when you want preloading to begin.\n *\n * Note: This method will not reload any paywalls that have already been preloaded via {@link preloadPaywalls}.\n *\n * @returns {Promise<void>} A promise that resolves once the preloading process has been initiated.\n */\n async preloadAllPaywalls(): Promise<void> {\n await this.awaitConfig()\n await SuperwallExpoModule.preloadAllPaywalls()\n }\n\n /**\n * Preloads paywalls for specific placements.\n *\n * To use this method, first ensure that {@link PaywallOptions.shouldPreload} is set to `false` when configuring the SDK.\n * Then call this function when you want to initiate preloading for selected placements.\n *\n * Note: This will not reload any paywalls you've already preloaded.\n *\n * @param {Set<string>} placementNames - A set of placement names whose paywalls you want to preload.\n *\n * @returns {Promise<void>} A promise that resolves once the preloading process has been initiated.\n */\n async preloadPaywalls(placementNames: Set<string>): Promise<void> {\n await this.awaitConfig()\n await SuperwallExpoModule.preloadPaywalls(Array.from(placementNames))\n }\n\n /**\n * Sets user attributes for use in paywalls and on the Superwall dashboard.\n *\n * If an attribute already exists, its value will be overwritten while other attributes remain unchanged.\n * This is useful for analytics and campaign audience filters you may define in the Superwall Dashboard.\n *\n * **Note:** These attributes should not be used as a source of truth for sensitive information.\n *\n * For example, after retrieving your user's data:\n *\n * ```ts\n * const attributes: UserAttributes = {\n * name: user.name,\n * apnsToken: user.apnsTokenString,\n * email: user.email,\n * username: user.username,\n * profilePic: user.profilePicUrl,\n * }\n * await Superwall.setUserAttributes(attributes)\n * ```\n *\n * See [Setting User Attributes](https://docs.superwall.com/docs/setting-user-properties) for more information.\n *\n * @param {UserAttributes} userAttributes - An object containing custom attributes to store for the user.\n * Values can be any JSON-encodable value, URLs, or Dates. Keys beginning with `$` are reserved for Superwall and will be dropped.\n * Arrays and dictionaries as values are not supported and will be omitted.\n *\n * @returns {Promise<void>} A promise that resolves once the user attributes have been updated.\n */\n async setUserAttributes(userAttributes: UserAttributes): Promise<void> {\n await this.awaitConfig()\n await SuperwallExpoModule.setUserAttributes(userAttributes)\n }\n\n /**\n * Dismisses the presented paywall, if one exists.\n *\n * @returns {Promise<void>} A promise that resolves once the paywall has been dismissed,\n * or immediately if no paywall was active.\n */\n async dismiss(): Promise<void> {\n await SuperwallExpoModule.dismiss()\n }\n\n async setLogLevel(level: LogLevel): Promise<void> {\n await SuperwallExpoModule.setLogLevel(level.toString())\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/compat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAGvD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE/C,OAAO,EAAE,QAAQ,IAAI,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAGjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MA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AAO,cAAc,CAAA;IACvB,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,kBAAkB;QACtB,MAAM,IAAI,CAAC,WAAW,EAAE,CAAA;QACxB,MAAM,mBAAmB,CAAC,kBAAkB,EAAE,CAAA;IAChD,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,eAAe,CAAC,cAA2B;QAC/C,MAAM,IAAI,CAAC,WAAW,EAAE,CAAA;QACxB,MAAM,mBAAmB,CAAC,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAA;IACvE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,KAAK,CAAC,iBAAiB,CAAC,cAA8B;QACpD,MAAM,IAAI,CAAC,WAAW,EAAE,CAAA;QACxB,MAAM,mBAAmB,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAA;IAC7D,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,OAAO;QACX,MAAM,mBAAmB,CAAC,OAAO,EAAE,CAAA;IACrC,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,KAAe;QAC/B,MAAM,mBAAmB,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAA;IACzD,CAAC","sourcesContent":["import { Assignment } from \"./lib/Assigments\"\nimport { ConfigurationStatus } from \"./lib/ConfigurationStatus\"\nimport { EntitlementsInfo } from \"./lib/EntitlementsInfo\"\nimport { IdentityOptions } from \"./lib/IdentityOptions\"\nimport type { InterfaceStyle } from \"./lib/InterfaceStyle\"\nimport type { LogLevel } from \"./lib/LogLevel\"\nimport { PaywallInfo } from \"./lib/PaywallInfo\"\nimport type { PaywallPresentationHandler } from \"./lib/PaywallPresentationHandler\"\nimport { fromJson as paywallResultFromJson } from \"./lib/PaywallResult\"\nimport { PaywallSkippedReason } from \"./lib/PaywallSkippedReason\"\nimport type { PresentationResult } from \"./lib/PresentationResult\"\nimport type { PurchaseController } from \"./lib/PurchaseController\"\nimport { RedemptionResults } from \"./lib/RedemptionResults\"\nimport { SubscriptionStatus } from \"./lib/SubscriptionStatus\"\nimport type { SuperwallDelegate } from \"./lib/SuperwallDelegate\"\nimport { SuperwallEventInfo } from \"./lib/SuperwallEventInfo\"\nimport { SuperwallOptions } from \"./lib/SuperwallOptions\"\n\nexport { PaywallResult } from \"./lib/PaywallResult\"\n\nimport { EventEmitter } from \"expo\"\nimport { version } from \"../../package.json\"\nimport SuperwallExpoModule from \"../SuperwallExpoModule\"\n\nexport { ComputedPropertyRequest } from \"./lib/ComputedPropertyRequest\"\nexport { ConfigurationStatus } from \"./lib/ConfigurationStatus\"\nexport { EntitlementsInfo } from \"./lib/EntitlementsInfo\"\nexport { Experiment } from \"./lib/Experiment\"\nexport { FeatureGatingBehavior } from \"./lib/FeatureGatingBehavior\"\nexport { IdentityOptions } from \"./lib/IdentityOptions\"\nexport { InterfaceStyle } from \"./lib/InterfaceStyle\"\nexport { LocalNotification } from \"./lib/LocalNotification\"\nexport { LogLevel } from \"./lib/LogLevel\"\nexport { LogScope } from \"./lib/LogScope\"\nexport { PaywallCloseReason } from \"./lib/PaywallCloseReason\"\nexport { PaywallInfo } from \"./lib/PaywallInfo\"\nexport {\n PaywallOptions,\n TransactionBackgroundView,\n} from \"./lib/PaywallOptions\"\nexport { PaywallPresentationHandler } from \"./lib/PaywallPresentationHandler\"\nexport { PaywallPresentationRequestStatus } from \"./lib/PaywallPresentationRequestStatus\"\nexport {\n PaywallSkippedReason,\n PaywallSkippedReasonHoldout,\n PaywallSkippedReasonNoAudienceMatch,\n PaywallSkippedReasonPlacementNotFound,\n PaywallSkippedReasonUserIsSubscribed,\n} from \"./lib/PaywallSkippedReason\"\nexport { Product } from \"./lib/Product\"\nexport { PurchaseController } from \"./lib/PurchaseController\"\nexport {\n PurchaseResult,\n PurchaseResultCancelled,\n PurchaseResultFailed,\n PurchaseResultPending,\n PurchaseResultPurchased,\n} from \"./lib/PurchaseResult\"\nexport * from \"./lib/RedemptionResults\"\nexport { RestorationResult } from \"./lib/RestorationResult\"\nexport { RestoreType } from \"./lib/RestoreType\"\nexport { StoreTransaction } from \"./lib/StoreTransaction\"\nexport { StoreProduct } from \"./lib/StoreProduct\"\nexport { SubscriptionStatus } from \"./lib/SubscriptionStatus\"\nexport { SuperwallDelegate } from \"./lib/SuperwallDelegate\"\nexport { EventType, SuperwallEventInfo } from \"./lib/SuperwallEventInfo\"\nexport { SuperwallOptions } from \"./lib/SuperwallOptions\"\nexport { Survey } from \"./lib/Survey\"\nexport { TriggerResult } from \"./lib/TriggerResult\"\n\ninterface UserAttributes {\n [key: string]: any\n}\n\nexport default class Superwall {\n static purchaseController?: PurchaseController\n private static delegate?: SuperwallDelegate\n private static _superwall = new Superwall()\n\n private static configEmitter = new EventEmitter<{\n configured: (isConfigured: boolean) => void\n }>()\n private static didConfigure = false\n private presentationHandlers: Map<string, PaywallPresentationHandler> = new Map()\n subscriptionStatusEmitter = new EventEmitter<{\n change: (status: SubscriptionStatus) => void\n }>()\n\n private static setDidConfigure(didConfigure: boolean) {\n Superwall.didConfigure = didConfigure\n // Emit an event when the bridged state is true\n if (didConfigure) {\n Superwall.configEmitter.emit(\"configured\", didConfigure)\n }\n }\n\n private async awaitConfig(): Promise<void> {\n if (Superwall.didConfigure) {\n return\n }\n\n await new Promise<void>((resolve) => {\n Superwall.configEmitter.addListener(\"configured\", () => {\n resolve()\n })\n })\n }\n\n private constructor() {\n SuperwallExpoModule.addListener(\"onPurchase\", async (data) => {\n if (data.platform === \"ios\") {\n const purchaseResult = await Superwall.purchaseController?.purchaseFromAppStore(\n data.productId,\n )\n if (purchaseResult == null) {\n return\n }\n await SuperwallExpoModule.didPurchase(purchaseResult.toJSON())\n return\n }\n\n if (data.platform === \"android\") {\n const purchaseResult = await Superwall.purchaseController?.purchaseFromGooglePlay(\n data.productId,\n data.basePlanId,\n data.offerId,\n )\n if (purchaseResult == null) {\n return\n }\n await SuperwallExpoModule.didPurchase(purchaseResult.toJSON())\n }\n })\n\n SuperwallExpoModule.addListener(\"onPurchaseRestore\", async () => {\n const restorationResult = await Superwall.purchaseController?.restorePurchases()\n if (restorationResult == null) {\n return\n }\n await SuperwallExpoModule.didRestore(restorationResult.toJson())\n })\n\n SuperwallExpoModule.addListener(\"onPaywallPresent\", (data) => {\n const handler = this.presentationHandlers.get(data.handlerId)\n if (!handler || !handler.onPresentHandler) {\n return\n }\n\n const paywallInfo = PaywallInfo.fromJson(data.paywallInfoJson)\n handler.onPresentHandler(paywallInfo)\n })\n SuperwallExpoModule.addListener(\"onPaywallDismiss\", (data) => {\n const handler = this.presentationHandlers.get(data.handlerId)\n\n if (!handler || !handler.onDismissHandler) {\n return\n }\n\n const info = PaywallInfo.fromJson(data.paywallInfoJson)\n const result = paywallResultFromJson(data.result)\n handler.onDismissHandler(info, result)\n })\n\n SuperwallExpoModule.addListener(\"onPaywallError\", (data) => {\n const handler = this.presentationHandlers.get(data.handlerId)\n\n if (!handler || !handler.onErrorHandler) {\n return\n }\n\n handler.onErrorHandler(data.errorString)\n })\n\n SuperwallExpoModule.addListener(\"onPaywallSkip\", (data) => {\n const handler = this.presentationHandlers.get(data.handlerId)\n\n if (!handler || !handler.onSkipHandler) {\n return\n }\n\n const skippedReason = PaywallSkippedReason.fromJson(data.skippedReason)\n handler.onSkipHandler(skippedReason)\n })\n\n SuperwallExpoModule.addListener(\"onPaywallPresent\", (data) => {\n const handler = this.presentationHandlers.get(data.handlerId)\n\n if (!handler || !handler.onPresentHandler) {\n return\n }\n\n const info = PaywallInfo.fromJson(data.paywallInfoJson)\n handler.onPresentHandler(info)\n })\n\n // MARK: - SuperwallDelegate Listeners\n SuperwallExpoModule.addListener(\"subscriptionStatusDidChange\", async (data) => {\n Superwall.delegate?.subscriptionStatusDidChange(data.from, data.to)\n })\n\n SuperwallExpoModule.addListener(\"handleSuperwallEvent\", async (data) => {\n const eventInfo = SuperwallEventInfo.fromJson(data.eventInfo)\n Superwall.delegate?.handleSuperwallEvent(eventInfo)\n })\n\n SuperwallExpoModule.addListener(\"handleCustomPaywallAction\", async (data) => {\n const name = data.name\n Superwall.delegate?.handleCustomPaywallAction(name)\n })\n\n SuperwallExpoModule.addListener(\"willDismissPaywall\", async (data) => {\n const info = PaywallInfo.fromJson(data.info)\n Superwall.delegate?.willDismissPaywall(info)\n })\n\n SuperwallExpoModule.addListener(\"willPresentPaywall\", async (data) => {\n const info = PaywallInfo.fromJson(data.info)\n Superwall.delegate?.willPresentPaywall(info)\n })\n\n SuperwallExpoModule.addListener(\"didDismissPaywall\", async (data) => {\n const info = PaywallInfo.fromJson(data.info)\n Superwall.delegate?.didDismissPaywall(info)\n })\n\n SuperwallExpoModule.addListener(\"didPresentPaywall\", async (data) => {\n const info = PaywallInfo.fromJson(data.info)\n Superwall.delegate?.didPresentPaywall(info)\n })\n\n SuperwallExpoModule.addListener(\"handleLog\", async (data) => {\n Superwall.delegate?.handleLog(\n data.level,\n data.scope,\n data.message || undefined,\n data.info,\n data.error,\n )\n })\n\n SuperwallExpoModule.addListener(\"paywallWillOpenDeepLink\", async (data) => {\n const url = new URL(data.url)\n Superwall.delegate?.paywallWillOpenDeepLink(url)\n })\n\n SuperwallExpoModule.addListener(\"paywallWillOpenURL\", async (data) => {\n const url = new URL(data.url)\n Superwall.delegate?.paywallWillOpenURL(url)\n })\n\n SuperwallExpoModule.addListener(\"willRedeemLink\", async () => {\n Superwall.delegate?.willRedeemLink()\n })\n\n SuperwallExpoModule.addListener(\"didRedeemLink\", async (data) => {\n const result = RedemptionResults.fromJson(data)\n Superwall.delegate?.didRedeemLink(result)\n })\n\n SuperwallExpoModule.addListener(\"subscriptionStatusDidChange\", async (data) => {\n this.subscriptionStatusEmitter.emit(\"change\", data.to)\n })\n }\n\n /**\n * Returns the configured shared instance of `Superwall`.\n *\n * **Warning:** You must call {@link Superwall.configure} to initialize `Superwall`\n * before accessing this shared instance.\n *\n * @returns {Superwall} The shared `Superwall` instance.\n */\n static get shared(): Superwall {\n return Superwall._superwall\n }\n\n /**\n * Configures a shared instance of `Superwall` for use throughout your app.\n *\n * Call this as soon as your app starts to initialize the Superwall SDK.\n * Check out [Configuring the SDK](https://docs.superwall.com/docs/configuring-the-sdk) for information about how to configure the SDK.\n *\n * @param {object} config - Configuration object.\n * @param {string} config.apiKey - Your lib API Key that you can get from the Superwall dashboard settings.\n * If you don't have an account, you can [sign up for free](https://superwall.com/sign-up).\n * @param {SuperwallOptions} [config.options] - An optional object which allows you to customize the appearance and behavior\n * of the paywall.\n * @param {PurchaseController} [config.purchaseController] - An optional object that conforms to `PurchaseController`.\n * Implement this if you'd like to handle all subscription-related logic yourself. You'll need to also set the `subscriptionStatus`\n * every time the user's entitlements change. You can read more about that in [Purchases and Subscription Status](https://docs.superwall.com/docs/advanced-configuration).\n * If omitted, Superwall will handle all subscription-related logic itself.\n * @param {() => void} [config.completion] - An optional completion handler that lets you know when Superwall has finished configuring.\n *\n * @returns {Promise<Superwall>} The configured `Superwall` instance.\n */\n static async configure({\n apiKey,\n options,\n purchaseController,\n completion,\n }: {\n apiKey: string\n options?: SuperwallOptions\n purchaseController?: PurchaseController\n completion?: () => void\n }): Promise<Superwall> {\n Superwall.purchaseController = purchaseController\n\n // Ensure options is always a SuperwallOptions instance with defaults\n const superwallOptions = options instanceof SuperwallOptions\n ? options\n : new SuperwallOptions(options)\n\n await SuperwallExpoModule.configure(\n apiKey,\n superwallOptions.toJson(),\n !!purchaseController,\n `${version}compat`,\n )\n\n completion?.()\n\n Superwall.setDidConfigure(true)\n\n return Superwall._superwall\n }\n\n /**\n * Creates an account with Superwall by linking the provided `userId` to Superwall's automatically generated alias.\n *\n * Call this function as soon as you have a valid `userId`.\n *\n * @param {Object} config - The identification configuration object.\n * @param {string} config.userId - Your user's unique identifier as defined by your backend system.\n * @param {IdentityOptions} [config.options] - An optional {@link IdentityOptions} object. You can set the\n * {@link IdentityOptions.restorePaywallAssignments} property to `true` to instruct the SDK to wait to restore paywall assignments\n * from the server before presenting any paywalls. This option should be used only in advanced cases\n * (e.g., when users frequently switch accounts or reinstall the app).\n *\n * @returns {Promise<void>} A promise that resolves once the identification process is complete.\n */\n async identify({\n userId,\n options,\n }: {\n userId: string\n options?: IdentityOptions\n }): Promise<void> {\n await this.awaitConfig()\n const serializedOptions = options ? options.toJson() : new IdentityOptions().toJson()\n await SuperwallExpoModule.identify(userId, serializedOptions)\n }\n\n /**\n * Resets the `userId`, on-device paywall assignments, and data stored by Superwall.\n *\n * @returns {Promise<void>} A promise that resolves once reset is complete.\n */\n async reset(): Promise<void> {\n await this.awaitConfig()\n await SuperwallExpoModule.reset()\n }\n\n /**\n * Handles a deep link.\n *\n * @param {string} url - The deep link to handle.\n * @returns {Promise<Boolean>} A promise that resolves to a boolean indicating whether the deep link was handled.\n */\n async handleDeepLink(url: string): Promise<boolean> {\n await this.awaitConfig()\n return await SuperwallExpoModule.handleDeepLink(url)\n }\n\n /**\n * Registers a placement to access a feature.\n *\n * When the placement is added to a campaign on the [Superwall Dashboard](https://superwall.com/dashboard),\n * it can trigger a paywall if the following conditions are met:\n * - The provided placement is included in a campaign on the Superwall Dashboard.\n * - The user matches an audience filter defined in the campaign.\n * - The user does not have an active subscription.\n *\n * Before using this method, ensure you have created a campaign and added the placement on the\n * [Superwall Dashboard](https://superwall.com/dashboard).\n *\n * The displayed paywall is determined by the audience filters set in the campaign.\n * Once a user is assigned a paywall within an audience, that paywall will continue to be shown unless\n * you remove it from the audience or reset the paywall assignments.\n *\n * @param {string} [params.placement] - The name of the placement to register.\n * @param {Map<string, any> | Record<string, any>} [params.params] - Optional parameters to pass with your placement.\n * These parameters can be referenced within the audience filters of your campaign. Keys beginning with `$`\n * are reserved for Superwall and will be omitted. Values can be any JSON-encodable value, URL, or Date.\n * Arrays and dictionaries are not supported and will be dropped.\n * @param {PaywallPresentationHandler} [params.handler] - An optional handler that receives status updates\n * about the paywall presentation.\n * @param {() => void} [params.feature] - An optional callback that will be executed after registration completes.\n * If provided, this callback will be executed after the registration process completes successfully.\n * If not provided, you can chain a `.then()` block to the returned promise to execute your feature logic.\n *\n * @returns {Promise<void>} if [feature] is provided this promise resolves when register is executed, otherwise a promise that resolves when register completes successfully after which you can chain a `.then()` block to execute your feature logic.\n *\n * @remarks\n * This behavior is remotely configurable via the [Superwall Dashboard](https://superwall.com/dashboard):\n *\n * - For _Non Gated_ paywalls, the feature block is executed when the paywall is dismissed or if the user is already paying.\n * - For _Gated_ paywalls, the feature block is executed only if the user is already paying or if they begin paying.\n * - If no paywall is configured, the feature block is executed immediately.\n * - If no feature block is provided, the returned promise will resolve when registration completes.\n * - If a feature block is provided, the returned promise will always resolve after the feature block is executed.\n * Note: The feature block will not be executed if an error occurs during registration. Such errors can be detected via the\n * `handler`.\n *\n * @example\n * // Using the feature callback:\n * Superwall.register({\n * placement: \"somePlacement\",\n * feature: () => {\n * console.log(\"Feature logic executed after registration\");\n * }\n * });\n *\n * // Alternatively, chaining feature logic after registration:\n * Superwall.register({ placement: \"somePlacement\" })\n * .then(() => {\n * // Execute your feature logic here after registration.\n * console.log(\"Placement registered, now executing feature logic.\");\n * })\n */\n async register(params: {\n placement: string\n params?: Map<string, any> | Record<string, any>\n handler?: PaywallPresentationHandler\n feature?: () => void\n }): Promise<void> {\n await this.awaitConfig()\n let handlerId: string | null = null\n\n if (params.handler) {\n const uuid = (+new Date() * Math.random()).toString(36)\n this.presentationHandlers.set(uuid, params.handler)\n handlerId = uuid\n }\n\n let paramsObject = {}\n if (params.params) {\n paramsObject =\n params.params instanceof Map ? Object.fromEntries(params.params) : params.params\n }\n\n if (params.feature) {\n return await SuperwallExpoModule.registerPlacement(\n params.placement,\n paramsObject,\n handlerId,\n ).then(() => {\n params.feature!() //TODO: This is wrong, the feature should be executed only if the native SDK calls the feature block\n // not after awaiting the promise\n })\n }\n\n return SuperwallExpoModule.registerPlacement(params.placement, paramsObject, handlerId)\n }\n\n /**\n * Confirms all experiment assignments and returns them in an array.\n *\n * Note that the assignments may differ when a placement is registered due to changes\n * in user, placement, or device parameters used in audience filters.\n *\n * @returns {Promise<Assignment[]>} A promise that resolves to an array of {@link Assignment} objects.\n */\n async confirmAllAssignments(): Promise<Assignment[]> {\n await this.awaitConfig()\n const assignments = await SuperwallExpoModule.confirmAllAssignments()\n return assignments.map((assignment: any) => Assignment.fromJson(assignment))\n }\n\n /**\n * Gets all the experiment assignments and returns them in an array.\n *\n * This method tracks the {@link SuperwallEvent.getAssignments} event in the delegate.\n *\n * Note that the assignments may differ when a placement is registered due to changes\n * in user, placement, or device parameters used in audience filters.\n *\n * @returns {Promise<Assignment[]>} A promise that resolves to an array of {@link Assignment} objects.\n */\n async getAssignments(): Promise<Assignment[]> {\n await this.awaitConfig()\n const assignments = await SuperwallExpoModule.getAssignments()\n return assignments.map((assignment: any) => Assignment.fromJson(assignment))\n }\n\n /**\n * Preemptively gets the result of registering a placement.\n *\n * This helps you determine whether a particular placement will present a paywall in the future.\n * Note that this method does not present a paywall. To present a paywall, use the `register` function.\n *\n * @param {Object} options - Options for obtaining the presentation result.\n * @param {string} options.placement - The name of the placement you want to register.\n * @param {Map<string, any>} [options.params] - Optional parameters to pass with your placement.\n *\n * @returns {Promise<PresentationResult>} A promise that resolves to a {@link PresentationResult} indicating the result of registering the placement.\n */\n async getPresentationResult({\n placement,\n params,\n }: {\n placement: string\n params?: Map<string, any>\n }): Promise<PresentationResult> {\n await this.awaitConfig()\n let paramsObject = {}\n if (params) {\n paramsObject = Object.fromEntries(params)\n }\n return await SuperwallExpoModule.getPresentationResult(placement, paramsObject)\n }\n\n /**\n * Retrieves the current configuration status of the Superwall SDK.\n *\n * This function returns a promise that resolves to the current configuration status,\n * indicating whether the SDK has finished configuring. Initially, the status is\n * {@link ConfigurationStatus.PENDING}. Once the configuration completes successfully, it\n * changes to {@link ConfigurationStatus.CONFIGURED}. If the configuration fails, the status\n * will be {@link ConfigurationStatus.FAILED}.\n *\n * @returns {Promise<ConfigurationStatus>} A promise that resolves with the current configuration status.\n */\n async getConfigurationStatus(): Promise<ConfigurationStatus> {\n const configurationStatusString = await SuperwallExpoModule.getConfigurationStatus()\n return ConfigurationStatus.fromString(configurationStatusString)\n }\n\n /**\n * Retrieves the entitlements tied to the device.\n *\n * @returns {Promise<EntitlementsInfo>} A promise that resolves to an {@link EntitlementsInfo} object.\n */\n async getEntitlements(): Promise<EntitlementsInfo> {\n await this.awaitConfig()\n const entitlementsJson = await SuperwallExpoModule.getEntitlements()\n return EntitlementsInfo.fromObject(entitlementsJson)\n }\n\n /**\n * Sets the subscription status of the user.\n *\n * When using a PurchaseController, you must call this method to update the user's subscription status.\n * Alternatively, you can implement the {@link SuperwallDelegate.subscriptionStatusDidChange} delegate callback to receive notifications\n * whenever the subscription status changes.\n *\n * @param {SubscriptionStatus} status - The new subscription status.\n *\n * @returns {Promise<void>} A promise that resolves once the subscription status has been updated.\n */\n async setSubscriptionStatus(status: SubscriptionStatus): Promise<void> {\n await this.awaitConfig()\n await SuperwallExpoModule.setSubscriptionStatus(status)\n }\n\n async getSubscriptionStatus(): Promise<SubscriptionStatus> {\n await this.awaitConfig()\n const subscriptionStatusData = await SuperwallExpoModule.getSubscriptionStatus()\n return SubscriptionStatus.fromJson(subscriptionStatusData)\n }\n /**\n * Sets the user interface style, which overrides the system setting.\n *\n * Provide a value of type {@link InterfaceStyle} to explicitly set the interface style.\n * Pass `null` to revert back to the system's default interface style.\n *\n * @param {InterfaceStyle | null} style - The desired interface style, or `null` to use the system setting.\n *\n * @returns {Promise<void>} A promise that resolves once the interface style has been updated.\n */\n async setInterfaceStyle(style: InterfaceStyle | null): Promise<void> {\n await SuperwallExpoModule.setInterfaceStyle(style?.toString())\n }\n\n /**\n * Sets the delegate that handles Superwall lifecycle events.\n *\n * @param {SuperwallDelegate | undefined} delegate - An object implementing the {@link SuperwallDelegate} interface,\n * or `undefined` to remove the current delegate.\n *\n * @returns {Promise<void>} A promise that resolves once the delegate has been updated.\n */\n async setDelegate(delegate: SuperwallDelegate | undefined): Promise<void> {\n await this.awaitConfig()\n Superwall.delegate = delegate\n }\n\n /**\n * Retrieves the user attributes, set using {@link setUserAttributes}.\n *\n * @returns {Promise<UserAttributes>} A promise that resolves with an object representing the user's attributes.\n */\n async getUserAttributes(): Promise<UserAttributes> {\n await this.awaitConfig()\n const userAttributes: UserAttributes = await SuperwallExpoModule.getUserAttributes()\n return userAttributes\n }\n\n /**\n * Preloads all paywalls that the user may see based on campaigns and placements in your Superwall dashboard.\n *\n * To use this, first set `PaywallOptions.shouldPreload` to `false` when configuring the SDK.\n * Then call this function when you want preloading to begin.\n *\n * Note: This method will not reload any paywalls that have already been preloaded via {@link preloadPaywalls}.\n *\n * @returns {Promise<void>} A promise that resolves once the preloading process has been initiated.\n */\n async preloadAllPaywalls(): Promise<void> {\n await this.awaitConfig()\n await SuperwallExpoModule.preloadAllPaywalls()\n }\n\n /**\n * Preloads paywalls for specific placements.\n *\n * To use this method, first ensure that {@link PaywallOptions.shouldPreload} is set to `false` when configuring the SDK.\n * Then call this function when you want to initiate preloading for selected placements.\n *\n * Note: This will not reload any paywalls you've already preloaded.\n *\n * @param {Set<string>} placementNames - A set of placement names whose paywalls you want to preload.\n *\n * @returns {Promise<void>} A promise that resolves once the preloading process has been initiated.\n */\n async preloadPaywalls(placementNames: Set<string>): Promise<void> {\n await this.awaitConfig()\n await SuperwallExpoModule.preloadPaywalls(Array.from(placementNames))\n }\n\n /**\n * Sets user attributes for use in paywalls and on the Superwall dashboard.\n *\n * If an attribute already exists, its value will be overwritten while other attributes remain unchanged.\n * This is useful for analytics and campaign audience filters you may define in the Superwall Dashboard.\n *\n * **Note:** These attributes should not be used as a source of truth for sensitive information.\n *\n * For example, after retrieving your user's data:\n *\n * ```ts\n * const attributes: UserAttributes = {\n * name: user.name,\n * apnsToken: user.apnsTokenString,\n * email: user.email,\n * username: user.username,\n * profilePic: user.profilePicUrl,\n * }\n * await Superwall.setUserAttributes(attributes)\n * ```\n *\n * See [Setting User Attributes](https://docs.superwall.com/docs/setting-user-properties) for more information.\n *\n * @param {UserAttributes} userAttributes - An object containing custom attributes to store for the user.\n * Values can be any JSON-encodable value, URLs, or Dates. Keys beginning with `$` are reserved for Superwall and will be dropped.\n * Arrays and dictionaries as values are not supported and will be omitted.\n *\n * @returns {Promise<void>} A promise that resolves once the user attributes have been updated.\n */\n async setUserAttributes(userAttributes: UserAttributes): Promise<void> {\n await this.awaitConfig()\n await SuperwallExpoModule.setUserAttributes(userAttributes)\n }\n\n /**\n * Dismisses the presented paywall, if one exists.\n *\n * @returns {Promise<void>} A promise that resolves once the paywall has been dismissed,\n * or immediately if no paywall was active.\n */\n async dismiss(): Promise<void> {\n await SuperwallExpoModule.dismiss()\n }\n\n async setLogLevel(level: LogLevel): Promise<void> {\n await SuperwallExpoModule.setLogLevel(level.toString())\n }\n}\n"]}
@@ -7,7 +7,14 @@ extension ProductStore {
7
7
  return "APP_STORE"
8
8
  case .stripe:
9
9
  return "STRIPE"
10
+ case .paddle:
11
+ return "PADDLE"
12
+ case .superwall:
13
+ return "SUPERWALL"
14
+ case .playStore:
15
+ return "PLAY_STORE"
16
+ case .other:
17
+ return "OTHER"
10
18
  }
11
-
12
19
  }
13
20
  }
@@ -19,7 +19,7 @@ Pod::Spec.new do |s|
19
19
  s.static_framework = true
20
20
 
21
21
  s.dependency 'ExpoModulesCore'
22
- s.dependency "SuperwallKit", '4.9.3'
22
+ s.dependency "SuperwallKit", '4.10.0'
23
23
 
24
24
 
25
25
  # Swift/Objective-C compatibility
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-superwall",
3
- "version": "0.6.2",
3
+ "version": "0.6.4",
4
4
  "description": "Offical Expo Integration for Superwall",
5
5
  "main": "build/src/index.js",
6
6
  "types": "build/src/index.d.ts",