@schematichq/schematic-components 1.6.2 → 1.7.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.
@@ -13,6 +13,7 @@ import { IStyledComponentBase } from 'styled-components/dist/types';
13
13
  import { JSX } from 'react/jsx-runtime';
14
14
  import { RefAttributes } from 'react';
15
15
  import { RuleSet } from 'styled-components';
16
+ import type { Stripe } from '@stripe/stripe-js';
16
17
  import { Substitute } from 'styled-components/dist/types';
17
18
 
18
19
  declare interface AvailablePlanOptions {
@@ -384,6 +385,24 @@ declare interface BillingPlanCreditGrantResponseData {
384
385
  * @memberof BillingPlanCreditGrantResponseData
385
386
  */
386
387
  creditSingularName?: string | null;
388
+ /**
389
+ *
390
+ * @type {string}
391
+ * @memberof BillingPlanCreditGrantResponseData
392
+ */
393
+ expiryType?: string | null;
394
+ /**
395
+ *
396
+ * @type {string}
397
+ * @memberof BillingPlanCreditGrantResponseData
398
+ */
399
+ expiryUnit?: string | null;
400
+ /**
401
+ *
402
+ * @type {number}
403
+ * @memberof BillingPlanCreditGrantResponseData
404
+ */
405
+ expiryUnitCount?: number | null;
387
406
  /**
388
407
  *
389
408
  * @type {string}
@@ -414,6 +433,12 @@ declare interface BillingPlanCreditGrantResponseData {
414
433
  * @memberof BillingPlanCreditGrantResponseData
415
434
  */
416
435
  resetStart: string;
436
+ /**
437
+ *
438
+ * @type {string}
439
+ * @memberof BillingPlanCreditGrantResponseData
440
+ */
441
+ resetType?: string | null;
417
442
  /**
418
443
  *
419
444
  * @type {Date}
@@ -1097,7 +1122,7 @@ declare interface BillingProductForSubscriptionResponseData {
1097
1122
  * @type {Array<BillingProductPriceTierResponseData>}
1098
1123
  * @memberof BillingProductForSubscriptionResponseData
1099
1124
  */
1100
- priceTier: Array<BillingProductPriceTierResponseData_2>;
1125
+ priceTier: Array<BillingProductPriceTierResponseData>;
1101
1126
  /**
1102
1127
  *
1103
1128
  * @type {number}
@@ -1610,133 +1635,6 @@ declare interface BillingSubscriptionDiscountView {
1610
1635
  subscriptionExternalId: string;
1611
1636
  }
1612
1637
 
1613
- /**
1614
- * Schematic API
1615
- * Schematic API
1616
- *
1617
- * The version of the OpenAPI document: 0.1
1618
- *
1619
- *
1620
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1621
- * https://openapi-generator.tech
1622
- * Do not edit the class manually.
1623
- */
1624
- /**
1625
- *
1626
- * @export
1627
- * @interface BillingSubscriptionResponseData
1628
- */
1629
- declare interface BillingSubscriptionResponseData {
1630
- /**
1631
- *
1632
- * @type {number}
1633
- * @memberof BillingSubscriptionResponseData
1634
- */
1635
- cancelAt?: number | null;
1636
- /**
1637
- *
1638
- * @type {boolean}
1639
- * @memberof BillingSubscriptionResponseData
1640
- */
1641
- cancelAtPeriodEnd: boolean;
1642
- /**
1643
- *
1644
- * @type {string}
1645
- * @memberof BillingSubscriptionResponseData
1646
- */
1647
- companyId?: string | null;
1648
- /**
1649
- *
1650
- * @type {Date}
1651
- * @memberof BillingSubscriptionResponseData
1652
- */
1653
- createdAt: Date;
1654
- /**
1655
- *
1656
- * @type {string}
1657
- * @memberof BillingSubscriptionResponseData
1658
- */
1659
- currency: string;
1660
- /**
1661
- *
1662
- * @type {string}
1663
- * @memberof BillingSubscriptionResponseData
1664
- */
1665
- customerExternalId: string;
1666
- /**
1667
- *
1668
- * @type {string}
1669
- * @memberof BillingSubscriptionResponseData
1670
- */
1671
- defaultPaymentMethodId?: string | null;
1672
- /**
1673
- *
1674
- * @type {Date}
1675
- * @memberof BillingSubscriptionResponseData
1676
- */
1677
- expiredAt?: Date | null;
1678
- /**
1679
- *
1680
- * @type {string}
1681
- * @memberof BillingSubscriptionResponseData
1682
- */
1683
- id: string;
1684
- /**
1685
- *
1686
- * @type {string}
1687
- * @memberof BillingSubscriptionResponseData
1688
- */
1689
- interval: string;
1690
- /**
1691
- *
1692
- * @type {object}
1693
- * @memberof BillingSubscriptionResponseData
1694
- */
1695
- metadata?: object;
1696
- /**
1697
- *
1698
- * @type {number}
1699
- * @memberof BillingSubscriptionResponseData
1700
- */
1701
- periodEnd: number;
1702
- /**
1703
- *
1704
- * @type {number}
1705
- * @memberof BillingSubscriptionResponseData
1706
- */
1707
- periodStart: number;
1708
- /**
1709
- *
1710
- * @type {string}
1711
- * @memberof BillingSubscriptionResponseData
1712
- */
1713
- status: string;
1714
- /**
1715
- *
1716
- * @type {string}
1717
- * @memberof BillingSubscriptionResponseData
1718
- */
1719
- subscriptionExternalId: string;
1720
- /**
1721
- *
1722
- * @type {number}
1723
- * @memberof BillingSubscriptionResponseData
1724
- */
1725
- totalPrice: number;
1726
- /**
1727
- *
1728
- * @type {number}
1729
- * @memberof BillingSubscriptionResponseData
1730
- */
1731
- trialEnd?: number | null;
1732
- /**
1733
- *
1734
- * @type {string}
1735
- * @memberof BillingSubscriptionResponseData
1736
- */
1737
- trialEndSetting?: string | null;
1738
- }
1739
-
1740
1638
  /**
1741
1639
  *
1742
1640
  * @export
@@ -2003,10 +1901,10 @@ declare interface CheckoutDialogProps {
2003
1901
  declare interface CheckoutResponse {
2004
1902
  /**
2005
1903
  *
2006
- * @type {BillingSubscriptionResponseData}
1904
+ * @type {CheckoutResponseData}
2007
1905
  * @memberof CheckoutResponse
2008
1906
  */
2009
- data: BillingSubscriptionResponseData;
1907
+ data: CheckoutResponseData;
2010
1908
  /**
2011
1909
  * Input parameters
2012
1910
  * @type {object}
@@ -2015,6 +1913,145 @@ declare interface CheckoutResponse {
2015
1913
  params: object;
2016
1914
  }
2017
1915
 
1916
+ /**
1917
+ * Schematic API
1918
+ * Schematic API
1919
+ *
1920
+ * The version of the OpenAPI document: 0.1
1921
+ *
1922
+ *
1923
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1924
+ * https://openapi-generator.tech
1925
+ * Do not edit the class manually.
1926
+ */
1927
+ /**
1928
+ *
1929
+ * @export
1930
+ * @interface CheckoutResponseData
1931
+ */
1932
+ declare interface CheckoutResponseData {
1933
+ /**
1934
+ *
1935
+ * @type {number}
1936
+ * @memberof CheckoutResponseData
1937
+ */
1938
+ cancelAt?: number | null;
1939
+ /**
1940
+ *
1941
+ * @type {boolean}
1942
+ * @memberof CheckoutResponseData
1943
+ */
1944
+ cancelAtPeriodEnd: boolean;
1945
+ /**
1946
+ *
1947
+ * @type {string}
1948
+ * @memberof CheckoutResponseData
1949
+ */
1950
+ companyId?: string | null;
1951
+ /**
1952
+ *
1953
+ * @type {string}
1954
+ * @memberof CheckoutResponseData
1955
+ */
1956
+ confirmPaymentIntentClientSecret?: string | null;
1957
+ /**
1958
+ *
1959
+ * @type {string}
1960
+ * @memberof CheckoutResponseData
1961
+ */
1962
+ confirmPaymentIntentId?: string | null;
1963
+ /**
1964
+ *
1965
+ * @type {Date}
1966
+ * @memberof CheckoutResponseData
1967
+ */
1968
+ createdAt: Date;
1969
+ /**
1970
+ *
1971
+ * @type {string}
1972
+ * @memberof CheckoutResponseData
1973
+ */
1974
+ currency: string;
1975
+ /**
1976
+ *
1977
+ * @type {string}
1978
+ * @memberof CheckoutResponseData
1979
+ */
1980
+ customerExternalId: string;
1981
+ /**
1982
+ *
1983
+ * @type {string}
1984
+ * @memberof CheckoutResponseData
1985
+ */
1986
+ defaultPaymentMethodId?: string | null;
1987
+ /**
1988
+ *
1989
+ * @type {Date}
1990
+ * @memberof CheckoutResponseData
1991
+ */
1992
+ expiredAt?: Date | null;
1993
+ /**
1994
+ *
1995
+ * @type {string}
1996
+ * @memberof CheckoutResponseData
1997
+ */
1998
+ id: string;
1999
+ /**
2000
+ *
2001
+ * @type {string}
2002
+ * @memberof CheckoutResponseData
2003
+ */
2004
+ interval: string;
2005
+ /**
2006
+ *
2007
+ * @type {object}
2008
+ * @memberof CheckoutResponseData
2009
+ */
2010
+ metadata?: object;
2011
+ /**
2012
+ *
2013
+ * @type {number}
2014
+ * @memberof CheckoutResponseData
2015
+ */
2016
+ periodEnd: number;
2017
+ /**
2018
+ *
2019
+ * @type {number}
2020
+ * @memberof CheckoutResponseData
2021
+ */
2022
+ periodStart: number;
2023
+ /**
2024
+ *
2025
+ * @type {string}
2026
+ * @memberof CheckoutResponseData
2027
+ */
2028
+ status: string;
2029
+ /**
2030
+ *
2031
+ * @type {string}
2032
+ * @memberof CheckoutResponseData
2033
+ */
2034
+ subscriptionExternalId: string;
2035
+ /**
2036
+ *
2037
+ * @type {number}
2038
+ * @memberof CheckoutResponseData
2039
+ */
2040
+ totalPrice: number;
2041
+ /**
2042
+ *
2043
+ * @type {number}
2044
+ * @memberof CheckoutResponseData
2045
+ */
2046
+ trialEnd?: number | null;
2047
+ /**
2048
+ *
2049
+ * @type {string}
2050
+ * @memberof CheckoutResponseData
2051
+ */
2052
+ trialEndSetting?: string | null;
2053
+ }
2054
+
2018
2055
  export declare interface CheckoutStage {
2019
2056
  id: string;
2020
2057
  name: string;
@@ -2286,6 +2323,61 @@ declare interface CompanyEventPeriodMetricsResponseData {
2286
2323
  value: number;
2287
2324
  }
2288
2325
 
2326
+ /**
2327
+ * Schematic API
2328
+ * Schematic API
2329
+ *
2330
+ * The version of the OpenAPI document: 0.1
2331
+ *
2332
+ *
2333
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2334
+ * https://openapi-generator.tech
2335
+ * Do not edit the class manually.
2336
+ */
2337
+ /**
2338
+ *
2339
+ * @export
2340
+ * @interface CompanyOverrideNoteResponseData
2341
+ */
2342
+ declare interface CompanyOverrideNoteResponseData {
2343
+ /**
2344
+ *
2345
+ * @type {Date}
2346
+ * @memberof CompanyOverrideNoteResponseData
2347
+ */
2348
+ createdAt: Date;
2349
+ /**
2350
+ *
2351
+ * @type {string}
2352
+ * @memberof CompanyOverrideNoteResponseData
2353
+ */
2354
+ externalUserId: string;
2355
+ /**
2356
+ *
2357
+ * @type {string}
2358
+ * @memberof CompanyOverrideNoteResponseData
2359
+ */
2360
+ externalUserName: string;
2361
+ /**
2362
+ *
2363
+ * @type {string}
2364
+ * @memberof CompanyOverrideNoteResponseData
2365
+ */
2366
+ id: string;
2367
+ /**
2368
+ *
2369
+ * @type {string}
2370
+ * @memberof CompanyOverrideNoteResponseData
2371
+ */
2372
+ note: string;
2373
+ /**
2374
+ *
2375
+ * @type {Date}
2376
+ * @memberof CompanyOverrideNoteResponseData
2377
+ */
2378
+ updatedAt: Date;
2379
+ }
2380
+
2289
2381
  /**
2290
2382
  *
2291
2383
  * @export
@@ -2333,7 +2425,7 @@ declare interface CompanyOverrideResponseData {
2333
2425
  * @type {FeatureResponseData}
2334
2426
  * @memberof CompanyOverrideResponseData
2335
2427
  */
2336
- feature?: FeatureResponseData_2;
2428
+ feature?: FeatureResponseData;
2337
2429
  /**
2338
2430
  *
2339
2431
  * @type {string}
@@ -2358,6 +2450,12 @@ declare interface CompanyOverrideResponseData {
2358
2450
  * @memberof CompanyOverrideResponseData
2359
2451
  */
2360
2452
  metricPeriodMonthReset?: string | null;
2453
+ /**
2454
+ *
2455
+ * @type {Array<CompanyOverrideNoteResponseData>}
2456
+ * @memberof CompanyOverrideResponseData
2457
+ */
2458
+ notes: Array<CompanyOverrideNoteResponseData>;
2361
2459
  /**
2362
2460
  *
2363
2461
  * @type {string}
@@ -2393,7 +2491,7 @@ declare interface CompanyOverrideResponseData {
2393
2491
  * @type {EntityTraitDefinitionResponseData}
2394
2492
  * @memberof CompanyOverrideResponseData
2395
2493
  */
2396
- valueTrait?: EntityTraitDefinitionResponseData_2;
2494
+ valueTrait?: EntityTraitDefinitionResponseData;
2397
2495
  /**
2398
2496
  *
2399
2497
  * @type {string}
@@ -2425,7 +2523,7 @@ declare interface CompanyPlanDetailResponseData {
2425
2523
  * @type {BillingProductDetailResponseData}
2426
2524
  * @memberof CompanyPlanDetailResponseData
2427
2525
  */
2428
- billingProduct?: BillingProductDetailResponseData_2;
2526
+ billingProduct?: BillingProductDetailResponseData;
2429
2527
  /**
2430
2528
  *
2431
2529
  * @type {string}
@@ -2479,7 +2577,7 @@ declare interface CompanyPlanDetailResponseData {
2479
2577
  * @type {CustomPlanConfig}
2480
2578
  * @memberof CompanyPlanDetailResponseData
2481
2579
  */
2482
- customPlanConfig?: CustomPlanConfig_2;
2580
+ customPlanConfig?: CustomPlanConfig;
2483
2581
  /**
2484
2582
  *
2485
2583
  * @type {string}
@@ -2491,13 +2589,13 @@ declare interface CompanyPlanDetailResponseData {
2491
2589
  * @type {Array<PlanEntitlementResponseData>}
2492
2590
  * @memberof CompanyPlanDetailResponseData
2493
2591
  */
2494
- entitlements: Array<PlanEntitlementResponseData_2>;
2592
+ entitlements: Array<PlanEntitlementResponseData>;
2495
2593
  /**
2496
2594
  *
2497
2595
  * @type {Array<FeatureDetailResponseData>}
2498
2596
  * @memberof CompanyPlanDetailResponseData
2499
2597
  */
2500
- features: Array<FeatureDetailResponseData_2>;
2598
+ features: Array<FeatureDetailResponseData>;
2501
2599
  /**
2502
2600
  *
2503
2601
  * @type {string}
@@ -2515,7 +2613,7 @@ declare interface CompanyPlanDetailResponseData {
2515
2613
  * @type {Array<PlanCreditGrantView>}
2516
2614
  * @memberof CompanyPlanDetailResponseData
2517
2615
  */
2518
- includedCreditGrants: Array<PlanCreditGrantView_2>;
2616
+ includedCreditGrants: Array<PlanCreditGrantView>;
2519
2617
  /**
2520
2618
  *
2521
2619
  * @type {boolean}
@@ -2545,7 +2643,7 @@ declare interface CompanyPlanDetailResponseData {
2545
2643
  * @type {BillingPriceResponseData}
2546
2644
  * @memberof CompanyPlanDetailResponseData
2547
2645
  */
2548
- monthlyPrice?: BillingPriceResponseData_2;
2646
+ monthlyPrice?: BillingPriceResponseData;
2549
2647
  /**
2550
2648
  *
2551
2649
  * @type {string}
@@ -2557,7 +2655,7 @@ declare interface CompanyPlanDetailResponseData {
2557
2655
  * @type {BillingPriceResponseData}
2558
2656
  * @memberof CompanyPlanDetailResponseData
2559
2657
  */
2560
- oneTimePrice?: BillingPriceResponseData_2;
2658
+ oneTimePrice?: BillingPriceResponseData;
2561
2659
  /**
2562
2660
  *
2563
2661
  * @type {string}
@@ -2593,7 +2691,7 @@ declare interface CompanyPlanDetailResponseData {
2593
2691
  * @type {BillingPriceResponseData}
2594
2692
  * @memberof CompanyPlanDetailResponseData
2595
2693
  */
2596
- yearlyPrice?: BillingPriceResponseData_2;
2694
+ yearlyPrice?: BillingPriceResponseData;
2597
2695
  }
2598
2696
 
2599
2697
  /**
@@ -2920,6 +3018,12 @@ declare interface ComponentCheckoutSettings {
2920
3018
  * @memberof ComponentCheckoutSettings
2921
3019
  */
2922
3020
  collectPhone: boolean;
3021
+ /**
3022
+ *
3023
+ * @type {boolean}
3024
+ * @memberof ComponentCheckoutSettings
3025
+ */
3026
+ taxCollectionEnabled: boolean;
2923
3027
  }
2924
3028
 
2925
3029
  /**
@@ -3000,6 +3104,18 @@ declare interface ComponentHydrateResponseData {
3000
3104
  * @memberof ComponentHydrateResponseData
3001
3105
  */
3002
3106
  featureUsage?: FeatureUsageDetailResponseData;
3107
+ /**
3108
+ *
3109
+ * @type {PlanDetailResponseData}
3110
+ * @memberof ComponentHydrateResponseData
3111
+ */
3112
+ postTrialPlan?: PlanDetailResponseData;
3113
+ /**
3114
+ *
3115
+ * @type {boolean}
3116
+ * @memberof ComponentHydrateResponseData
3117
+ */
3118
+ showCredits: boolean;
3003
3119
  /**
3004
3120
  *
3005
3121
  * @type {boolean}
@@ -3120,9 +3236,18 @@ declare interface ConfigurationParameters {
3120
3236
  credentials?: RequestCredentials;
3121
3237
  }
3122
3238
 
3239
+ declare interface ConfirmPaymentIntentProps {
3240
+ clientSecret: string;
3241
+ callback: (confirmed: boolean) => void;
3242
+ }
3243
+
3123
3244
  export declare const Container: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3124
3245
 
3125
- export declare const createActiveUsageBasedEntitlementsReducer: (entitlements: FeatureUsageResponseData[], period: string) => (acc: UsageBasedEntitlement[], entitlement: PlanEntitlementResponseData_2) => UsageBasedEntitlement[];
3246
+ export declare const createActiveUsageBasedEntitlementsReducer: (entitlements: FeatureUsageResponseData[], period: string) => (acc: UsageBasedEntitlement[], entitlement: PlanEntitlementResponseData) => UsageBasedEntitlement[];
3247
+
3248
+ declare type CreditBundle = BillingCreditBundleView & {
3249
+ count: number;
3250
+ };
3126
3251
 
3127
3252
  /**
3128
3253
  *
@@ -3739,6 +3864,7 @@ export declare interface EmbedContextProps extends EmbedState {
3739
3864
  deletePaymentMethod: (checkoutId: string) => DebouncedApiPromise<DeletePaymentMethodResponse>;
3740
3865
  previewCheckout: (changeSubscriptionRequestBody: ChangeSubscriptionRequestBody) => DebouncedApiPromise<PreviewCheckoutResponse>;
3741
3866
  checkout: (changeSubscriptionRequestBody: ChangeSubscriptionRequestBody) => DebouncedApiPromise<CheckoutResponse>;
3867
+ finishCheckout: (changeSubscriptionRequestBody: CheckoutResponseData) => void;
3742
3868
  unsubscribe: () => DebouncedApiPromise<CheckoutUnsubscribeResponse>;
3743
3869
  setAccessToken: (token: string) => void;
3744
3870
  setError: (error: Error) => void;
@@ -4046,7 +4172,7 @@ declare interface EntityTraitDetailResponseData {
4046
4172
  * @type {EntityTraitDefinitionResponseData}
4047
4173
  * @memberof EntityTraitDetailResponseData
4048
4174
  */
4049
- definition?: EntityTraitDefinitionResponseData_2;
4175
+ definition?: EntityTraitDefinitionResponseData;
4050
4176
  /**
4051
4177
  *
4052
4178
  * @type {string}
@@ -4734,7 +4860,7 @@ declare interface FeatureUsageResponseData {
4734
4860
  * @type {FeatureDetailResponseData}
4735
4861
  * @memberof FeatureUsageResponseData
4736
4862
  */
4737
- feature?: FeatureDetailResponseData_2;
4863
+ feature?: FeatureDetailResponseData;
4738
4864
  /**
4739
4865
  * The time at which the metric will reset.
4740
4866
  * @type {Date}
@@ -4752,7 +4878,7 @@ declare interface FeatureUsageResponseData {
4752
4878
  * @type {BillingPriceView}
4753
4879
  * @memberof FeatureUsageResponseData
4754
4880
  */
4755
- monthlyUsageBasedPrice?: BillingPriceView_2;
4881
+ monthlyUsageBasedPrice?: BillingPriceView;
4756
4882
  /**
4757
4883
  * The period over which usage is measured.
4758
4884
  * @type {string}
@@ -4764,13 +4890,13 @@ declare interface FeatureUsageResponseData {
4764
4890
  * @type {PlanResponseData}
4765
4891
  * @memberof FeatureUsageResponseData
4766
4892
  */
4767
- plan?: PlanResponseData_2;
4893
+ plan?: PlanResponseData;
4768
4894
  /**
4769
4895
  *
4770
4896
  * @type {PlanEntitlementResponseData}
4771
4897
  * @memberof FeatureUsageResponseData
4772
4898
  */
4773
- planEntitlement?: PlanEntitlementResponseData_2;
4899
+ planEntitlement?: PlanEntitlementResponseData;
4774
4900
  /**
4775
4901
  *
4776
4902
  * @type {string}
@@ -4794,7 +4920,7 @@ declare interface FeatureUsageResponseData {
4794
4920
  * @type {BillingPriceView}
4795
4921
  * @memberof FeatureUsageResponseData
4796
4922
  */
4797
- yearlyUsageBasedPrice?: BillingPriceView_2;
4923
+ yearlyUsageBasedPrice?: BillingPriceView;
4798
4924
  }
