@schematichq/schematic-components 1.6.2 → 1.7.1

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}
@@ -831,11 +856,12 @@ declare interface BillingProductDetailResponseData {
831
856
  */
832
857
  createdAt: Date;
833
858
  /**
834
- *
859
+ * Deprecated; currencies are associated with prices, not products
835
860
  * @type {string}
836
861
  * @memberof BillingProductDetailResponseData
862
+ * @deprecated
837
863
  */
838
- currency: string;
864
+ currency?: string | null;
839
865
  /**
840
866
  *
841
867
  * @type {string}
@@ -923,11 +949,12 @@ declare interface BillingProductDetailResponseData_2 {
923
949
  */
924
950
  createdAt: Date;
925
951
  /**
926
- *
952
+ * Deprecated; currencies are associated with prices, not products
927
953
  * @type {string}
928
954
  * @memberof BillingProductDetailResponseData
955
+ * @deprecated
929
956
  */
930
- currency: string;
957
+ currency?: string | null;
931
958
  /**
932
959
  *
933
960
  * @type {string}
@@ -1097,7 +1124,7 @@ declare interface BillingProductForSubscriptionResponseData {
1097
1124
  * @type {Array<BillingProductPriceTierResponseData>}
1098
1125
  * @memberof BillingProductForSubscriptionResponseData
1099
1126
  */
1100
- priceTier: Array<BillingProductPriceTierResponseData_2>;
1127
+ priceTier: Array<BillingProductPriceTierResponseData>;
1101
1128
  /**
1102
1129
  *
1103
1130
  * @type {number}
@@ -1355,11 +1382,12 @@ declare interface BillingProductResponseData {
1355
1382
  */
1356
1383
  createdAt: Date;
1357
1384
  /**
1358
- *
1385
+ * Deprecated; currencies are associated with prices, not products
1359
1386
  * @type {string}
1360
1387
  * @memberof BillingProductResponseData
1388
+ * @deprecated
1361
1389
  */
1362
- currency: string;
1390
+ currency?: string | null;
1363
1391
  /**
1364
1392
  *
1365
1393
  * @type {string}
@@ -1446,11 +1474,12 @@ declare interface BillingProductResponseData_2 {
1446
1474
  */
1447
1475
  createdAt: Date;
1448
1476
  /**
1449
- *
1477
+ * Deprecated; currencies are associated with prices, not products
1450
1478
  * @type {string}
1451
1479
  * @memberof BillingProductResponseData
1480
+ * @deprecated
1452
1481
  */
1453
- currency: string;
1482
+ currency?: string | null;
1454
1483
  /**
1455
1484
  *
1456
1485
  * @type {string}
@@ -1610,133 +1639,6 @@ declare interface BillingSubscriptionDiscountView {
1610
1639
  subscriptionExternalId: string;
1611
1640
  }
1612
1641
 
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
1642
  /**
1741
1643
  *
1742
1644
  * @export
@@ -2003,10 +1905,10 @@ declare interface CheckoutDialogProps {
2003
1905
  declare interface CheckoutResponse {
2004
1906
  /**
2005
1907
  *
2006
- * @type {BillingSubscriptionResponseData}
1908
+ * @type {CheckoutResponseData}
2007
1909
  * @memberof CheckoutResponse
2008
1910
  */
2009
- data: BillingSubscriptionResponseData;
1911
+ data: CheckoutResponseData;
2010
1912
  /**
2011
1913
  * Input parameters
2012
1914
  * @type {object}
@@ -2015,6 +1917,145 @@ declare interface CheckoutResponse {
2015
1917
  params: object;
2016
1918
  }
2017
1919
 
1920
+ /**
1921
+ * Schematic API
1922
+ * Schematic API
1923
+ *
1924
+ * The version of the OpenAPI document: 0.1
1925
+ *
1926
+ *
1927
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1928
+ * https://openapi-generator.tech
1929
+ * Do not edit the class manually.
1930
+ */
1931
+ /**
1932
+ *
1933
+ * @export
1934
+ * @interface CheckoutResponseData
1935
+ */
1936
+ declare interface CheckoutResponseData {
1937
+ /**
1938
+ *
1939
+ * @type {number}
1940
+ * @memberof CheckoutResponseData
1941
+ */
1942
+ cancelAt?: number | null;
1943
+ /**
1944
+ *
1945
+ * @type {boolean}
1946
+ * @memberof CheckoutResponseData
1947
+ */
1948
+ cancelAtPeriodEnd: boolean;
1949
+ /**
1950
+ *
1951
+ * @type {string}
1952
+ * @memberof CheckoutResponseData
1953
+ */
1954
+ companyId?: string | null;
1955
+ /**
1956
+ *
1957
+ * @type {string}
1958
+ * @memberof CheckoutResponseData
1959
+ */
1960
+ confirmPaymentIntentClientSecret?: string | null;
1961
+ /**
1962
+ *
1963
+ * @type {string}
1964
+ * @memberof CheckoutResponseData
1965
+ */
1966
+ confirmPaymentIntentId?: string | null;
1967
+ /**
1968
+ *
1969
+ * @type {Date}
1970
+ * @memberof CheckoutResponseData
1971
+ */
1972
+ createdAt: Date;
1973
+ /**
1974
+ *
1975
+ * @type {string}
1976
+ * @memberof CheckoutResponseData
1977
+ */
1978
+ currency: string;
1979
+ /**
1980
+ *
1981
+ * @type {string}
1982
+ * @memberof CheckoutResponseData
1983
+ */
1984
+ customerExternalId: string;
1985
+ /**
1986
+ *
1987
+ * @type {string}
1988
+ * @memberof CheckoutResponseData
1989
+ */
1990
+ defaultPaymentMethodId?: string | null;
1991
+ /**
1992
+ *
1993
+ * @type {Date}
1994
+ * @memberof CheckoutResponseData
1995
+ */
1996
+ expiredAt?: Date | null;
1997
+ /**
1998
+ *
1999
+ * @type {string}
2000
+ * @memberof CheckoutResponseData
2001
+ */
2002
+ id: string;
2003
+ /**
2004
+ *
2005
+ * @type {string}
2006
+ * @memberof CheckoutResponseData
2007
+ */
2008
+ interval: string;
2009
+ /**
2010
+ *
2011
+ * @type {object}
2012
+ * @memberof CheckoutResponseData
2013
+ */
2014
+ metadata?: object;
2015
+ /**
2016
+ *
2017
+ * @type {number}
2018
+ * @memberof CheckoutResponseData
2019
+ */
2020
+ periodEnd: number;
2021
+ /**
2022
+ *
2023
+ * @type {number}
2024
+ * @memberof CheckoutResponseData
2025
+ */
2026
+ periodStart: number;
2027
+ /**
2028
+ *
2029
+ * @type {string}
2030
+ * @memberof CheckoutResponseData
2031
+ */
2032
+ status: string;
2033
+ /**
2034
+ *
2035
+ * @type {string}
2036
+ * @memberof CheckoutResponseData
2037
+ */
2038
+ subscriptionExternalId: string;
2039
+ /**
2040
+ *
2041
+ * @type {number}
2042
+ * @memberof CheckoutResponseData
2043
+ */
2044
+ totalPrice: number;
2045
+ /**
2046
+ *
2047
+ * @type {number}
2048
+ * @memberof CheckoutResponseData
2049
+ */
2050
+ trialEnd?: number | null;
2051
+ /**
2052
+ *
2053
+ * @type {string}
2054
+ * @memberof CheckoutResponseData
2055
+ */
2056
+ trialEndSetting?: string | null;
2057
+ }
2058
+
2018
2059
  export declare interface CheckoutStage {
2019
2060
  id: string;
2020
2061
  name: string;
@@ -2286,6 +2327,61 @@ declare interface CompanyEventPeriodMetricsResponseData {
2286
2327
  value: number;
2287
2328
  }
2288
2329
 
2330
+ /**
2331
+ * Schematic API
2332
+ * Schematic API
2333
+ *
2334
+ * The version of the OpenAPI document: 0.1
2335
+ *
2336
+ *
2337
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2338
+ * https://openapi-generator.tech
2339
+ * Do not edit the class manually.
2340
+ */
2341
+ /**
2342
+ *
2343
+ * @export
2344
+ * @interface CompanyOverrideNoteResponseData
2345
+ */
2346
+ declare interface CompanyOverrideNoteResponseData {
2347
+ /**
2348
+ *
2349
+ * @type {Date}
2350
+ * @memberof CompanyOverrideNoteResponseData
2351
+ */
2352
+ createdAt: Date;
2353
+ /**
2354
+ *
2355
+ * @type {string}
2356
+ * @memberof CompanyOverrideNoteResponseData
2357
+ */
2358
+ externalUserId: string;
2359
+ /**
2360
+ *
2361
+ * @type {string}
2362
+ * @memberof CompanyOverrideNoteResponseData
2363
+ */
2364
+ externalUserName: string;
2365
+ /**
2366
+ *
2367
+ * @type {string}
2368
+ * @memberof CompanyOverrideNoteResponseData
2369
+ */
2370
+ id: string;
2371
+ /**
2372
+ *
2373
+ * @type {string}
2374
+ * @memberof CompanyOverrideNoteResponseData
2375
+ */
2376
+ note: string;
2377
+ /**
2378
+ *
2379
+ * @type {Date}
2380
+ * @memberof CompanyOverrideNoteResponseData
2381
+ */
2382
+ updatedAt: Date;
2383
+ }
2384
+
2289
2385
  /**
2290
2386
  *
2291
2387
  * @export
@@ -2333,7 +2429,7 @@ declare interface CompanyOverrideResponseData {
2333
2429
  * @type {FeatureResponseData}
2334
2430
  * @memberof CompanyOverrideResponseData
2335
2431
  */
2336
- feature?: FeatureResponseData_2;
2432
+ feature?: FeatureResponseData;
2337
2433
  /**
2338
2434
  *
2339
2435
  * @type {string}
@@ -2358,6 +2454,12 @@ declare interface CompanyOverrideResponseData {
2358
2454
  * @memberof CompanyOverrideResponseData
2359
2455
  */
2360
2456
  metricPeriodMonthReset?: string | null;
2457
+ /**
2458
+ *
2459
+ * @type {Array<CompanyOverrideNoteResponseData>}
2460
+ * @memberof CompanyOverrideResponseData
2461
+ */
2462
+ notes: Array<CompanyOverrideNoteResponseData>;
2361
2463
  /**
2362
2464
  *
2363
2465
  * @type {string}
@@ -2393,7 +2495,7 @@ declare interface CompanyOverrideResponseData {
2393
2495
  * @type {EntityTraitDefinitionResponseData}
2394
2496
  * @memberof CompanyOverrideResponseData
2395
2497
  */
2396
- valueTrait?: EntityTraitDefinitionResponseData_2;
2498
+ valueTrait?: EntityTraitDefinitionResponseData;
2397
2499
  /**
2398
2500
  *
2399
2501
  * @type {string}
@@ -2425,7 +2527,7 @@ declare interface CompanyPlanDetailResponseData {
2425
2527
  * @type {BillingProductDetailResponseData}
2426
2528
  * @memberof CompanyPlanDetailResponseData
2427
2529
  */
2428
- billingProduct?: BillingProductDetailResponseData_2;
2530
+ billingProduct?: BillingProductDetailResponseData;
2429
2531
  /**
2430
2532
  *
2431
2533
  * @type {string}
@@ -2479,7 +2581,7 @@ declare interface CompanyPlanDetailResponseData {
2479
2581
  * @type {CustomPlanConfig}
2480
2582
  * @memberof CompanyPlanDetailResponseData
2481
2583
  */
2482
- customPlanConfig?: CustomPlanConfig_2;
2584
+ customPlanConfig?: CustomPlanConfig;
2483
2585
  /**
2484
2586
  *
2485
2587
  * @type {string}
@@ -2491,13 +2593,13 @@ declare interface CompanyPlanDetailResponseData {
2491
2593
  * @type {Array<PlanEntitlementResponseData>}
2492
2594
  * @memberof CompanyPlanDetailResponseData
2493
2595
  */
2494
- entitlements: Array<PlanEntitlementResponseData_2>;
2596
+ entitlements: Array<PlanEntitlementResponseData>;
2495
2597
  /**
2496
2598
  *
2497
2599
  * @type {Array<FeatureDetailResponseData>}
2498
2600
  * @memberof CompanyPlanDetailResponseData
2499
2601
  */
2500
- features: Array<FeatureDetailResponseData_2>;
2602
+ features: Array<FeatureDetailResponseData>;
2501
2603
  /**
2502
2604
  *
2503
2605
  * @type {string}
@@ -2515,7 +2617,7 @@ declare interface CompanyPlanDetailResponseData {
2515
2617
  * @type {Array<PlanCreditGrantView>}
2516
2618
  * @memberof CompanyPlanDetailResponseData
2517
2619
  */
2518
- includedCreditGrants: Array<PlanCreditGrantView_2>;
2620
+ includedCreditGrants: Array<PlanCreditGrantView>;
2519
2621
  /**
2520
2622
  *
2521
2623
  * @type {boolean}
@@ -2545,7 +2647,7 @@ declare interface CompanyPlanDetailResponseData {
2545
2647
  * @type {BillingPriceResponseData}
2546
2648
  * @memberof CompanyPlanDetailResponseData
2547
2649
  */
2548
- monthlyPrice?: BillingPriceResponseData_2;
2650
+ monthlyPrice?: BillingPriceResponseData;
2549
2651
  /**
2550
2652
  *
2551
2653
  * @type {string}
@@ -2557,7 +2659,7 @@ declare interface CompanyPlanDetailResponseData {
2557
2659
  * @type {BillingPriceResponseData}
2558
2660
  * @memberof CompanyPlanDetailResponseData
2559
2661
  */
2560
- oneTimePrice?: BillingPriceResponseData_2;
2662
+ oneTimePrice?: BillingPriceResponseData;
2561
2663
  /**
2562
2664
  *
2563
2665
  * @type {string}
@@ -2593,7 +2695,7 @@ declare interface CompanyPlanDetailResponseData {
2593
2695
  * @type {BillingPriceResponseData}
2594
2696
  * @memberof CompanyPlanDetailResponseData
2595
2697
  */
2596
- yearlyPrice?: BillingPriceResponseData_2;
2698
+ yearlyPrice?: BillingPriceResponseData;
2597
2699
  }
2598
2700
 
2599
2701
  /**
@@ -2920,6 +3022,12 @@ declare interface ComponentCheckoutSettings {
2920
3022
  * @memberof ComponentCheckoutSettings
2921
3023
  */
2922
3024
  collectPhone: boolean;
3025
+ /**
3026
+ *
3027
+ * @type {boolean}
3028
+ * @memberof ComponentCheckoutSettings
3029
+ */
3030
+ taxCollectionEnabled: boolean;
2923
3031
  }
