@revenuecat/purchases-js 1.27.0 → 1.28.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.
@@ -1,3 +1,5 @@
1
+ import { CustomVariables } from '@revenuecat/purchases-ui-js';
2
+ import { CustomVariableValue } from '@revenuecat/purchases-ui-js';
1
3
  import { PaywallData } from '@revenuecat/purchases-ui-js';
2
4
  import { UIConfig } from '@revenuecat/purchases-ui-js';
3
5
 
@@ -146,6 +148,10 @@ declare type CustomTranslations = {
146
148
  };
147
149
  };
148
150
 
151
+ export { CustomVariables }
152
+
153
+ export { CustomVariableValue }
154
+
149
155
  /* Excluded from this release type: DiscountPhase */
150
156
 
151
157
  declare type EmptyString = "";
@@ -873,6 +879,25 @@ export declare interface PresentPaywallParams {
873
879
  * Whether to hide back buttons in the paywall. Defaults to false.
874
880
  */
875
881
  readonly hideBackButtons?: boolean;
882
+ /**
883
+ * Custom variables to pass to the paywall at runtime, overriding defaults set
884
+ * in the RevenueCat dashboard.
885
+ *
886
+ * Variables must be defined in the dashboard first. Reference them in paywall
887
+ * text using the `custom.` prefix (e.g. `{{ custom.player_name }}`).
888
+ *
889
+ * @example
890
+ * ```ts
891
+ * presentPaywall({
892
+ * customVariables: {
893
+ * player_name: CustomVariableValue.string('Ada'),
894
+ * level: CustomVariableValue.number(42),
895
+ * is_premium: CustomVariableValue.boolean(true),
896
+ * },
897
+ * });
898
+ * ```
899
+ */
900
+ readonly customVariables?: CustomVariables;
876
901
  }
877
902
 
878
903
  /**
@@ -1126,6 +1151,7 @@ export declare interface PurchaseParams {
1126
1151
  */
1127
1152
  customerEmail?: string;
1128
1153
  /* Excluded from this release type: workflowPurchaseContext */
1154
+ /* Excluded from this release type: paywallId */
1129
1155
  /**
1130
1156
  * The locale to use for the purchase flow. If not specified, English will be used
1131
1157
  */