4799
4925
 
4800
4926
  /**
@@ -5176,6 +5302,7 @@ export declare const initialContext: {
5176
5302
  setData: () => never;
5177
5303
  updateSettings: () => never;
5178
5304
  debug: () => never;
5305
+ finishCheckout: () => never;
5179
5306
  isPending: boolean;
5180
5307
  stale: boolean;
5181
5308
  accessToken?: string;
@@ -5433,10 +5560,22 @@ portal?: HTMLElement | null;
5433
5560
  allowEdit?: boolean;
5434
5561
  } & RefAttributes<HTMLDivElement | null>>;
5435
5562
 
5436
- export declare const PaymentMethodDetails: ({ setPaymentMethodId, }: PaymentMethodDetailsProps) => JSX.Element;
5563
+ export declare const PaymentMethodDetails: ({ setPaymentMethodId, confirmPaymentIntentProps, financeData, onPaymentMethodSaved, }: PaymentMethodDetailsProps) => JSX.Element;
5437
5564
 
5438
5565
  declare interface PaymentMethodDetailsProps {
5439
5566
  setPaymentMethodId?: (id: string) => void;
5567
+ confirmPaymentIntentProps?: ConfirmPaymentIntentProps | null | undefined;
5568
+ financeData?: PreviewSubscriptionFinanceResponseData | null;
5569
+ onPaymentMethodSaved?: (updates: {
5570
+ period?: string;
5571
+ plan?: SelectedPlan;
5572
+ shouldTrial?: boolean;
5573
+ addOns?: SelectedPlan[];
5574
+ payInAdvanceEntitlements?: UsageBasedEntitlement[];
5575
+ addOnPayInAdvanceEntitlements?: UsageBasedEntitlement[];
5576
+ creditBundles?: CreditBundle[];
5577
+ promoCode?: string | null;
5578
+ }) => void;
5440
5579
  }
5441
5580
 
5442
5581
  export declare type PaymentMethodProps = DesignProps_5;
@@ -5617,6 +5756,24 @@ declare interface PlanCreditGrantView {
5617
5756
  * @memberof PlanCreditGrantView
5618
5757
  */