2924
3032
 
2925
3033
  /**
@@ -3000,6 +3108,18 @@ declare interface ComponentHydrateResponseData {
3000
3108
  * @memberof ComponentHydrateResponseData
3001
3109
  */
3002
3110
  featureUsage?: FeatureUsageDetailResponseData;
3111
+ /**
3112
+ *
3113
+ * @type {PlanDetailResponseData}
3114
+ * @memberof ComponentHydrateResponseData
3115
+ */
3116
+ postTrialPlan?: PlanDetailResponseData;
3117
+ /**
3118
+ *
3119
+ * @type {boolean}
3120
+ * @memberof ComponentHydrateResponseData
3121
+ */
3122
+ showCredits: boolean;
3003
3123
  /**
3004
3124
  *
3005
3125
  * @type {boolean}
@@ -3120,9 +3240,18 @@ declare interface ConfigurationParameters {
3120
3240
  credentials?: RequestCredentials;
3121
3241
  }
3122
3242
 
3243
+ declare interface ConfirmPaymentIntentProps {
3244
+ clientSecret: string;
3245
+ callback: (confirmed: boolean) => void;
3246
+ }
3247
+
3123
3248
  export declare const Container: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3124
3249
 
3125
- export declare const createActiveUsageBasedEntitlementsReducer: (entitlements: FeatureUsageResponseData[], period: string) => (acc: UsageBasedEntitlement[], entitlement: PlanEntitlementResponseData_2) => UsageBasedEntitlement[];
3250
+ export declare const createActiveUsageBasedEntitlementsReducer: (entitlements: FeatureUsageResponseData[], period: string) => (acc: UsageBasedEntitlement[], entitlement: PlanEntitlementResponseData) => UsageBasedEntitlement[];
3251
+
3252
+ declare type CreditBundle = BillingCreditBundleView & {
3253
+ count: number;
3254
+ };
3126
3255
 
3127
3256
  /**
3128
3257
  *
@@ -3739,6 +3868,7 @@ export declare interface EmbedContextProps extends EmbedState {
3739
3868
  deletePaymentMethod: (checkoutId: string) => DebouncedApiPromise<DeletePaymentMethodResponse>;
3740
3869
  previewCheckout: (changeSubscriptionRequestBody: ChangeSubscriptionRequestBody) => DebouncedApiPromise<PreviewCheckoutResponse>;
3741
3870
  checkout: (changeSubscriptionRequestBody: ChangeSubscriptionRequestBody) => DebouncedApiPromise<CheckoutResponse>;
3871
+ finishCheckout: (changeSubscriptionRequestBody: CheckoutResponseData) => void;
3742
3872
  unsubscribe: () => DebouncedApiPromise<CheckoutUnsubscribeResponse>;
3743
3873
  setAccessToken: (token: string) => void;
3744
3874
  setError: (error: Error) => void;
@@ -4046,7 +4176,7 @@ declare interface EntityTraitDetailResponseData {
4046
4176
  * @type {EntityTraitDefinitionResponseData}
4047
4177
  * @memberof EntityTraitDetailResponseData
4048
4178
  */
