@revenuecat/purchases-js 1.51.2 → 1.52.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1078,6 +1078,7 @@ export declare interface PresentPaywallParams {
1078
1078
  * ```
1079
1079
  */
1080
1080
  readonly customVariables?: CustomVariables;
1081
+ /* Excluded from this release type: productChangeInfo */
1081
1082
  }
1082
1083
 
1083
1084
  /**
@@ -1535,7 +1536,9 @@ export declare class Purchases {
1535
1536
  * @param params - The parameters object to customise the offerings fetch. Check {@link GetOfferingsParams}
1536
1537
  */
1537
1538
  getCurrentOfferingForPlacement(placementIdentifier: string, params?: GetOfferingsParams): Promise<Offering | null>;
1539
+ private findOfferingById;
1538
1540
  private getAllOfferings;
1541
+ private fetchProductsForOfferings;
1539
1542
  /**
1540
1543
  * Convenience method to check whether a user is entitled to a specific
1541
1544
  * entitlement. This will use {@link Purchases.getCustomerInfo} under the hood.
@@ -1573,8 +1576,10 @@ export declare class Purchases {
1573
1576
  * form on your site, using the given HTML element as the mount point, if
1574
1577
  * provided, or as a modal if not.
1575
1578
  *
1576
- * When {@link PurchaseParams.productChangeInfo} is set, presents upgrade-mode
1577
- * checkout for an existing RC Billing subscription instead of a new purchase.
1579
+ * When {@link PurchaseParams.productChangeInfo} is set with a subscriber token,
1580
+ * checkout starts in product-change mode: if the backend can change the
1581
+ * existing subscription, an upgrade-confirm page is shown; otherwise the
1582
+ * same checkout session continues as a normal purchase.
1578
1583
  *
1579
1584
  * @param params - The parameters object to customise the purchase flow. Check {@link PurchaseParams}
1580
1585
  * @returns a Promise for the customer and redemption info after the purchase is completed successfully.
@@ -1637,11 +1642,11 @@ export declare class Purchases {
1637
1642
  */
1638
1643
  identifyUser(appUserId: string): Promise<IdentifyResult>;
1639
1644
  /**
1640
- * Presents upgrade-mode checkout to change the customer's Web Billing
1641
- * subscription to {@link PurchaseParams.rcPackage}'s product along a
1642
- * configured product change path.
1645
+ * Resolves {@link PurchaseParams.productChangeInfo} into the product-change
1646
+ * context passed to the checkout UI, or undefined when the purchase should
1647
+ * proceed as a normal purchase (no info, no token, or non-Web Billing key).
1643
1648
  */
1644
- private productChangePurchase;
1649
+ private resolveProductChange;
1645
1650
  /**
1646
1651
  * Rejects anything shaped like a RevenueCat API key so a secret or public
1647
1652
  * key is never sent (or exposed) where a subscriber token belongs.