5619
5758
  creditName: string;
5759
+ /**
5760
+ *
5761
+ * @type {string}
5762
+ * @memberof PlanCreditGrantView
5763
+ */
5764
+ expiryType?: string | null;
5765
+ /**
5766
+ *
5767
+ * @type {string}
5768
+ * @memberof PlanCreditGrantView
5769
+ */
5770
+ expiryUnit?: string | null;
5771
+ /**
5772
+ *
5773
+ * @type {number}
5774
+ * @memberof PlanCreditGrantView
5775
+ */
5776
+ expiryUnitCount?: number | null;
5620
5777
  /**
5621
5778
  *
5622
5779
  * @type {string}
@@ -5653,6 +5810,12 @@ declare interface PlanCreditGrantView {
5653
5810
  * @memberof PlanCreditGrantView
5654
5811
  */
5655
5812
  resetStart: string;
5813
+ /**
5814
+ *
5815
+ * @type {string}
5816
+ * @memberof PlanCreditGrantView
5817
+ */
5818
+ resetType: string;
5656
5819
  /**
5657
5820
  *
5658
5821
  * @type {string}
@@ -5720,6 +5883,24 @@ declare interface PlanCreditGrantView_2 {
5720
5883
  * @memberof PlanCreditGrantView
5721
5884
  */