4049
- definition?: EntityTraitDefinitionResponseData_2;
4179
+ definition?: EntityTraitDefinitionResponseData;
4050
4180
  /**
4051
4181
  *
4052
4182
  * @type {string}
@@ -4734,7 +4864,7 @@ declare interface FeatureUsageResponseData {
4734
4864
  * @type {FeatureDetailResponseData}
4735
4865
  * @memberof FeatureUsageResponseData
4736
4866
  */
4737
- feature?: FeatureDetailResponseData_2;
4867
+ feature?: FeatureDetailResponseData;
4738
4868
  /**
4739
4869
  * The time at which the metric will reset.
4740
4870
  * @type {Date}
@@ -4752,7 +4882,7 @@ declare interface FeatureUsageResponseData {
4752
4882
  * @type {BillingPriceView}
4753
4883
  * @memberof FeatureUsageResponseData
4754
4884
  */
4755
- monthlyUsageBasedPrice?: BillingPriceView_2;
4885
+ monthlyUsageBasedPrice?: BillingPriceView;
4756
4886
  /**
4757
4887
  * The period over which usage is measured.
4758
4888
  * @type {string}
@@ -4764,13 +4894,13 @@ declare interface FeatureUsageResponseData {
4764
4894
  * @type {PlanResponseData}
4765
4895
  * @memberof FeatureUsageResponseData
4766
4896
  */
