@metrifox/react-sdk 0.0.10 → 0.0.12

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
@@ -1,10 +1,83 @@
1
- import { PricingTableTheme } from 'src/modules/pricing-table/types/interface';
2
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
2
  import { ComponentType } from 'react';
4
3
 
4
+ interface PricingTableTheme {
5
+ card?: CardTheme;
6
+ button?: ButtonTheme;
7
+ featureList?: FeatureListTheme;
8
+ tabs?: TabsTheme;
9
+ intervalToggle?: IntervalToggleTheme;
10
+ currentSubscriptionCard?: CurrentSubscriptionCard;
11
+ freeTrialTag?: FreeTrialTheme;
12
+ checkoutBar?: CheckoutBarTheme;
13
+ }
14
+ interface CardTheme {
15
+ background?: string;
16
+ borderColor?: string;
17
+ descriptionColor?: string;
18
+ header?: CardHeaderTheme;
19
+ description?: CardDescriptionTheme;
20
+ price?: CardPriceTheme;
21
+ }
22
+ interface CardHeaderTheme {
23
+ background?: string;
24
+ textColor?: string;
25
+ }
26
+ interface CardDescriptionTheme {
27
+ textColor?: string;
28
+ textButtonColor?: string;
29
+ }
30
+ interface CardPriceTheme {
31
+ amountColor?: string;
32
+ primaryTextColor?: string;
33
+ secondaryTextColor?: string;
34
+ textButtonColor?: string;
35
+ background?: string;
36
+ borderColor?: string;
37
+ }
38
+ interface ButtonTheme {
39
+ background?: string;
40
+ textColor?: string;
41
+ secondaryBackground?: string;
42
+ secondaryTextColor?: string;
43
+ textButtonColor?: string;
44
+ }
45
+ interface FeatureListTheme {
46
+ textColor?: string;
47
+ iconColor?: string;
48
+ }
49
+ interface TabsTheme {
50
+ inactiveText?: string;
51
+ activeText?: string;
52
+ indicator?: string;
53
+ borderColor?: string;
54
+ }
55
+ interface IntervalToggleTheme {
56
+ background?: string;
57
+ activeBackground?: string;
58
+ activeText?: string;
59
+ inactiveText?: string;
60
+ }
61
+ interface CurrentSubscriptionCard {
62
+ header: CardHeaderTheme;
63
+ gradientColor?: string;
64
+ }
65
+ interface FreeTrialTheme {
66
+ background?: string;
67
+ textColor?: string;
68
+ }
69
+ interface CheckoutBarTheme {
70
+ background?: string;
71
+ borderColor?: string;
72
+ textColor?: string;
73
+ buttonBackground?: string;
74
+ buttonTextColor?: string;
75
+ }
76
+
5
77
  interface MetrifoxInitConfig {
6
78
  clientKey: string;
7
79
  baseUrl?: string;
80
+ webAppUrl?: string;
8
81
  pricingTableTheme?: PricingTableTheme;
9
82
  }
10
83
  declare const metrifoxInit: (config: MetrifoxInitConfig) => void;
@@ -301,6 +374,7 @@ interface Tier {
301
374
  min_price: number | null;
302
375
  max_price: number | null;
303
376
  flat_fee: number | null;
377
+ total_unit_quantity: number | null;
304
378
  }
305
379
  interface Entitlement {
306
380
  carryover_enabled: boolean;
@@ -363,15 +437,15 @@ declare const PricingTable: ({ checkoutUsername, productKey, plansOnly, singlePu
363
437
  showTabHeader?: boolean;
364
438
  }) => react_jsx_runtime.JSX.Element;
365
439
 
366
- declare const useGetCheckoutUrl: ({ offeringKey, billingInterval, customerKey, }: {
367
- offeringKey: string;
368
- billingInterval?: "monthly" | "yearly";
369
- customerKey?: string;
370
- }) => {
371
- checkoutUrl: string | null;
440
+ declare const useCheckoutUrl: () => {
441
+ getCheckoutUrl: ({ offeringKey, billingInterval, customerKey, }: {
442
+ offeringKey: string;
443
+ billingInterval?: string;
444
+ customerKey?: string;
445
+ }) => Promise<string>;
372
446
  loading: boolean;
373
447
  error: unknown;
374
448
  };
375
449
 
376
- export { CustomerPortal, PriceCard, PricingTable, metrifoxInit, useGetCheckoutUrl };
450
+ export { CustomerPortal, PriceCard, PricingTable, metrifoxInit, useCheckoutUrl };
377
451
  export type { Offering as ProductOffering };