5722
5885
  creditName: string;
5886
+ /**
5887
+ *
5888
+ * @type {string}
5889
+ * @memberof PlanCreditGrantView
5890
+ */
5891
+ expiryType?: string | null;
5892
+ /**
5893
+ *
5894
+ * @type {string}
5895
+ * @memberof PlanCreditGrantView
5896
+ */
5897
+ expiryUnit?: string | null;
5898
+ /**
5899
+ *
5900
+ * @type {number}
5901
+ * @memberof PlanCreditGrantView
5902
+ */
5903
+ expiryUnitCount?: number | null;
5723
5904
  /**
5724
5905
  *
5725
5906
  * @type {string}
@@ -5756,6 +5937,12 @@ declare interface PlanCreditGrantView_2 {
5756
5937
  * @memberof PlanCreditGrantView
5757
5938
  */
5758
5939
  resetStart: string;
5940
+ /**
5941
+ *
5942
+ * @type {string}
5943
+ * @memberof PlanCreditGrantView
5944
+ */
5945
+ resetType: string;
5759
5946
  /**
5760
5947
  *
5761
5948
  * @type {string}
@@ -5787,7 +5974,7 @@ declare interface PlanDetailResponseData {
5787
5974
  * @type {BillingProductDetailResponseData}
5788
5975
  * @memberof PlanDetailResponseData
5789
5976
  */