4767
- plan?: PlanResponseData_2;
4897
+ plan?: PlanResponseData;
4768
4898
  /**
4769
4899
  *
4770
4900
  * @type {PlanEntitlementResponseData}
4771
4901
  * @memberof FeatureUsageResponseData
4772
4902
  */
4773
- planEntitlement?: PlanEntitlementResponseData_2;
4903
+ planEntitlement?: PlanEntitlementResponseData;
4774
4904
  /**
4775
4905
  *
4776
4906
  * @type {string}
@@ -4794,7 +4924,7 @@ declare interface FeatureUsageResponseData {
4794
4924
  * @type {BillingPriceView}
4795
4925
  * @memberof FeatureUsageResponseData
4796
4926
  */
4797
- yearlyUsageBasedPrice?: BillingPriceView_2;
4927
+ yearlyUsageBasedPrice?: BillingPriceView;
4798
4928
  }
4799
4929
 
4800
4930
  /**
@@ -5176,6 +5306,7 @@ export declare const initialContext: {
5176
5306
  setData: () => never;
5177
5307
  updateSettings: () => never;
5178
5308
  debug: () => never;
5309
+ finishCheckout: () => never;
5179
5310
  isPending: boolean;
5180
5311
  stale: boolean;
5181
5312
  accessToken?: string;
@@ -5433,10 +5564,22 @@ portal?: HTMLElement | null;
5433
5564
  allowEdit?: boolean;
5434
5565
  } & RefAttributes<HTMLDivElement | null>>;
5435
5566
 
5436
- export declare const PaymentMethodDetails: ({ setPaymentMethodId, }: PaymentMethodDetailsProps) => JSX.Element;
5567
+ export declare const PaymentMethodDetails: ({ setPaymentMethodId, confirmPaymentIntentProps, financeData, onPaymentMethodSaved, }: PaymentMethodDetailsProps) => JSX.Element;
5437
5568
 
5438
5569
  declare interface PaymentMethodDetailsProps {
5439
5570
  setPaymentMethodId?: (id: string) => void;
5571
+ confirmPaymentIntentProps?: ConfirmPaymentIntentProps | null | undefined;
5572
+ financeData?: PreviewSubscriptionFinanceResponseData | null;
5573
+ onPaymentMethodSaved?: (updates: {
5574
+ period?: string;
5575
+ plan?: SelectedPlan;
5576
+ shouldTrial?: boolean;
5577
+ addOns?: SelectedPlan[];
5578
+ payInAdvanceEntitlements?: UsageBasedEntitlement[];
5579
+ addOnPayInAdvanceEntitlements?: UsageBasedEntitlement[];
5580
+ creditBundles?: CreditBundle[];
5581
+ promoCode?: string | null;
5582
+ }) => void;
5440
5583
  }
5441
5584
 
5442
5585
  export declare type PaymentMethodProps = DesignProps_5;
@@ -5617,6 +5760,24 @@ declare interface PlanCreditGrantView {
5617
5760
  * @memberof PlanCreditGrantView
5618
5761
  */
