@bunnyapp/components 1.8.0-beta.9 → 1.8.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.
Files changed (138) hide show
  1. package/dist/cjs/index.js +5355 -5441
  2. package/dist/cjs/types/src/ajax.d.ts +1 -1
  3. package/dist/cjs/types/src/components/Checkout/QuoteCheckout.d.ts +2 -2
  4. package/dist/cjs/types/src/components/PandadocPollingModal.d.ts +1 -1
  5. package/dist/cjs/types/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +4 -2
  6. package/dist/cjs/types/src/components/PaymentForm/DemoPay/hooks/useSave.d.ts +5 -1
  7. package/dist/cjs/types/src/components/PaymentForm/PaymentForm.d.ts +9 -40
  8. package/dist/cjs/types/src/components/PaymentForm/Stripe/hooks/usePay.d.ts +4 -2
  9. package/dist/cjs/types/src/components/PaymentForm/components/CheckoutFooter.d.ts +2 -0
  10. package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails.d.ts +2 -0
  11. package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodFooter.d.ts +4 -0
  12. package/dist/cjs/types/src/components/PaymentForm/context/PaymentProvider.d.ts +37 -46
  13. package/dist/cjs/types/src/components/PaymentForm/hooks/useHandlePayment.d.ts +41 -0
  14. package/dist/cjs/types/src/components/PaymentForm/hooks/usePaymentButtonText.d.ts +1 -7
  15. package/dist/cjs/types/src/components/PaymentForm/types/PaymentType.d.ts +1 -2
  16. package/dist/cjs/types/src/components/Quote/Quote.d.ts +1 -28
  17. package/dist/cjs/types/src/components/Quote/components/QuoteButtons.d.ts +4 -12
  18. package/dist/cjs/types/src/components/Quote/hooks/{useAcceptQuote.d.ts → useSendAcceptQuote.d.ts} +3 -6
  19. package/dist/cjs/types/src/components/QuoteProvider/context/quantityEditableChargesContext.d.ts +8 -2
  20. package/dist/cjs/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +3 -5
  21. package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuantityEditableCharges.d.ts +36 -41
  22. package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuoteCreate.d.ts +3 -14
  23. package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuoteQuantities.d.ts +19 -3
  24. package/dist/cjs/types/src/components/QuoteProvider/hooks/useSelectedPriceListQuoteChange.d.ts +30 -18
  25. package/dist/cjs/types/src/components/Signup/{components/CheckoutSummary/CheckoutSummary.d.ts → CheckoutSummary.d.ts} +1 -1
  26. package/dist/cjs/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +0 -2
  27. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/CheckoutBarInput.d.ts +13 -1
  28. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/hooks/useChargeCRUD.d.ts +1 -1
  29. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +14 -0
  30. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListSelector/PriceListSelector.d.ts +0 -3
  31. package/dist/cjs/types/src/components/Subscriptions/Upgrade/queries/getSubscriptions.d.ts +163 -2
  32. package/dist/cjs/types/src/components/Subscriptions/context/upgradingSubscriptionContext.d.ts +1 -9
  33. package/dist/cjs/types/src/components/Subscriptions/fragments/UpgradingSubscriptionContext_SubscriptionFragment.d.ts +0 -4
  34. package/dist/cjs/types/src/components/priceListPricing/PricingTooltip.d.ts +2 -0
  35. package/dist/cjs/types/src/contexts/InvoiceQuoteContext.d.ts +3 -1
  36. package/dist/cjs/types/src/graphql/queries/getFormattedInvoice.d.ts +1 -1
  37. package/dist/cjs/types/src/{components/Quote → graphql}/queries/getFormattedQuote.d.ts +1 -6
  38. package/dist/cjs/types/src/hooks/usePaymentMethod.d.ts +0 -4
  39. package/dist/cjs/types/src/utils/QueryKeyFactory.d.ts +4 -4
  40. package/dist/cjs/types/src/utils/chargeUtils.d.ts +0 -1
  41. package/dist/cjs/types/src/utils/couponUtils.d.ts +5 -5
  42. package/dist/cjs/types/src/utils/featureAddonUtils/isAddonPurchased.d.ts +1 -1
  43. package/dist/esm/index.js +5360 -5446
  44. package/dist/esm/types/src/ajax.d.ts +1 -1
  45. package/dist/esm/types/src/components/Checkout/QuoteCheckout.d.ts +2 -2
  46. package/dist/esm/types/src/components/PandadocPollingModal.d.ts +1 -1
  47. package/dist/esm/types/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +4 -2
  48. package/dist/esm/types/src/components/PaymentForm/DemoPay/hooks/useSave.d.ts +5 -1
  49. package/dist/esm/types/src/components/PaymentForm/PaymentForm.d.ts +9 -40
  50. package/dist/esm/types/src/components/PaymentForm/Stripe/hooks/usePay.d.ts +4 -2
  51. package/dist/esm/types/src/components/PaymentForm/components/CheckoutFooter.d.ts +2 -0
  52. package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails.d.ts +2 -0
  53. package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodFooter.d.ts +4 -0
  54. package/dist/esm/types/src/components/PaymentForm/context/PaymentProvider.d.ts +37 -46
  55. package/dist/esm/types/src/components/PaymentForm/hooks/useHandlePayment.d.ts +41 -0
  56. package/dist/esm/types/src/components/PaymentForm/hooks/usePaymentButtonText.d.ts +1 -7
  57. package/dist/esm/types/src/components/PaymentForm/types/PaymentType.d.ts +1 -2
  58. package/dist/esm/types/src/components/Quote/Quote.d.ts +1 -28
  59. package/dist/esm/types/src/components/Quote/components/QuoteButtons.d.ts +4 -12
  60. package/dist/esm/types/src/components/Quote/hooks/{useAcceptQuote.d.ts → useSendAcceptQuote.d.ts} +3 -6
  61. package/dist/esm/types/src/components/QuoteProvider/context/quantityEditableChargesContext.d.ts +8 -2
  62. package/dist/esm/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +3 -5
  63. package/dist/esm/types/src/components/QuoteProvider/hooks/useQuantityEditableCharges.d.ts +36 -41
  64. package/dist/esm/types/src/components/QuoteProvider/hooks/useQuoteCreate.d.ts +3 -14
  65. package/dist/esm/types/src/components/QuoteProvider/hooks/useQuoteQuantities.d.ts +19 -3
  66. package/dist/esm/types/src/components/QuoteProvider/hooks/useSelectedPriceListQuoteChange.d.ts +30 -18
  67. package/dist/esm/types/src/components/Signup/{components/CheckoutSummary/CheckoutSummary.d.ts → CheckoutSummary.d.ts} +1 -1
  68. package/dist/esm/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +0 -2
  69. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/CheckoutBarInput.d.ts +13 -1
  70. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/hooks/useChargeCRUD.d.ts +1 -1
  71. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +14 -0
  72. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListSelector/PriceListSelector.d.ts +0 -3
  73. package/dist/esm/types/src/components/Subscriptions/Upgrade/queries/getSubscriptions.d.ts +163 -2
  74. package/dist/esm/types/src/components/Subscriptions/context/upgradingSubscriptionContext.d.ts +1 -9
  75. package/dist/esm/types/src/components/Subscriptions/fragments/UpgradingSubscriptionContext_SubscriptionFragment.d.ts +0 -4
  76. package/dist/esm/types/src/components/priceListPricing/PricingTooltip.d.ts +2 -0
  77. package/dist/esm/types/src/contexts/InvoiceQuoteContext.d.ts +3 -1
  78. package/dist/esm/types/src/graphql/queries/getFormattedInvoice.d.ts +1 -1
  79. package/dist/esm/types/src/{components/Quote → graphql}/queries/getFormattedQuote.d.ts +1 -6
  80. package/dist/esm/types/src/hooks/usePaymentMethod.d.ts +0 -4
  81. package/dist/esm/types/src/utils/QueryKeyFactory.d.ts +4 -4
  82. package/dist/esm/types/src/utils/chargeUtils.d.ts +0 -1
  83. package/dist/esm/types/src/utils/couponUtils.d.ts +5 -5
  84. package/dist/esm/types/src/utils/featureAddonUtils/isAddonPurchased.d.ts +1 -1
  85. package/dist/index.d.ts +14 -78
  86. package/package.json +1 -1
  87. package/dist/cjs/types/src/components/PaymentForm/DemoPay/DemoPayFormProvider.d.ts +0 -10
  88. package/dist/cjs/types/src/components/PaymentForm/Stripe/StripeFormProvider.d.ts +0 -5
  89. package/dist/cjs/types/src/components/PaymentForm/components/CheckoutNoPayment.d.ts +0 -6
  90. package/dist/cjs/types/src/components/PaymentForm/components/Pay.d.ts +0 -5
  91. package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails/PaymentMethodDetails.d.ts +0 -12
  92. package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Cancel.d.ts +0 -1
  93. package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Save.d.ts +0 -1
  94. package/dist/cjs/types/src/components/PaymentForm/components/StoredPaymentMethods.d.ts +0 -18
  95. package/dist/cjs/types/src/components/PaymentForm/context/AccountIdContext.d.ts +0 -5
  96. package/dist/cjs/types/src/components/PaymentForm/context/CallbacksContext.d.ts +0 -14
  97. package/dist/cjs/types/src/components/PaymentForm/context/PaymentMethodFormVisibilityContext.d.ts +0 -12
  98. package/dist/cjs/types/src/components/PaymentForm/hooks/usePay.d.ts +0 -14
  99. package/dist/cjs/types/src/components/PaymentForm/hooks/usePaymentHold.d.ts +0 -18
  100. package/dist/cjs/types/src/components/PaymentForm/hooks/useSave.d.ts +0 -16
  101. package/dist/cjs/types/src/components/Quote/components/PaymentHoldDisplay.d.ts +0 -18
  102. package/dist/cjs/types/src/components/Quote/hooks/useQuotePaymentHold.d.ts +0 -20
  103. package/dist/cjs/types/src/components/Quote/queries/quoteAccept.d.ts +0 -14
  104. package/dist/cjs/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_PriceListChargeFragment.d.ts +0 -16
  105. package/dist/cjs/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_QuoteFragment.d.ts +0 -26
  106. package/dist/cjs/types/src/components/QuoteProvider/fragments/useQuoteQuantities_PriceListChargeFragment.d.ts +0 -13
  107. package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/hooks/sortQuoteChangeCharges.d.ts +0 -14
  108. package/dist/cjs/types/src/components/Signup/hooks/useApplyDefaultCoupon.d.ts +0 -21
  109. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/CheckoutBarInput_PriceListChargeFragment.d.ts +0 -13
  110. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/useChargeCRUD_QuoteFragment.d.ts +0 -22
  111. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/fragments/PlanPickerCheckoutBar_PriceListChargeFragment.d.ts +0 -14
  112. package/dist/esm/types/src/components/PaymentForm/DemoPay/DemoPayFormProvider.d.ts +0 -10
  113. package/dist/esm/types/src/components/PaymentForm/Stripe/StripeFormProvider.d.ts +0 -5
  114. package/dist/esm/types/src/components/PaymentForm/components/CheckoutNoPayment.d.ts +0 -6
  115. package/dist/esm/types/src/components/PaymentForm/components/Pay.d.ts +0 -5
  116. package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails/PaymentMethodDetails.d.ts +0 -12
  117. package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Cancel.d.ts +0 -1
  118. package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Save.d.ts +0 -1
  119. package/dist/esm/types/src/components/PaymentForm/components/StoredPaymentMethods.d.ts +0 -18
  120. package/dist/esm/types/src/components/PaymentForm/context/AccountIdContext.d.ts +0 -5
  121. package/dist/esm/types/src/components/PaymentForm/context/CallbacksContext.d.ts +0 -14
  122. package/dist/esm/types/src/components/PaymentForm/context/PaymentMethodFormVisibilityContext.d.ts +0 -12
  123. package/dist/esm/types/src/components/PaymentForm/hooks/usePay.d.ts +0 -14
  124. package/dist/esm/types/src/components/PaymentForm/hooks/usePaymentHold.d.ts +0 -18
  125. package/dist/esm/types/src/components/PaymentForm/hooks/useSave.d.ts +0 -16
  126. package/dist/esm/types/src/components/Quote/components/PaymentHoldDisplay.d.ts +0 -18
  127. package/dist/esm/types/src/components/Quote/hooks/useQuotePaymentHold.d.ts +0 -20
  128. package/dist/esm/types/src/components/Quote/queries/quoteAccept.d.ts +0 -14
  129. package/dist/esm/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_PriceListChargeFragment.d.ts +0 -16
  130. package/dist/esm/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_QuoteFragment.d.ts +0 -26
  131. package/dist/esm/types/src/components/QuoteProvider/fragments/useQuoteQuantities_PriceListChargeFragment.d.ts +0 -13
  132. package/dist/esm/types/src/components/Signup/components/CheckoutSummary/hooks/sortQuoteChangeCharges.d.ts +0 -14
  133. package/dist/esm/types/src/components/Signup/hooks/useApplyDefaultCoupon.d.ts +0 -21
  134. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/CheckoutBarInput_PriceListChargeFragment.d.ts +0 -13
  135. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/useChargeCRUD_QuoteFragment.d.ts +0 -22
  136. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/fragments/PlanPickerCheckoutBar_PriceListChargeFragment.d.ts +0 -14
  137. /package/dist/cjs/types/src/components/PaymentForm/components/{PaymentMethodDetails/components/PaymentMethodSelector.d.ts → PaymentMethodSelector.d.ts} +0 -0
  138. /package/dist/esm/types/src/components/PaymentForm/components/{PaymentMethodDetails/components/PaymentMethodSelector.d.ts → PaymentMethodSelector.d.ts} +0 -0
