@revenuecat/purchases-js 1.59.0 → 1.60.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 +57 -1
- package/dist/Purchases.es.js +2477 -2451
- package/dist/Purchases.umd.js +68 -68
- package/package.json +1 -1
package/dist/Purchases.es.d.ts
CHANGED
|
@@ -837,11 +837,67 @@ export declare enum PackageType {
|
|
|
837
837
|
Weekly = "$rc_weekly"
|
|
838
838
|
}
|
|
839
839
|
|
|
840
|
+
/**
|
|
841
|
+
* Known values of `component_type` in {@link PaywallInteractionEvent}.
|
|
842
|
+
* @public
|
|
843
|
+
*/
|
|
844
|
+
export declare const PAYWALL_COMPONENT_TYPES: {
|
|
845
|
+
readonly TAB: "tab";
|
|
846
|
+
readonly SWITCH: "switch";
|
|
847
|
+
readonly CAROUSEL: "carousel";
|
|
848
|
+
readonly BUTTON: "button";
|
|
849
|
+
readonly TEXT: "text";
|
|
850
|
+
readonly PACKAGE: "package";
|
|
851
|
+
readonly PACKAGE_SELECTION_SHEET: "package_selection_sheet";
|
|
852
|
+
readonly PURCHASE_BUTTON: "purchase_button";
|
|
853
|
+
};
|
|
854
|
+
|
|
855
|
+
/**
|
|
856
|
+
* A paywall control interaction, as passed to `PaywallListener.onInteraction`. Keys that do not apply
|
|
857
|
+
* are omitted.
|
|
858
|
+
* @public
|
|
859
|
+
*/
|
|
860
|
+
export declare interface PaywallInteractionEvent {
|
|
861
|
+
readonly timestamp: number;
|
|
862
|
+
readonly session_id: string;
|
|
863
|
+
readonly offering_id: string;
|
|
864
|
+
readonly paywall_id?: string;
|
|
865
|
+
readonly paywall_revision: number;
|
|
866
|
+
readonly display_mode?: string;
|
|
867
|
+
readonly dark_mode?: boolean;
|
|
868
|
+
readonly locale?: string;
|
|
869
|
+
readonly component_type: string;
|
|
870
|
+
readonly component_value: string;
|
|
871
|
+
readonly component_name?: string;
|
|
872
|
+
readonly component_url?: string;
|
|
873
|
+
readonly origin_index?: number;
|
|
874
|
+
readonly destination_index?: number;
|
|
875
|
+
readonly origin_context_name?: string;
|
|
876
|
+
readonly destination_context_name?: string;
|
|
877
|
+
readonly default_index?: number;
|
|
878
|
+
readonly origin_package_id?: string;
|
|
879
|
+
readonly destination_package_id?: string;
|
|
880
|
+
readonly default_package_id?: string;
|
|
881
|
+
readonly current_package_id?: string;
|
|
882
|
+
readonly resulting_package_id?: string;
|
|
883
|
+
readonly origin_product_id?: string;
|
|
884
|
+
readonly destination_product_id?: string;
|
|
885
|
+
readonly default_product_id?: string;
|
|
886
|
+
readonly current_product_id?: string;
|
|
887
|
+
readonly resulting_product_id?: string;
|
|
888
|
+
}
|
|
889
|
+
|
|
840
890
|
/**
|
|
841
891
|
* Listener for paywall purchase lifecycle events.
|
|
842
892
|
* @public
|
|
843
893
|
*/
|
|
844
|
-
export declare type PaywallListener = PurchaseListener
|
|
894
|
+
export declare type PaywallListener = PurchaseListener & {
|
|
895
|
+
/**
|
|
896
|
+
* Called when the user interacts with a paywall control.
|
|
897
|
+
* Exceptions thrown here are logged and do not affect the paywall.
|
|
898
|
+
*/
|
|
899
|
+
onInteraction?: (event: PaywallInteractionEvent) => void;
|
|
900
|
+
};
|
|
845
901
|
|
|
846
902
|
/**
|
|
847
903
|
* Represents the result of a purchase operation initiated from a paywall.
|