5790
- billingProduct?: BillingProductDetailResponseData_2;
5977
+ billingProduct?: BillingProductDetailResponseData;
5791
5978
  /**
5792
5979
  *
5793
5980
  * @type {string}
@@ -5823,7 +6010,7 @@ declare interface PlanDetailResponseData {
5823
6010
  * @type {Array<FeatureDetailResponseData>}
5824
6011
  * @memberof PlanDetailResponseData
5825
6012
  */
5826
- features: Array<FeatureDetailResponseData_2>;
6013
+ features: Array<FeatureDetailResponseData>;
5827
6014
  /**
5828
6015
  *
5829
6016
  * @type {string}
@@ -5865,7 +6052,7 @@ declare interface PlanDetailResponseData {
5865
6052
  * @type {BillingPriceResponseData}
5866
6053
  * @memberof PlanDetailResponseData
5867
6054
  */
5868
- monthlyPrice?: BillingPriceResponseData_2;
6055
+ monthlyPrice?: BillingPriceResponseData;
5869
6056
  /**
5870
6057
  *
5871
6058
  * @type {string}
@@ -5877,7 +6064,7 @@ declare interface PlanDetailResponseData {
5877
6064
  * @type {BillingPriceResponseData}
5878
6065
  * @memberof PlanDetailResponseData
5879
6066
  */