@@ -1,25 +1,37 @@
1
- import { FragmentOf } from 'gql.tada';
2
- export declare const useSelectedPriceListQuoteChange_QuoteFragment: import("gql.tada").TadaDocumentNode<{
3
- quoteChanges: {
4
- id: string | null;
5
- }[] | null;
1
+ import { FragmentOf, ResultOf } from 'gql.tada';
2
+ import { QuoteContext_QuoteFragment } from '../fragments/quoteFragment';
3
+ export declare const useSelectedPriceListQuoteChange_PriceListFragment: import("gql.tada").TadaDocumentNode<{
4
+ id: string;
6
5
  }, {}, {
7
- fragment: "useSelectedPriceListQuoteChange_QuoteFragment";
8
- on: "Quote";
6
+ fragment: "useSelectedPriceListQuoteChange_PriceListFragment";
7
+ on: "PriceList";
9
8
  masked: true;
10
9
  }>;
11
- export declare const useSelectedPriceListQuoteChange_QuoteChangeFragment: import("gql.tada").TadaDocumentNode<{
10
+ export declare function useSelectedPriceListQuoteChange({ quote, selectedPriceList: maskedSelectedPriceList, }: {
11
+ quote: ResultOf<typeof QuoteContext_QuoteFragment> | null | undefined;
12
+ selectedPriceList: FragmentOf<typeof useSelectedPriceListQuoteChange_PriceListFragment> | null;
13
+ }): {
12
14
  id: string | null;
15
+ kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
13
16
  priceList: {
14
17
  id: string;
15
18
  } | null;
16
- kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
17
- }, {}, {
18
- fragment: "useSelectedPriceListQuoteChange_QuoteChangeFragment";
19
- on: "QuoteChange";
20
- masked: true;
21
- }>;
22
- export declare function useSelectedPriceListQuoteChange<T extends FragmentOf<typeof useSelectedPriceListQuoteChange_QuoteChangeFragment>>({ quoteChanges: maskedQuoteChanges, selectedPriceListId, }: {
23
- quoteChanges: T[] | undefined | null;
24
- selectedPriceListId: string | undefined;
25
- }): T | undefined;
19
+ charges: {
20
+ priceListCharge: {
21
+ id: string;
22
+ chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
23
+ pricingModel: "FLAT" | "TIERED" | "VOLUME" | "BANDS" | null;
24
+ quantityMin: number | null;
25
+ quantityMax: number | null;
26
+ selfServiceQuantity: boolean | null;
27
+ [$tada.fragmentRefs]: {
28
+ CanEditChargeQuantity_PriceListChargeFragment: "PriceListCharge";
29
+ };
30
+ } | null;
31
+ feature: {
32
+ id: string;
33
+ } | null;
34
+ quantity: number | null;
35
+ id: string | null;
36
+ }[];
37
+ } | undefined;
@@ -29,7 +29,7 @@ export declare const CheckoutSummary_QuoteFragment: import("gql.tada").TadaDocum
29
29
  }[];