5619
5762
  creditName: string;
5763
+ /**
5764
+ *
5765
+ * @type {string}
5766
+ * @memberof PlanCreditGrantView
5767
+ */
5768
+ expiryType?: string | null;
5769
+ /**
5770
+ *
5771
+ * @type {string}
5772
+ * @memberof PlanCreditGrantView
5773
+ */
5774
+ expiryUnit?: string | null;
5775
+ /**
5776
+ *
5777
+ * @type {number}
5778
+ * @memberof PlanCreditGrantView
5779
+ */
5780
+ expiryUnitCount?: number | null;
5620
5781
  /**
5621
5782
  *
5622
5783
  * @type {string}
@@ -5653,6 +5814,12 @@ declare interface PlanCreditGrantView {
5653
5814
  * @memberof PlanCreditGrantView
5654
5815
  */
5655
5816
  resetStart: string;
5817
+ /**
5818
+ *
5819
+ * @type {string}
5820
+ * @memberof PlanCreditGrantView
5821
+ */
5822
+ resetType: string;
5656
5823
  /**
5657
5824
  *
5658
5825
  * @type {string}
@@ -5720,6 +5887,24 @@ declare interface PlanCreditGrantView_2 {
5720
5887
  * @memberof PlanCreditGrantView
5721
5888
  */
