@revenuecat/purchases-js 1.17.0 → 1.18.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 +49 -0
- package/dist/Purchases.es.js +4112 -3960
- package/dist/Purchases.umd.js +44 -44
- package/package.json +4 -3
package/dist/Purchases.es.d.ts
CHANGED
|
@@ -593,6 +593,49 @@ export declare interface PresentedOfferingContext {
|
|
|
593
593
|
readonly placementIdentifier: string | null;
|
|
594
594
|
}
|
|
595
595
|
|
|
596
|
+
/**
|
|
597
|
+
* Parameters for the {@link Purchases.presentPaywall} method.
|
|
598
|
+
* @public
|
|
599
|
+
*/
|
|
600
|
+
export declare interface PresentPaywallParams {
|
|
601
|
+
/**
|
|
602
|
+
* The identifier of the offering to fetch the paywall for.
|
|
603
|
+
* Can be a string identifier or one of the predefined keywords.
|
|
604
|
+
*/
|
|
605
|
+
readonly offering?: Offering;
|
|
606
|
+
/**
|
|
607
|
+
* The target element where the paywall will be rendered.
|
|
608
|
+
* The paywall will create a full-screen overlay if null.
|
|
609
|
+
*/
|
|
610
|
+
readonly htmlTarget?: HTMLElement;
|
|
611
|
+
/**
|
|
612
|
+
* The target element where the checkout flow will be rendered.
|
|
613
|
+
* The checkout flow will create a full-screen overlay if null.
|
|
614
|
+
*/
|
|
615
|
+
readonly purchaseHtmlTarget?: HTMLElement;
|
|
616
|
+
/**
|
|
617
|
+
* The email of the customer starting the purchase.
|
|
618
|
+
* If passed the checkout flow will not ask for it to the customer.
|
|
619
|
+
*/
|
|
620
|
+
readonly customerEmail?: string;
|
|
621
|
+
/**
|
|
622
|
+
* Callback to be called when the paywall tries to navigate to an external URL.
|
|
623
|
+
*/
|
|
624
|
+
readonly onNavigateToUrl?: (url: string) => void;
|
|
625
|
+
/**
|
|
626
|
+
* Callback to be called when the paywall tries to navigate back.
|
|
627
|
+
*/
|
|
628
|
+
readonly onBack?: () => void;
|
|
629
|
+
/**
|
|
630
|
+
* Callback to be called when the paywall tries to visit the customer center.
|
|
631
|
+
*/
|
|
632
|
+
readonly onVisitCustomerCenter?: () => void;
|
|
633
|
+
/**
|
|
634
|
+
* The locale to use for the paywall and the checkout flow.
|
|
635
|
+
*/
|
|
636
|
+
readonly selectedLocale?: string;
|
|
637
|
+
}
|
|
638
|
+
|
|
596
639
|
/**
|
|
597
640
|
* Price information for a product.
|
|
598
641
|
* @public
|
|
@@ -925,6 +968,12 @@ export declare class Purchases {
|
|
|
925
968
|
* up the first call to {@link Purchases.purchase}.
|
|
926
969
|
*/
|
|
927
970
|
preload(): Promise<void>;
|
|
971
|
+
/**
|
|
972
|
+
* Renders an RC Paywall and allows the user to purchase from it using Web Billing.
|
|
973
|
+
* @param paywallParams - The parameters object to customise the paywall render. Check {@link PresentPaywallParams}
|
|
974
|
+
* @returns Promise<PurchaseResult>
|
|
975
|
+
*/
|
|
976
|
+
presentPaywall(paywallParams: PresentPaywallParams): Promise<PurchaseResult>;
|
|
928
977
|
/**
|
|
929
978
|
* Fetch the configured offerings for this user. You can configure these
|
|
930
979
|
* in the RevenueCat dashboard.
|