5880
- oneTimePrice?: BillingPriceResponseData_2;
6067
+ oneTimePrice?: BillingPriceResponseData;
5881
6068
  /**
5882
6069
  *
5883
6070
  * @type {string}
@@ -5901,7 +6088,7 @@ declare interface PlanDetailResponseData {
5901
6088
  * @type {BillingPriceResponseData}
5902
6089
  * @memberof PlanDetailResponseData
5903
6090
  */
5904
- yearlyPrice?: BillingPriceResponseData_2;
6091
+ yearlyPrice?: BillingPriceResponseData;
5905
6092
  }
5906
6093
 
5907
6094
  /**
@@ -6377,7 +6564,7 @@ declare interface PlanViewPublicResponseData {
6377
6564
  * @type {BillingProductDetailResponseData}
6378
6565
  * @memberof PlanViewPublicResponseData
6379
6566
  */
6380
- billingProduct?: BillingProductDetailResponseData;
6567
+ billingProduct?: BillingProductDetailResponseData_2;
6381
6568
  /**
6382
6569
  *
6383
6570
  * @type {string}
@@ -6419,7 +6606,7 @@ declare interface PlanViewPublicResponseData {
6419
6606
  * @type {CustomPlanConfig}
6420
6607
  * @memberof PlanViewPublicResponseData
6421
6608
  */