5722
5889
  creditName: string;
5890
+ /**
5891
+ *
5892
+ * @type {string}
5893
+ * @memberof PlanCreditGrantView
5894
+ */
5895
+ expiryType?: string | null;
5896
+ /**
5897
+ *
5898
+ * @type {string}
5899
+ * @memberof PlanCreditGrantView
5900
+ */
5901
+ expiryUnit?: string | null;
5902
+ /**
5903
+ *
5904
+ * @type {number}
5905
+ * @memberof PlanCreditGrantView
5906
+ */
5907
+ expiryUnitCount?: number | null;
5723
5908
  /**
5724
5909
  *
5725
5910
  * @type {string}
@@ -5756,6 +5941,12 @@ declare interface PlanCreditGrantView_2 {
5756
5941
  * @memberof PlanCreditGrantView
5757
5942
  */
5758
5943
  resetStart: string;
5944
+ /**
5945
+ *
5946
+ * @type {string}
5947
+ * @memberof PlanCreditGrantView
5948
+ */
5949
+ resetType: string;
5759
5950
  /**
5760
5951
  *
5761
5952
  * @type {string}
@@ -5787,7 +5978,7 @@ declare interface PlanDetailResponseData {
5787
5978
  * @type {BillingProductDetailResponseData}
5788
5979
  * @memberof PlanDetailResponseData
5789
5980
  */
5790
- billingProduct?: BillingProductDetailResponseData_2;
5981
+ billingProduct?: BillingProductDetailResponseData;
5791
5982
  /**
5792
5983
  *
5793
5984
  * @type {string}
@@ -5823,7 +6014,7 @@ declare interface PlanDetailResponseData {
5823
6014
  * @type {Array<FeatureDetailResponseData>}
5824
6015
  * @memberof PlanDetailResponseData
5825
6016
  */
5826
- features: Array<FeatureDetailResponseData_2>;
6017
+ features: Array<FeatureDetailResponseData>;
5827
6018
  /**
5828
6019
  *
5829
6020
  * @type {string}
@@ -5865,7 +6056,7 @@ declare interface PlanDetailResponseData {
5865
6056
  * @type {BillingPriceResponseData}
5866
6057
  * @memberof PlanDetailResponseData
5867
6058
  */
5868
- monthlyPrice?: BillingPriceResponseData_2;
6059
+ monthlyPrice?: BillingPriceResponseData;
5869
6060
  /**
5870
6061
  *
5871
6062
  * @type {string}
@@ -5877,7 +6068,7 @@ declare interface PlanDetailResponseData {
5877
6068
  * @type {BillingPriceResponseData}
5878
6069
  * @memberof PlanDetailResponseData
5879
6070
  */
