@revenuecat/purchases-typescript-internal-esm 17.6.0 → 17.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export * from './errors';
2
2
  export * from './customerInfo';
3
3
  export * from './offerings';
4
4
  export * from './enums';
5
+ export * from './purchaseParams';
5
6
  export * from './purchasesConfiguration';
6
7
  export * from './callbackTypes';
7
8
  export * from './webRedemption';
package/dist/index.js CHANGED
@@ -2,6 +2,7 @@ export * from './errors';
2
2
  export * from './customerInfo';
3
3
  export * from './offerings';
4
4
  export * from './enums';
5
+ export * from './purchaseParams';
5
6
  export * from './purchasesConfiguration';
6
7
  export * from './callbackTypes';
7
8
  export * from './webRedemption';
@@ -0,0 +1,31 @@
1
+ import { GoogleProductChangeInfo, PurchasesPackage, PurchasesPromotionalOffer, PurchasesStoreProduct, PurchasesWinBackOffer, SubscriptionOption } from "./offerings";
2
+ /**
3
+ * Holds parameters to initialize a purchase in our SDK.
4
+ * @public
5
+ */
6
+ export interface PurchaseParams {
7
+ /**
8
+ * The {@link PurchasesPackage}, {@link PurchasesStoreProduct} or {@link SubscriptionOption} to purchase.
9
+ */
10
+ itemToPurchase: PurchasesPackage | PurchasesStoreProduct | SubscriptionOption;
11
+ /**
12
+ * Google Play only. Optional {@link GoogleProductChangeInfo} you
13
+ * wish to upgrade from containing the oldProductIdentifier and the optional prorationMode.
14
+ */
15
+ googleProductChangeInfo?: GoogleProductChangeInfo | null;
16
+ /**
17
+ * Google Play only. Optional boolean that indicates personalized pricing on products available for purchase in the EU.
18
+ * For compliance with EU regulations. User will see "This price has been customized for you" in the purchase dialog when true.
19
+ * See https://developer.android.com/google/play/billing/integrate#personalized-price for more info.
20
+ */
21
+ googleIsPersonalizedPrice?: boolean | null;
22
+ /**
23
+ * iOS only, requires iOS 18.0 or greater with StoreKit 2. Win-back offer to apply to this purchase.
24
+ * Retrieve this using getEligibleWinBackOffersForPackage or getEligibleWinBackOffersForStoreProduct.
25
+ */
26
+ winBackOffer?: PurchasesWinBackOffer | null;
27
+ /**
28
+ * iOS only. Discount to apply to this purchase. Retrieve this discount using getPromotionalOffer.
29
+ */
30
+ discount?: PurchasesPromotionalOffer | null;
31
+ }
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@revenuecat/purchases-typescript-internal-esm",
3
3
  "title": "Purchases typescript internal shared code",
4
- "version": "17.6.0",
4
+ "version": "17.8.0",
5
5
  "description": "Typescript code to be used by RevenueCat's hybrid SDKs. Not meant for external usage.",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",