6422
- customPlanConfig?: CustomPlanConfig;
6609
+ customPlanConfig?: CustomPlanConfig_2;
6423
6610
  /**
6424
6611
  *
6425
6612
  * @type {string}
@@ -6431,13 +6618,13 @@ declare interface PlanViewPublicResponseData {
6431
6618
  * @type {Array<PlanEntitlementResponseData>}
6432
6619
  * @memberof PlanViewPublicResponseData
6433
6620
  */
6434
- entitlements: Array<PlanEntitlementResponseData>;
6621
+ entitlements: Array<PlanEntitlementResponseData_2>;
6435
6622
  /**
6436
6623
  *
6437
6624
  * @type {Array<FeatureDetailResponseData>}
6438
6625
  * @memberof PlanViewPublicResponseData
6439
6626
  */
6440
- features: Array<FeatureDetailResponseData>;
6627
+ features: Array<FeatureDetailResponseData_2>;
6441
6628
  /**
6442
6629
  *
6443
6630
  * @type {string}
@@ -6455,7 +6642,7 @@ declare interface PlanViewPublicResponseData {
6455
6642
  * @type {Array<PlanCreditGrantView>}
6456
6643
  * @memberof PlanViewPublicResponseData
6457
6644
  */
6458
- includedCreditGrants: Array<PlanCreditGrantView>;
6645
+ includedCreditGrants: Array<PlanCreditGrantView_2>;
6459
6646
  /**
6460
6647
  *
6461
6648
  * @type {boolean}
@@ -6485,7 +6672,7 @@ declare interface PlanViewPublicResponseData {
6485
6672
  * @type {BillingPriceResponseData}
6486
6673
  * @memberof PlanViewPublicResponseData
6487
6674
  */
6488
- monthlyPrice?: BillingPriceResponseData;
6675
+ monthlyPrice?: BillingPriceResponseData_2;
6489
6676
  /**
6490
6677
  *
6491
6678
  * @type {string}
@@ -6497,7 +6684,7 @@ declare interface PlanViewPublicResponseData {
6497
6684
  * @type {BillingPriceResponseData}
6498
6685
  * @memberof PlanViewPublicResponseData
6499
6686
  */
6500
- oneTimePrice?: BillingPriceResponseData;
6687
+ oneTimePrice?: BillingPriceResponseData_2;
6501
6688
  /**
6502
6689
  *
6503
6690
  * @type {string}
@@ -6521,7 +6708,7 @@ declare interface PlanViewPublicResponseData {
6521
6708
  * @type {BillingPriceResponseData}
6522
6709
  * @memberof PlanViewPublicResponseData
6523
6710
  */