5880
- oneTimePrice?: BillingPriceResponseData_2;
6071
+ oneTimePrice?: BillingPriceResponseData;
5881
6072
  /**
5882
6073
  *
5883
6074
  * @type {string}
@@ -5901,7 +6092,7 @@ declare interface PlanDetailResponseData {
5901
6092
  * @type {BillingPriceResponseData}
5902
6093
  * @memberof PlanDetailResponseData
5903
6094
  */
5904
- yearlyPrice?: BillingPriceResponseData_2;
6095
+ yearlyPrice?: BillingPriceResponseData;
5905
6096
  }
5906
6097
 
5907
6098
  /**
@@ -6377,7 +6568,7 @@ declare interface PlanViewPublicResponseData {
6377
6568
  * @type {BillingProductDetailResponseData}
6378
6569
  * @memberof PlanViewPublicResponseData
6379
6570
  */
6380
- billingProduct?: BillingProductDetailResponseData;
6571
+ billingProduct?: BillingProductDetailResponseData_2;
6381
6572
  /**
6382
6573
  *
6383
6574
  * @type {string}
@@ -6419,7 +6610,7 @@ declare interface PlanViewPublicResponseData {
6419
6610
  * @type {CustomPlanConfig}
6420
6611
  * @memberof PlanViewPublicResponseData
6421
6612
  */
6422
- customPlanConfig?: CustomPlanConfig;
6613
+ customPlanConfig?: CustomPlanConfig_2;
6423
6614
  /**
6424
6615
  *
6425
6616
  * @type {string}
@@ -6431,13 +6622,13 @@ declare interface PlanViewPublicResponseData {
6431
6622
  * @type {Array<PlanEntitlementResponseData>}
6432
6623
  * @memberof PlanViewPublicResponseData
6433
6624
  */
6434
- entitlements: Array<PlanEntitlementResponseData>;
6625
+ entitlements: Array<PlanEntitlementResponseData_2>;
6435
6626
  /**
6436
6627
  *
6437
6628
  * @type {Array<FeatureDetailResponseData>}
6438
6629
  * @memberof PlanViewPublicResponseData
6439
6630
  */
6440
- features: Array<FeatureDetailResponseData>;
6631
+ features: Array<FeatureDetailResponseData_2>;
6441
6632
  /**
6442
6633
  *
6443
6634
  * @type {string}
@@ -6455,7 +6646,7 @@ declare interface PlanViewPublicResponseData {
6455
6646
  * @type {Array<PlanCreditGrantView>}
6456
6647
  * @memberof PlanViewPublicResponseData
6457
6648
  */
6458
- includedCreditGrants: Array<PlanCreditGrantView>;
6649
+ includedCreditGrants: Array<PlanCreditGrantView_2>;
6459
6650
  /**
6460
6651
  *
6461
6652
  * @type {boolean}
@@ -6485,7 +6676,7 @@ declare interface PlanViewPublicResponseData {
6485
6676
  * @type {BillingPriceResponseData}
6486
6677
  * @memberof PlanViewPublicResponseData
6487
6678
  */
6488
- monthlyPrice?: BillingPriceResponseData;
6679
+ monthlyPrice?: BillingPriceResponseData_2;
6489
6680
  /**
6490
6681
  *
6491
6682
  * @type {string}
@@ -6497,7 +6688,7 @@ declare interface PlanViewPublicResponseData {
6497
6688
  * @type {BillingPriceResponseData}
6498
6689
  * @memberof PlanViewPublicResponseData
6499
6690
  */
6500
- oneTimePrice?: BillingPriceResponseData;
6691
+ oneTimePrice?: BillingPriceResponseData_2;
6501
6692
  /**
6502
6693
  *
6503
6694
  * @type {string}
@@ -6521,7 +6712,7 @@ declare interface PlanViewPublicResponseData {
6521
6712
  * @type {BillingPriceResponseData}
6522
6713
  * @memberof PlanViewPublicResponseData
6523
6714
  */
6524
- yearlyPrice?: BillingPriceResponseData;
6715
+ yearlyPrice?: BillingPriceResponseData_2;
6525
6716
  }
6526
6717
 
6527
6718
  export declare type Position = "top" | "right" | "bottom" | "left";