30
30
  }[] | null;
31
31
  [$tada.fragmentRefs]: {
32
- canApplyCoupons_QuoteFragment: "Quote";
32
+ shouldShowCouponEditor_QuoteFragment: "Quote";
33
33
  };
34
34
  }, {}, {
35
35
  fragment: "CheckoutSummary_QuoteFragment";
@@ -3,8 +3,6 @@ export declare const Signup_QuoteFragment: import("gql.tada").TadaDocumentNode<{
3
3
  CheckoutSummary_QuoteFragment: "Quote";
4
4
  } & {
5
5
  PaymentForms_QuoteFragment: "Quote";
6
- } & {
7
- useApplyDefaultCoupon_QuoteFragment: "Quote";
8
6
  };
9
7
  id: string | null;
10
8
  currencyId: string;
@@ -1,5 +1,17 @@
1
1
  import { FragmentOf } from 'gql.tada';
2
- import { CheckoutBarInput_PriceListChargeFragment } from './fragments/CheckoutBarInput_PriceListChargeFragment';
2
+ export declare const CheckoutBarInput_PriceListChargeFragment: import("gql.tada").TadaDocumentNode<{
3
+ name: string;
4
+ quantityMin: number | null;
5
+ quantityMax: number | null;
6
+ id: string;
7
+ feature: {
8
+ id: string;
9
+ } | null;
10
+ }, {}, {
11
+ fragment: "CheckoutBarInput_PriceListChargeFragment";
12
+ on: "PriceListCharge";
13
+ masked: true;
14
+ }>;
3
15
  declare const CheckoutBarInput: ({ disabled, priceListCharge: maskedPriceListCharge, quantity, onQuantityChanged, }: {
4
16
  disabled?: boolean;
5
17
  priceListCharge: FragmentOf<typeof CheckoutBarInput_PriceListChargeFragment>;
@@ -23,7 +23,7 @@ export declare const useChargeCRUD_SubscriptionFragment: import("gql.tada").Tada
23
23
  *
24
24
  * All network operations are debounced.
25
25
  */
26
- export declare const useChargeCRUD: ({ priceListChargeId, featureId, }: {
26
+ export declare const useChargeCRUD: ({ priceListChargeId, featureId }: {
27
27
  priceListChargeId: string;
28
28
  featureId: string | undefined;
29
29
  }) => {
@@ -1,4 +1,18 @@
1
1
  import PriceList from '@/types/PriceList';
2
+ export declare const PlanPickerCheckoutBar_PriceListChargeFragment: import("gql.tada").TadaDocumentNode<{
3
+ [$tada.fragmentRefs]: {
4
+ CheckoutBarInput_PriceListChargeFragment: "PriceListCharge";
5
+ };
6
+ feature: {
7
+ id: string;
8
+ } | null;
9
+ featureAddon: boolean | null;
10
+ id: string;
11
+ }, {}, {
12
+ fragment: "PlanPickerCheckoutBar_PriceListChargeFragment";
13
+ on: "PriceListCharge";
14
+ masked: true;
15
+ }>;
2
16
  declare const PlanPickerCheckoutBar: ({ selectedPriceList, handlePortalErrors, onCheckoutSuccess, }: {
3
17
  selectedPriceList: PriceList;
4
18
  handlePortalErrors?: (errors: any) => void;
@@ -9,9 +9,6 @@ export declare const PriceListSelectorUpgradingSubscription_SubscriptionFragment
9
9
  addon: boolean | null;
10
10
  } | null;
11
11
  } | null;
12
- [$tada.fragmentRefs]: {
13
- createAvailableBillingPeriods_SubscriptionFragment: "Subscription";
14
- };
15
12
  }, {}, {
16
13
  fragment: "PriceListSelectorUpgradingSubscription_SubscriptionFragment";
17
14
  on: "Subscription";
@@ -5,10 +5,171 @@ export declare const getSubscriptions: ({ apiHost, isInPreviewMode, token, }: {
5
5
  }) => Promise<{
6
6
  subscriptions: {
7
7
  nodes: ({
8
+ addonSubscriptions: {
9
+ id: string;
10
+ priceList: {
11
+ id: string;
12
+ } | null;
13
+ plan: {
14
+ id: string;
15
+ } | null;
16
+ }[] | null;
17
+ cancellationDate: unknown;
18
+ currencyId: string;
19
+ endDate: unknown;
20
+ evergreen: boolean;
8
21
  id: string;
9
- [$tada.fragmentRefs]: {
10
- UpgradingSubscriptionContext_SubscriptionFragment: "Subscription";
22
+ period: string;
23
+ account: {
24
+ id: string;
11
25
  };
26
+ daysLeftInTrial: number | null;
27
+ plan: {
28
+ id: string;
29
+ name: string;
30
+ selfServiceBuy: boolean | null;
31
+ selfServiceCancel: boolean | null;
32
+ selfServiceRenew: boolean | null;
33
+ } | null;
34
+ priceList: {
35
+ id: string;
36
+ periodMonths: number | null;
37
+ name: string;
38
+ plan: {
39
+ id: string;
40
+ addon: boolean | null;
41
+ addonPlans: {
42
+ id: string;
43
+ }[] | null;
44
+ } | null;
45
+ } | null;
46
+ product: {
47
+ id: string;
48
+ name: string;
49
+ showProductNameOnLineItem: boolean | null;
50
+ } | null;
51
+ startDate: unknown;
52
+ state: "ACTIVE" | "TRIAL" | "CANCELED" | "EXPIRED" | "TRIAL_EXPIRED" | "PENDING";
53
+ trialEndDate: unknown;
54
+ trialPeriod: string;
55
+ trialStartDate: unknown;
56
+ trialExpirationAction: "ACTIVATE" | "CANCEL" | null;
57
+ charges: {
58
+ priceListCharge: {
59
+ priceListChargeTiers: {
60
+ price: number | null;
61
+ starts: number | null;
62
+ }[] | null;
63
+ featureAddon: boolean | null;
64
+ id: string;
65
+ } | null;
66
+ amount: number | null;
67
+ billingPeriod: "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "ANNUAL" | "ONCE" | null;
68
+ chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
69
+ discount: number | null;
70
+ discountedPrice: string | null;
71
+ endDate: unknown;
72
+ expired: boolean;
73
+ feature: {
74
+ name: string;
75
+ } | null;
76
+ id: string | null;
77
+ isAmendment: boolean;
78
+ isRamp: boolean;
79
+ kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
80
+ name: string | null;
81
+ periodPrice: number | null;
82
+ price: string | null;
83
+ priceDecimals: number | null;
84
+ priceListChargeId: string | null;
85
+ priceTiers: {
86
+ starts: number | null;
87
+ price: number | null;
88
+ }[] | null;
89
+ pricingModel: "FLAT" | "TIERED" | "VOLUME" | "BANDS" | null;
90
+ quantity: number | null;
91
+ selfServiceQuantity: boolean | null;
92
+ startDate: unknown;
93
+ trial: boolean;
94
+ }[] | null;
95
+ chargeReport: {
96
+ priceListCharge: {
97
+ priceListChargeTiers: {
98
+ price: number | null;
99
+ starts: number | null;
100
+ }[] | null;
101
+ featureAddon: boolean | null;
102
+ id: string;
103
+ code: string | null;
104
+ } | null;
105
+ amount: number | null;
106
+ billingPeriod: "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "ANNUAL" | "ONCE" | null;
107
+ chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
108
+ discount: number | null;
109
+ discountedPrice: string | null;
110
+ endDate: unknown;
111
+ expired: boolean;
112
+ feature: {
113
+ name: string;
114
+ } | null;
115
+ id: string | null;
116
+ isAmendment: boolean;
117
+ isRamp: boolean;
118
+ kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
119
+ name: string | null;
120
+ periodPrice: number | null;
121
+ price: string | null;
122
+ priceDecimals: number | null;
123
+ priceListChargeId: string | null;
124
+ priceTiers: {
125
+ starts: number | null;
126
+ price: number | null;
127
+ }[] | null;
128
+ pricingModel: "FLAT" | "TIERED" | "VOLUME" | "BANDS" | null;
129
+ quantity: number | null;
130
+ selfServiceQuantity: boolean | null;
131
+ startDate: unknown;
132
+ trial: boolean;
133
+ }[] | null;
134
+ currentCharges: {
135
+ priceListCharge: {
136
+ priceListChargeTiers: {
137
+ price: number | null;
138
+ starts: number | null;
139
+ }[] | null;
140
+ featureAddon: boolean | null;
141
+ id: string;
142
+ code: string | null;
143
+ } | null;
144
+ amount: number | null;
145
+ billingPeriod: "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "ANNUAL" | "ONCE" | null;
146
+ chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
147
+ discount: number | null;
148
+ discountedPrice: string | null;
149
+ endDate: unknown;
150
+ expired: boolean;
151
+ feature: {
152
+ name: string;
153
+ } | null;
154
+ id: string | null;
155
+ isAmendment: boolean;
156
+ isRamp: boolean;
157
+ kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
158
+ name: string | null;
159
+ periodPrice: number | null;
160
+ price: string | null;
161
+ priceDecimals: number | null;
162
+ priceListChargeId: string | null;
163
+ priceTiers: {
164
+ starts: number | null;
165
+ price: number | null;
166
+ }[] | null;
167
+ pricingModel: "FLAT" | "TIERED" | "VOLUME" | "BANDS" | null;
168
+ quantity: number | null;
169
+ selfServiceQuantity: boolean | null;
170
+ startDate: unknown;
171
+ trial: boolean;
172
+ }[] | null;
12
173
  } | null)[] | null;
13
174
  } | null;
14
175
  }>;
@@ -25,12 +25,8 @@ export declare const UpgradingSubscriptionProvider: ({ value, children }: {
25
25
  useChargeCRUD_SubscriptionFragment: "Subscription";
26
26
  } & {
27
27
  useQuoteQuantities_SubscriptionFragment: "Subscription";
28
- } & {
29
- isAddonPurchased_SubscriptionChargeFragment: "Subscription";
30
- } & {
31
- useQuoteCreate_SubscriptionFragment: "Subscription";
32
28
  };
33
- } | null | undefined;
29
+ } | undefined;
34
30
  children?: import("react").ReactNode;
35
31
  }) => import("react/jsx-runtime").JSX.Element, useUpgradingSubscription: () => {
36
32
  id: string;
@@ -58,9 +54,5 @@ export declare const UpgradingSubscriptionProvider: ({ value, children }: {
58
54
  useChargeCRUD_SubscriptionFragment: "Subscription";
59
55
  } & {
60
56
  useQuoteQuantities_SubscriptionFragment: "Subscription";
61
- } & {
62
- isAddonPurchased_SubscriptionChargeFragment: "Subscription";
63
- } & {
64
- useQuoteCreate_SubscriptionFragment: "Subscription";
65
57
  };
66
58
  } | undefined;
@@ -24,10 +24,6 @@ export declare const UpgradingSubscriptionContext_SubscriptionFragment: import("
24
24
  useChargeCRUD_SubscriptionFragment: "Subscription";
25
25
  } & {
26
26
  useQuoteQuantities_SubscriptionFragment: "Subscription";
27
- } & {
28
- isAddonPurchased_SubscriptionChargeFragment: "Subscription";
29
- } & {
30
- useQuoteCreate_SubscriptionFragment: "Subscription";
31
27
  };
32
28
  }, {}, {
33
29
  fragment: "UpgradingSubscriptionContext_SubscriptionFragment";
@@ -17,6 +17,8 @@ export declare const PricingTooltip_PriceListChargeFragment: import("gql.tada").
17
17
  ChargeHasPriceTiers_PriceListChargeFragment: "PriceListCharge";
18
18
  } & {
19
19
  ChargePriceTiers_PriceListChargeFragment: "PriceListCharge";
20
+ } & {
21
+ GetActiveCharges_PriceListChargeFragment: "PriceListCharge";
20
22
  };
21
23
  }, {}, {
22
24
  fragment: "PricingTooltip_PriceListChargeFragment";
@@ -1,7 +1,8 @@
1
1
  import { ShadowType } from '../types/shadowType';
2
2
  import FormattedInvoice from '@/types/FormattedInvoice';
3
+ import { FormattedQuote } from '@/types/FormattedQuote';
3
4
  export type InvoiceQuoteContextProps = {
4
- id?: string | null | undefined;
5
+ id?: string;
5
6
  invoiceQuoteViewComponent?: React.ReactNode;
6
7
  backButtonName?: string;
7
8
  onBackButtonClick?: () => void;
@@ -11,6 +12,7 @@ export type InvoiceQuoteContextProps = {
11
12
  className?: string;
12
13
  hideDownloadButton?: boolean;
13
14
  onInvoiceLoaded?: (formattedInvoice: FormattedInvoice) => void;
15
+ onQuoteLoaded?: (formattedQuote: FormattedQuote) => void;
14
16
  onQuoteUnavailableError?: () => void;
15
17
  suppressQuoteUnavailableErrorNotification?: boolean;
16
18
  };
@@ -1,6 +1,6 @@
1
1
  import FormattedInvoice from '@/types/FormattedInvoice';
2
2
  declare const getFormattedInvoice: ({ id, token, apiHost, }: {
3
- id?: string | null | undefined;
3
+ id?: string;
4
4
  apiHost: string;
5
5
  token?: string;
6
6
  }) => Promise<FormattedInvoice>;
@@ -1,7 +1,7 @@
1
1
  declare const getFormattedQuote: ({ token, apiHost, id, }: {
2
2
  apiHost: string;
3
3
  token?: string;
4
- id?: string | null | undefined;
4
+ id?: string;
5
5
  }) => Promise<{
6
6
  quote: {
7
7
  documentTemplateId: string | null;
@@ -45,9 +45,6 @@ declare const getFormattedQuote: ({ token, apiHost, id, }: {
45
45
  kind: string | null;
46
46
  } | null;
47
47
  } | null;
48
- [$tada.fragmentRefs]: {
49
- PaymentHoldDisplay_QuoteButtonsFragment: "PaymentHold";
50
- };
51
48
  } | null;
52
49
  };
53
50
  payableId: string | null;
@@ -144,8 +141,6 @@ declare const getFormattedQuote: ({ token, apiHost, id, }: {
144
141
  taxNumberRequired: boolean | null;
145
142
  vendorName: string | null;
146
143
  [$tada.fragmentRefs]: {
147
- useQuotePaymentHold_FormattedQuoteFragment: "FormattedQuote";
148
- } & {
149
144
  PaymentHoldModal_FormattedQuoteFragment: "FormattedQuote";
150
145
  } & {
151
146
  AcceptQuoteModal_FormattedQuoteFragment: "FormattedQuote";
@@ -23,8 +23,6 @@ export declare const usePaymentMethod: ({ accountId, enabled, }: {
23
23
  isDefault: boolean | null;
24
24
  [$tada.fragmentRefs]: {
25
25
  PaymentForm_PaymentMethodsFragment: "PaymentMethod";
26
- } & {
27
- StoredPaymentMethods_PaymentMethodsFragment: "PaymentMethod";
28
26
  };
29
27
  }[] | undefined;
30
28
  defaultPaymentMethod: {
@@ -48,8 +46,6 @@ export declare const usePaymentMethod: ({ accountId, enabled, }: {
48
46
  isDefault: boolean | null;
49
47
  [$tada.fragmentRefs]: {
50
48
  PaymentForm_PaymentMethodsFragment: "PaymentMethod";
51
- } & {
52
- StoredPaymentMethods_PaymentMethodsFragment: "PaymentMethod";
53
49
  };
54
50
  } | undefined;
55
51
  isLoading: boolean;
@@ -38,7 +38,7 @@ interface TableKeyParams {
38
38
  token?: string;
39
39
  }
40
40
  interface FormattedInvoiceKeyParams {
41
- id?: string | null | undefined;
41
+ id?: string;
42
42
  token?: string;
43
43
  }
44
44
  interface InvoiceKeyParams {
@@ -55,7 +55,7 @@ interface PortalPreviewDataKeyParams {
55
55
  token?: string;
56
56
  }
57
57
  interface QuoteKeyParams {
58
- id?: string | null | undefined;
58
+ id?: string;
59
59
  token?: string;
60
60
  }
61
61
  interface QuoteTaxCalculateKeyParams {
@@ -78,10 +78,10 @@ declare const QueryKeyFactory: {
78
78
  brandingKey: (token?: string) => string[];
79
79
  calculatedPricesKey: ({ priceListId, quantity, token }: CalculatedPricesKeyParams) => (string | number)[];
80
80
  createEventsKey: ({ entityId, pluralType, token }: EventsKeyParams) => string[];
81
- createFormattedInvoiceKey: ({ id, token }: FormattedInvoiceKeyParams) => (string | null | undefined)[];
81
+ createFormattedInvoiceKey: ({ id, token }: FormattedInvoiceKeyParams) => (string | undefined)[];
82
82
  createInvoiceKey: ({ id, token }: InvoiceKeyParams) => (string | undefined)[];
83
83
  createObjectKey: ({ id, objectName, token }: ObjectKeyParams) => string[];
84
- createQuoteKey: ({ id, token }: QuoteKeyParams) => (string | null | undefined)[];
84
+ createQuoteKey: ({ id, token }: QuoteKeyParams) => (string | undefined)[];
85
85
  createQuoteTaxCalculateKey: ({ id, token }: QuoteTaxCalculateKeyParams) => string[];
86
86
  createTableKey: ({ filterString, pluralType, token }: TableKeyParams) => (string | undefined)[];
87
87
  currentUserKey: (token?: string) => string[];
@@ -2,7 +2,6 @@ import { FragmentOf } from 'gql.tada';
2
2
  export declare const CanEditChargeQuantity_PriceListChargeFragment: import("gql.tada").TadaDocumentNode<{
3
3
  chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
4
4
  pricingModel: "FLAT" | "TIERED" | "VOLUME" | "BANDS" | null;
5
- selfServiceQuantity: boolean | null;
6
5
  }, {}, {
7
6
  fragment: "CanEditChargeQuantity_PriceListChargeFragment";
8
7
  on: "PriceListCharge";
@@ -1,22 +1,22 @@
1
1
  import { FragmentOf } from 'gql.tada';
2
- export declare const canApplyCoupons_QuoteFragment: import("gql.tada").TadaDocumentNode<{
2
+ export declare const shouldShowCouponEditor_QuoteFragment: import("gql.tada").TadaDocumentNode<{
3
3
  id: string | null;
4
4
  kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
5
5
  amountDue: number | null;
6
6
  }, {}, {
7
- fragment: "canApplyCoupons_QuoteFragment";
7
+ fragment: "shouldShowCouponEditor_QuoteFragment";
8
8
  on: "Quote";
9
9
  masked: true;
10
10
  }>;
11
- export declare const canApplyCoupons_SubscriptionFragment: import("gql.tada").TadaDocumentNode<{
11
+ export declare const shouldShowCouponEditor_SubscriptionFragment: import("gql.tada").TadaDocumentNode<{
12
12
  id: string;
13
13
  state: "ACTIVE" | "TRIAL" | "CANCELED" | "EXPIRED" | "TRIAL_EXPIRED" | "PENDING";
14
14
  charges: {
15
15
  discountedPrice: string | null;
16
16
  }[] | null;
17
17
  }, {}, {
18
- fragment: "canApplyCoupons_SubscriptionFragment";
18
+ fragment: "shouldShowCouponEditor_SubscriptionFragment";
19
19
  on: "Subscription";
20
20
  masked: true;
21
21
  }>;
22
- export declare function canApplyCoupons(maskedQuote: FragmentOf<typeof canApplyCoupons_QuoteFragment> | undefined | null, activeCouponsExist: boolean, maskedUpgradingSubscription?: FragmentOf<typeof canApplyCoupons_SubscriptionFragment>): boolean;
22
+ export declare function shouldShowCouponEditor(maskedQuote: FragmentOf<typeof shouldShowCouponEditor_QuoteFragment>, activeCouponsExist: boolean, maskedUpgradingSubscription?: FragmentOf<typeof shouldShowCouponEditor_SubscriptionFragment>): boolean;
@@ -21,4 +21,4 @@ export declare const isAddonPurchased_SubscriptionChargeFragment: import("gql.ta
21
21
  on: "Subscription";
22
22
  masked: true;
23
23
  }>;
24
- export declare function isAddonPurchased(maskedFeatureAddon: FragmentOf<typeof isAddonPurchased_PriceListChargeFragment>, maskedCurrentSubscription: FragmentOf<typeof isAddonPurchased_SubscriptionChargeFragment> | undefined): boolean;
24
+ export declare function isAddonPurchased(maskedFeatureAddon: FragmentOf<typeof isAddonPurchased_PriceListChargeFragment>, maskedCurrentSubscription: FragmentOf<typeof isAddonPurchased_SubscriptionChargeFragment>): boolean;
package/dist/index.d.ts CHANGED
@@ -1,16 +1,18 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as gql_tada from 'gql.tada';
3
- import { ResultOf, FragmentOf } from 'gql.tada';
4
2
  import FormattedInvoice from '@/types/FormattedInvoice';
3
+ import { FormattedQuote } from '@/types/FormattedQuote';
5
4
  import { Transaction, TransactionKind } from '@/types/Transaction';
6
- import react, { ReactNode, ComponentProps } from 'react';
5
+ import * as gql_tada from 'gql.tada';
6
+ import { FragmentOf, ResultOf } from 'gql.tada';
7
+ import Invoice$1 from '@/types/Invoice';
7
8
  import { QueryClient } from '@tanstack/react-query';
8
9
  import { ThemeConfig } from 'antd';
10
+ import react from 'react';
9
11
 
10
12
  type ShadowType = "shadow-none" | "shadow-sm" | "shadow-md" | "shadow-lg" | "shadow-xl";
11
13
 
12
14
  type InvoiceQuoteContextProps = {
13
- id?: string | null | undefined;
15
+ id?: string;
14
16
  invoiceQuoteViewComponent?: React.ReactNode;
15
17
  backButtonName?: string;
16
18
  onBackButtonClick?: () => void;
@@ -20,6 +22,7 @@ type InvoiceQuoteContextProps = {
20
22
  className?: string;
21
23
  hideDownloadButton?: boolean;
22
24
  onInvoiceLoaded?: (formattedInvoice: FormattedInvoice) => void;
25
+ onQuoteLoaded?: (formattedQuote: FormattedQuote) => void;
23
26
  onQuoteUnavailableError?: () => void;
24
27
  suppressQuoteUnavailableErrorNotification?: boolean;
25
28
  };
@@ -38,21 +41,10 @@ declare global {
38
41
  }
39
42
  }
40
43
 
41
- declare const OnQuoteLoadedFragment: gql_tada.TadaDocumentNode<{
42
- vendorName: string | null;
43
- quote: {
44
- id: string | null;
45
- };
46
- }, {}, {
47
- fragment: "OnQuoteLoadedFragment";
48
- on: "FormattedQuote";
49
- masked: true;
50
- }>;
51
44
  type QuoteProps = InvoiceQuoteContextProps & {
52
45
  onQuoteAccepted?: () => void;
53
46
  onQuoteUnavailableError?: () => void;
54
47
  suppressQuoteUnavailableErrorNotification?: boolean;
55
- onQuoteLoaded?: (formattedQuote: ResultOf<typeof OnQuoteLoadedFragment>) => void;
56
48
  };
57
49
  declare function Quote({ id, invoiceQuoteViewComponent, onInvoiceDownloadError, onPaymentSuccess, shadow, className, hideDownloadButton, onQuoteLoaded, onQuoteAccepted, onQuoteUnavailableError, suppressQuoteUnavailableErrorNotification, }: QuoteProps): react_jsx_runtime.JSX.Element;
58
50
 
@@ -93,35 +85,6 @@ declare function Quotes({ className, columns, filter, filterQuotes, sort, noQuot
93
85
  noQuotesMessage?: string;
94
86
  }): react_jsx_runtime.JSX.Element;
95
87
 
96
- type Props = {
97
- className?: string;
98
- disabled?: boolean;
99
- };
100
- declare function CheckoutNoPayment(props?: Props): react_jsx_runtime.JSX.Element;
101
-
102
- type PayProps = {
103
- disabled?: boolean;
104
- };
105
- declare function Pay(props?: PayProps): react_jsx_runtime.JSX.Element;
106
-
107
- declare function Cancel(): react_jsx_runtime.JSX.Element;
108
-
109
- declare function Save(): react_jsx_runtime.JSX.Element;
110
-
111
- type PaymentMethodDetailsProps = {
112
- footer?: ReactNode;
113
- };
114
- declare function PaymentMethodDetailsRoot(props?: PaymentMethodDetailsProps): react_jsx_runtime.JSX.Element;
115
- declare const PaymentMethodDetails: typeof PaymentMethodDetailsRoot & {
116
- Cancel: typeof Cancel;
117
- Save: typeof Save;
118
- };
119
-
120
- type StoredPaymentMethodsProps = {
121
- className?: string;
122
- };
123
- declare function StoredPaymentMethods(props?: StoredPaymentMethodsProps): react_jsx_runtime.JSX.Element;
124
-
125
88
  declare const PaymentForm_PaymentMethodsFragment: gql_tada.TadaDocumentNode<{
126
89
  [$tada.fragmentRefs]: {
127
90
  MiniCreditCard_PaymentMethodFragment: "PaymentMethod";
@@ -148,25 +111,10 @@ declare const PaymentForm_QuoteFragment: gql_tada.TadaDocumentNode<{
148
111
  on: "Quote";
149
112
  masked: true;
150
113
  }>;
151
- declare const PaymentForm_InvoiceFragment: gql_tada.TadaDocumentNode<{
152
- id: string | null;
153
- currencyId: string;
154
- [$tada.fragmentRefs]: {
155
- PaymentProvider_InvoiceFragment: "Invoice";
156
- };
157
- }, {}, {
158
- fragment: "PaymentForm_InvoiceFragment";
159
- on: "Invoice";
160
- masked: true;
161
- }>;
162
- declare function PaymentFormRoot({ currencyId: accountCurrencyId, invoice: maskedInvoice, quote: maskedQuote, paymentHold, onPaymentSuccess, onPaymentHoldSuccess, paymentHoldPrecondition, accountId, onSavePaymentMethod, onPaymentMethodRemoved, onSetDefaultPaymentMethod, overrideToken, customCheckoutFunction, children, }: {
114
+ declare function PaymentForm({ currencyId: accountCurrencyId, invoice, quote: maskedQuote, onPaymentSuccess, onPaymentHoldSuccess, paymentHoldPrecondition, accountId, onSavePaymentMethod, onPaymentMethodRemoved, onSetDefaultPaymentMethod, overrideToken, customCheckoutFunction, paymentHoldOptions, disablePayButton, }: {
163
115
  currencyId?: string;
164
- invoice?: FragmentOf<typeof PaymentForm_InvoiceFragment>;
116
+ invoice?: FormattedInvoice | Invoice$1;
165
117
  quote?: FragmentOf<typeof PaymentForm_QuoteFragment>;
166
- paymentHold?: {
167
- quoteId: string;
168
- amountToHold: number;
169
- };
170
118
  onPaymentSuccess?: (response: any) => void;
171
119
  onPaymentHoldSuccess?: (response: any) => void;
172
120
  /**
@@ -179,24 +127,12 @@ declare function PaymentFormRoot({ currencyId: accountCurrencyId, invoice: maske
179
127
  accountId?: string;
180
128
  overrideToken?: string;
181
129
  customCheckoutFunction?: (pluginId: string, paymentMethodId: string) => Promise<any>;
182
- children?: ReactNode | ((state: PaymentFormRenderState) => ReactNode);
183
- }): react_jsx_runtime.JSX.Element | null;
184
- type PaymentFormProps = ComponentProps<typeof PaymentFormRoot>;
185
- type PaymentFormRenderState = {
186
- hasPaymentMethods: boolean;
187
- isPaymentMethodDetailsOpen: boolean;
188
- isPayableAvailable: boolean;
189
- amountDue: number | undefined;
190
- };
191
- declare function PaymentFormInternal(props: PaymentFormProps & {
130
+ paymentHoldOptions?: {
131
+ payToAccept?: boolean;
132
+ amountToHold?: number;
133
+ };
192
134
  disablePayButton?: boolean;
193
- }): react_jsx_runtime.JSX.Element;
194
- declare const PaymentForm: typeof PaymentFormInternal & {
195
- StoredPaymentMethods: typeof StoredPaymentMethods;
196
- Pay: typeof Pay;
197
- CheckoutNoPayment: typeof CheckoutNoPayment;
198
- PaymentMethodDetails: typeof PaymentMethodDetails;
199
- };
135
+ }): react_jsx_runtime.JSX.Element | null;
200
136
 
201
137
  declare function Signup({ companyName, priceListCode, returnUrl, couponCode, className, shadow, style, defaultFirstName, defaultLastName, defaultEmail, defaultCompanyName, defaultBillingCountry, }: {
202
138
  /** The company name to display on the signup page */