6524
- yearlyPrice?: BillingPriceResponseData;
6711
+ yearlyPrice?: BillingPriceResponseData_2;
6525
6712
  }
6526
6713
 
6527
6714
  export declare type Position = "top" | "right" | "bottom" | "left";
@@ -6848,6 +7035,24 @@ declare interface PreviewSubscriptionFinanceResponseData {
6848
7035
  * @memberof PreviewSubscriptionFinanceResponseData
6849
7036
  */
6850
7037
  proration: number;
7038
+ /**
7039
+ *
7040
+ * @type {number}
7041
+ * @memberof PreviewSubscriptionFinanceResponseData
7042
+ */
7043
+ taxAmount?: number | null;
7044
+ /**
7045
+ *
7046
+ * @type {string}
7047
+ * @memberof PreviewSubscriptionFinanceResponseData
7048
+ */
7049
+ taxDisplayName?: string | null;
7050
+ /**
7051
+ *
7052
+ * @type {boolean}
7053
+ * @memberof PreviewSubscriptionFinanceResponseData
7054
+ */
7055
+ taxRequireBillingDetails: boolean;
6851
7056
  /**
6852
7057
  *
6853
7058
  * @type {Date}
@@ -6963,6 +7168,12 @@ declare interface PublicPlansResponseData {
6963
7168
  * @memberof PublicPlansResponseData
6964
7169
  */
6965
7170
  capabilities?: ComponentCapabilities_2;
7171
+ /**
7172
+ *
7173
+ * @type {boolean}
7174
+ * @memberof PublicPlansResponseData
7175
+ */
7176
+ showCredits: boolean;
6966
7177
  /**
6967
7178
  *
6968
7179
  * @type {boolean}
@@ -7865,7 +8076,7 @@ declare interface UpdatePaymentMethodResponse {
7865
8076
  params: object;
7866
8077
  }
7867
8078
 
7868
- declare interface UsageBasedEntitlement extends PlanEntitlementResponseData_2 {
8079
+ declare interface UsageBasedEntitlement extends PlanEntitlementResponseData {
7869
8080
  allocation: number;
7870
8081
  usage: number;
7871
8082
  quantity: number;
@@ -7900,7 +8111,7 @@ declare interface UsageBasedEntitlementResponseData {
7900
8111
  * @type {BillingPriceView}
7901
8112
  * @memberof UsageBasedEntitlementResponseData
7902
8113
  */
7903
- meteredPrice?: BillingPriceView_2;
8114
+ meteredPrice?: BillingPriceView;
7904
8115
  /**
7905
8116
  *
7906
8117
  * @type {string}
@@ -7918,7 +8129,7 @@ declare interface UsageBasedEntitlementResponseData {
7918
8129
  * @type {BillingPriceView}
7919
8130
  * @memberof UsageBasedEntitlementResponseData
7920
8131
  */
7921
- monthlyUsageBasedPrice?: BillingPriceView_2;
8132
+ monthlyUsageBasedPrice?: BillingPriceView;
7922
8133
  /**
7923
8134
  *
7924
8135
  * @type {string}
@@ -7948,7 +8159,7 @@ declare interface UsageBasedEntitlementResponseData {
7948
8159
  * @type {BillingPriceView}
7949
8160
  * @memberof UsageBasedEntitlementResponseData
7950
8161
  */
7951
- yearlyUsageBasedPrice?: BillingPriceView_2;
8162
+ yearlyUsageBasedPrice?: BillingPriceView;
7952
8163
  }
7953
8164
 
7954
8165
  export declare function useAvailablePlans(activePeriod: string, options?: AvailablePlanOptions): {
@@ -7961,6 +8172,24 @@ export declare const useEmbed: () => EmbedContextProps;
7961
8172
 
7962
8173
  export declare function useIsLightBackground(): boolean;
7963
8174
 
8175
+ export declare const usePaymentConfirmation: ({ stripe, clientSecret, onSuccess, onError, autoConfirm, }: UsePaymentConfirmationProps) => UsePaymentConfirmationReturn;
8176
+
8177
+ declare interface UsePaymentConfirmationProps {
8178
+ stripe: Promise<Stripe | null> | null;
8179
+ clientSecret?: string;
8180
+ onSuccess?: () => void;
8181
+ onError?: (error: Error) => void;
8182
+ autoConfirm?: boolean;
8183
+ }
8184
+
8185
+ declare interface UsePaymentConfirmationReturn {
8186
+ confirmPayment: () => Promise<void>;
8187
+ isConfirming: boolean;
8188
+ error: Error | null;
8189
+ status: "idle" | "confirming" | "succeeded" | "failed";
8190
+ reset: () => void;
8191
+ }
8192
+
7964
8193
  export declare function usePrevious<T>(value: T): T | undefined;
7965
8194
 
7966
8195
  export declare function useRequest<TData>(fn: () => Promise<{