@@ -6848,6 +7039,24 @@ declare interface PreviewSubscriptionFinanceResponseData {
6848
7039
  * @memberof PreviewSubscriptionFinanceResponseData
6849
7040
  */
6850
7041
  proration: number;
7042
+ /**
7043
+ *
7044
+ * @type {number}
7045
+ * @memberof PreviewSubscriptionFinanceResponseData
7046
+ */
7047
+ taxAmount?: number | null;
7048
+ /**
7049
+ *
7050
+ * @type {string}
7051
+ * @memberof PreviewSubscriptionFinanceResponseData
7052
+ */
7053
+ taxDisplayName?: string | null;
7054
+ /**
7055
+ *
7056
+ * @type {boolean}
7057
+ * @memberof PreviewSubscriptionFinanceResponseData
7058
+ */
7059
+ taxRequireBillingDetails: boolean;
6851
7060
  /**
6852
7061
  *
6853
7062
  * @type {Date}
@@ -6963,6 +7172,12 @@ declare interface PublicPlansResponseData {
6963
7172
  * @memberof PublicPlansResponseData
6964
7173
  */
6965
7174
  capabilities?: ComponentCapabilities_2;
7175
+ /**
7176
+ *
7177
+ * @type {boolean}
7178
+ * @memberof PublicPlansResponseData
7179
+ */
7180
+ showCredits: boolean;
6966
7181
  /**
6967
7182
  *
6968
7183
  * @type {boolean}
@@ -7865,7 +8080,7 @@ declare interface UpdatePaymentMethodResponse {
7865
8080
  params: object;
7866
8081
  }
7867
8082
 
7868
- declare interface UsageBasedEntitlement extends PlanEntitlementResponseData_2 {
8083
+ declare interface UsageBasedEntitlement extends PlanEntitlementResponseData {
7869
8084
  allocation: number;
7870
8085
  usage: number;
7871
8086
  quantity: number;
@@ -7900,7 +8115,7 @@ declare interface UsageBasedEntitlementResponseData {
7900
8115
  * @type {BillingPriceView}
7901
8116
  * @memberof UsageBasedEntitlementResponseData
7902
8117
  */
7903
- meteredPrice?: BillingPriceView_2;
8118
+ meteredPrice?: BillingPriceView;
7904
8119
  /**
7905
8120
  *
7906
8121
  * @type {string}
@@ -7918,7 +8133,7 @@ declare interface UsageBasedEntitlementResponseData {
7918
8133
  * @type {BillingPriceView}
7919
8134
  * @memberof UsageBasedEntitlementResponseData
7920
8135
  */
7921
- monthlyUsageBasedPrice?: BillingPriceView_2;
8136
+ monthlyUsageBasedPrice?: BillingPriceView;
7922
8137
  /**
7923
8138
  *
7924
8139
  * @type {string}
@@ -7948,7 +8163,7 @@ declare interface UsageBasedEntitlementResponseData {
7948
8163
  * @type {BillingPriceView}
7949
8164
  * @memberof UsageBasedEntitlementResponseData
7950
8165
  */
7951
- yearlyUsageBasedPrice?: BillingPriceView_2;
8166
+ yearlyUsageBasedPrice?: BillingPriceView;
7952
8167
  }
7953
8168
 
7954
8169
  export declare function useAvailablePlans(activePeriod: string, options?: AvailablePlanOptions): {
@@ -7961,6 +8176,24 @@ export declare const useEmbed: () => EmbedContextProps;
7961
8176
 
7962
8177
  export declare function useIsLightBackground(): boolean;
7963
8178
 
8179
+ export declare const usePaymentConfirmation: ({ stripe, clientSecret, onSuccess, onError, autoConfirm, }: UsePaymentConfirmationProps) => UsePaymentConfirmationReturn;
8180
+
8181
+ declare interface UsePaymentConfirmationProps {
8182
+ stripe: Promise<Stripe | null> | null;
8183
+ clientSecret?: string;
8184
+ onSuccess?: () => void;
8185
+ onError?: (error: Error) => void;
8186
+ autoConfirm?: boolean;
8187
+ }
8188
+
8189
+ declare interface UsePaymentConfirmationReturn {
8190
+ confirmPayment: () => Promise<void>;
8191
+ isConfirming: boolean;
8192
+ error: Error | null;
8193
+ status: "idle" | "confirming" | "succeeded" | "failed";
8194
+ reset: () => void;
8195
+ }
8196
+
7964
8197
  export declare function usePrevious<T>(value: T): T | undefined;
7965
8198
 
7966
8199
  export declare function useRequest<TData>(fn: () => Promise<{