@revenuecat/purchases-js 1.54.0 → 1.56.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/Purchases.es.d.ts +46 -2
- package/dist/Purchases.es.js +7819 -7550
- package/dist/Purchases.umd.js +69 -69
- package/package.json +1 -1
package/dist/Purchases.es.d.ts
CHANGED
|
@@ -134,6 +134,20 @@ export declare interface CustomerInfo {
|
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
+
/**
|
|
138
|
+
* Parameters for tracking an impression of a custom paywall.
|
|
139
|
+
*
|
|
140
|
+
* Pass the offering used to render the paywall to include its offering,
|
|
141
|
+
* placement, and targeting attribution in the event.
|
|
142
|
+
* @public
|
|
143
|
+
*/
|
|
144
|
+
export declare interface CustomPaywallImpressionParams {
|
|
145
|
+
/** An optional identifier for the custom paywall shown to the customer. */
|
|
146
|
+
paywallId?: string;
|
|
147
|
+
/** The offering used to render the custom paywall. */
|
|
148
|
+
offering?: Offering;
|
|
149
|
+
}
|
|
150
|
+
|
|
137
151
|
/**
|
|
138
152
|
* Custom translations to be used in the purchase flow.
|
|
139
153
|
* This class allows you to override the default translations used in the purchase flow.
|
|
@@ -961,6 +975,10 @@ export declare interface PresentExpressPurchaseButtonParams {
|
|
|
961
975
|
* The email of the user. If undefined, RevenueCat will ask the customer for their email.
|
|
962
976
|
*/
|
|
963
977
|
customerEmail?: string;
|
|
978
|
+
/**
|
|
979
|
+
* The RevenueCat public identifier for an Apple external purchase token.
|
|
980
|
+
*/
|
|
981
|
+
externalPurchaseTokenId?: string;
|
|
964
982
|
/**
|
|
965
983
|
* The locale to use for the purchase flow. If not specified, English will be used
|
|
966
984
|
*/
|
|
@@ -1018,6 +1036,10 @@ export declare interface PresentPaywallParams {
|
|
|
1018
1036
|
* If passed the checkout flow will not ask for it to the customer.
|
|
1019
1037
|
*/
|
|
1020
1038
|
readonly customerEmail?: string;
|
|
1039
|
+
/**
|
|
1040
|
+
* The RevenueCat public identifier for an Apple external purchase token.
|
|
1041
|
+
*/
|
|
1042
|
+
readonly externalPurchaseTokenId?: string;
|
|
1021
1043
|
/**
|
|
1022
1044
|
* The purchase metadata to be passed to the backend when a purchase is started
|
|
1023
1045
|
* from the paywall.
|
|
@@ -1394,6 +1416,10 @@ export declare interface PurchaseParams {
|
|
|
1394
1416
|
* The email of the user. If undefined, RevenueCat will ask the customer for their email.
|
|
1395
1417
|
*/
|
|
1396
1418
|
customerEmail?: string;
|
|
1419
|
+
/**
|
|
1420
|
+
* The RevenueCat public identifier for an Apple external purchase token.
|
|
1421
|
+
*/
|
|
1422
|
+
externalPurchaseTokenId?: string;
|
|
1397
1423
|
/* Excluded from this release type: workflowPurchaseContext */
|
|
1398
1424
|
/* Excluded from this release type: attributionMetadata */
|
|
1399
1425
|
/* Excluded from this release type: paywallId */
|
|
@@ -1426,7 +1452,9 @@ export declare interface PurchaseParams {
|
|
|
1426
1452
|
showDiscountCodeField?: boolean;
|
|
1427
1453
|
/**
|
|
1428
1454
|
* @experimental
|
|
1429
|
-
* Initial discount code to
|
|
1455
|
+
* Initial discount code to apply at checkout.
|
|
1456
|
+
* For Web Billing this is displayed as applied in the checkout UI.
|
|
1457
|
+
* For Paddle this is passed to Paddle Checkout as `discountCode`.
|
|
1430
1458
|
* This is useful when the code originated outside of the checkout UI,
|
|
1431
1459
|
* for example from a URL parameter.
|
|
1432
1460
|
*/
|
|
@@ -1503,6 +1531,7 @@ export declare class Purchases {
|
|
|
1503
1531
|
/* Excluded from this release type: eventsTracker */
|
|
1504
1532
|
/* Excluded from this release type: _platformInfo */
|
|
1505
1533
|
/* Excluded from this release type: inMemoryCache */
|
|
1534
|
+
/* Excluded from this release type: cachedCurrentOffering */
|
|
1506
1535
|
/* Excluded from this release type: instance */
|
|
1507
1536
|
/**
|
|
1508
1537
|
* Set the log level. Logs of the given level and below will be printed
|
|
@@ -1578,6 +1607,20 @@ export declare class Purchases {
|
|
|
1578
1607
|
* @param params - The parameters object to customise the offerings fetch. Check {@link GetOfferingsParams}
|
|
1579
1608
|
*/
|
|
1580
1609
|
getOfferings(params?: GetOfferingsParams): Promise<Offerings>;
|
|
1610
|
+
/**
|
|
1611
|
+
* Tracks an impression for a custom paywall.
|
|
1612
|
+
*
|
|
1613
|
+
* Pass the offering used to render the paywall to preserve placement and
|
|
1614
|
+
* targeting attribution. When no offering is passed, the most recently
|
|
1615
|
+
* fetched current offering is used if available.
|
|
1616
|
+
*
|
|
1617
|
+
* Each call creates a separate impression event. Call this once per
|
|
1618
|
+
* paywall presentation and avoid lifecycle callbacks that may run
|
|
1619
|
+
* multiple times for the same display.
|
|
1620
|
+
*
|
|
1621
|
+
* @param params Parameters for the custom paywall impression event.
|
|
1622
|
+
*/
|
|
1623
|
+
trackCustomPaywallImpression(params?: CustomPaywallImpressionParams): void;
|
|
1581
1624
|
/**
|
|
1582
1625
|
* Retrieves a specific offering by a placement identifier.
|
|
1583
1626
|
* For more info see https://www.revenuecat.com/docs/tools/targeting
|
|
@@ -1693,7 +1736,8 @@ export declare class Purchases {
|
|
|
1693
1736
|
/**
|
|
1694
1737
|
* Resolves {@link PurchaseParams.productChangeInfo} into the product-change
|
|
1695
1738
|
* context passed to the checkout UI, or undefined when the purchase should
|
|
1696
|
-
* proceed as a normal purchase (no info, no token, or
|
|
1739
|
+
* proceed as a normal purchase (no info, no token, or an API key whose
|
|
1740
|
+
* gateway doesn't support product change, e.g. Paddle).
|
|
1697
1741
|
*/
|
|
1698
1742
|
private resolveProductChange;
|
|
1699
1743
|
/**
|