@bunnyapp/components 1.7.0-beta.8 → 1.8.0-beta.10

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 (300) hide show
  1. package/dist/cjs/index.js +5727 -4743
  2. package/dist/cjs/types/node_modules/@reduxjs/toolkit/dist/uncheckedindexed.d.ts +5 -0
  3. package/dist/cjs/types/src/UI/Tooltip.d.ts +2 -0
  4. package/dist/cjs/types/src/UI/TruncatedText/TruncatedText.d.ts +4 -0
  5. package/dist/cjs/types/src/UI/TruncatedText/hooks/useIsTextTruncated.d.ts +3 -0
  6. package/dist/cjs/types/src/ajax.d.ts +1 -1
  7. package/dist/cjs/types/src/components/BillingDetails/BillingDetails.d.ts +3 -2
  8. package/dist/cjs/types/src/components/{BunnyProvider.d.ts → BunnyProvider/BunnyProvider.d.ts} +4 -1
  9. package/dist/cjs/types/src/components/BunnyProvider/contexts/BunnyProviderCallbacksProvider.d.ts +13 -0
  10. package/dist/cjs/types/src/components/Checkout/Checkout.d.ts +2 -1
  11. package/dist/cjs/types/src/components/Checkout/QuoteCheckout.d.ts +5 -3
  12. package/dist/cjs/types/src/components/Checkout/QuoteIsLoadingIndicator.d.ts +1 -0
  13. package/dist/cjs/types/src/components/Invoice/Invoice.d.ts +3 -1
  14. package/dist/cjs/types/src/components/PandadocPollingModal.d.ts +1 -1
  15. package/dist/cjs/types/src/components/PaymentForm/DemoPay/DemoPayFormProvider.d.ts +10 -0
  16. package/dist/cjs/types/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +2 -4
  17. package/dist/cjs/types/src/components/PaymentForm/DemoPay/hooks/useSave.d.ts +1 -5
  18. package/dist/cjs/types/src/components/PaymentForm/PaymentForm.d.ts +50 -10
  19. package/dist/cjs/types/src/components/PaymentForm/Stripe/StripeFormProvider.d.ts +5 -0
  20. package/dist/cjs/types/src/components/PaymentForm/Stripe/hooks/usePay.d.ts +2 -4
  21. package/dist/cjs/types/src/components/PaymentForm/components/CheckoutNoPayment.d.ts +6 -0
  22. package/dist/cjs/types/src/components/PaymentForm/components/Pay.d.ts +5 -0
  23. package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails/PaymentMethodDetails.d.ts +12 -0
  24. package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Cancel.d.ts +1 -0
  25. package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Save.d.ts +1 -0
  26. package/dist/cjs/types/src/components/PaymentForm/components/StoredPaymentMethods.d.ts +18 -0
  27. package/dist/cjs/types/src/components/PaymentForm/context/AccountIdContext.d.ts +5 -0
  28. package/dist/cjs/types/src/components/PaymentForm/context/CallbacksContext.d.ts +14 -0
  29. package/dist/cjs/types/src/components/PaymentForm/context/PaymentMethodFormVisibilityContext.d.ts +12 -0
  30. package/dist/cjs/types/src/components/PaymentForm/context/PaymentProvider.d.ts +46 -30
  31. package/dist/cjs/types/src/components/PaymentForm/fragments/PaymentForm_PaymentMethodsFragment.d.ts +3 -0
  32. package/dist/cjs/types/src/components/PaymentForm/hooks/usePay.d.ts +14 -0
  33. package/dist/cjs/types/src/components/PaymentForm/hooks/usePayableCurrency.d.ts +2 -1
  34. package/dist/cjs/types/src/components/PaymentForm/hooks/usePaymentButtonText.d.ts +7 -1
  35. package/dist/cjs/types/src/components/PaymentForm/hooks/usePaymentHold.d.ts +18 -0
  36. package/dist/cjs/types/src/components/PaymentForm/hooks/useRemovePaymentMethod.d.ts +4 -1
  37. package/dist/cjs/types/src/components/PaymentForm/hooks/useSave.d.ts +16 -0
  38. package/dist/cjs/types/src/components/PaymentForm/types/PaymentType.d.ts +2 -1
  39. package/dist/cjs/types/src/components/Quote/Quote.d.ts +31 -2
  40. package/dist/{esm/types/src/components/Quote → cjs/types/src/components/Quote/components}/AcceptQuoteModal.d.ts +3 -3
  41. package/dist/cjs/types/src/components/Quote/components/NoSigningPluginsForm.d.ts +17 -0
  42. package/dist/cjs/types/src/components/Quote/components/PaymentHoldDisplay.d.ts +18 -0
  43. package/dist/cjs/types/src/components/Quote/{PaymentHoldModal.d.ts → components/PaymentHoldModal.d.ts} +5 -1
  44. package/dist/cjs/types/src/components/Quote/components/QuoteButtons.d.ts +13 -4
  45. package/dist/cjs/types/src/{hooks/quotes/useSendAcceptQuote.d.ts → components/Quote/hooks/useAcceptQuote.d.ts} +6 -3
  46. package/dist/cjs/types/src/components/Quote/hooks/useQuotePaymentHold.d.ts +20 -0
  47. package/dist/cjs/types/src/{graphql → components/Quote}/queries/getFormattedQuote.d.ts +6 -1
  48. package/dist/cjs/types/src/components/Quote/queries/quoteAccept.d.ts +14 -0
  49. package/dist/cjs/types/src/components/QuoteProvider/context/QuoteContext.d.ts +1 -0
  50. package/dist/cjs/types/src/components/QuoteProvider/context/quantityEditableChargesContext.d.ts +26 -0
  51. package/dist/cjs/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +5 -0
  52. package/dist/cjs/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_PriceListChargeFragment.d.ts +16 -0
  53. package/dist/cjs/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_QuoteFragment.d.ts +26 -0
  54. package/dist/cjs/types/src/components/QuoteProvider/fragments/useQuoteQuantities_PriceListChargeFragment.d.ts +13 -0
  55. package/dist/cjs/types/src/components/QuoteProvider/hooks/useFeatureQuantities.d.ts +4 -4
  56. package/dist/cjs/types/src/components/QuoteProvider/hooks/useIsFetchingQuote.d.ts +4 -0
  57. package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuantityEditableCharges.d.ts +75 -0
  58. package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuoteCreate.d.ts +14 -3
  59. package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuoteQuantities.d.ts +16 -8
  60. package/dist/cjs/types/src/components/QuoteProvider/hooks/useSelectedPriceListQuoteChange.d.ts +25 -0
  61. package/dist/cjs/types/src/components/QuoteProvider/mutations/quoteChargeCreate.d.ts +23 -0
  62. package/dist/cjs/types/src/components/QuoteProvider/mutations/quoteChargeUpdate.d.ts +12 -0
  63. package/dist/cjs/types/src/components/QuoteProvider/quoteMutationKeys.d.ts +20 -0
  64. package/dist/cjs/types/src/components/Signup/PaymentForms.d.ts +1 -1
  65. package/dist/cjs/types/src/components/Signup/PriceListDisplay.d.ts +18 -4
  66. package/dist/cjs/types/src/components/Signup/Signup.d.ts +0 -1
  67. package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/CheckoutSummary.d.ts +50 -0
  68. package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/hooks/sortQuoteChangeCharges.d.ts +14 -0
  69. package/dist/cjs/types/src/components/Signup/components/SelfServiceBuyWarning.d.ts +14 -0
  70. package/dist/cjs/types/src/components/Signup/fragments/Signup_PriceListFragment.d.ts +17 -0
  71. package/dist/cjs/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +19 -0
  72. package/dist/cjs/types/src/components/Signup/hooks/useApplyDefaultCoupon.d.ts +21 -0
  73. package/dist/cjs/types/src/components/Signup/mutations/accountSignup.d.ts +58 -0
  74. package/dist/cjs/types/src/components/Signup/mutations/quoteAccountSignup.d.ts +31 -0
  75. package/dist/{esm/types/src/graphql → cjs/types/src/components/Signup}/mutations/quoteRecalculateTaxes.d.ts +5 -1
  76. package/dist/{esm/types/src/graphql → cjs/types/src/components/Signup}/queries/getPriceList.d.ts +5 -2
  77. package/dist/cjs/types/src/components/Signup/queries/getQuote.d.ts +10 -0
  78. package/dist/cjs/types/src/components/Subscriptions/Subscriptions.d.ts +4 -1
  79. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/CheckoutBarInput.d.ts +9 -0
  80. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/CheckoutBarInput_PriceListChargeFragment.d.ts +13 -0
  81. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/useChargeCRUD_QuoteFragment.d.ts +22 -0
  82. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/hooks/useChargeCRUD.d.ts +31 -0
  83. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutPrice.d.ts +8 -3
  84. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +0 -19
  85. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/fragments/PlanPickerCheckoutBar_PriceListChargeFragment.d.ts +14 -0
  86. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/fragments/PlanPickerCheckoutBar_QuoteFragment.d.ts +20 -0
  87. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/FeatureAddonRow.d.ts +0 -3
  88. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/FeatureAddonsList.d.ts +2 -0
  89. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/PriceListCardDesktop.d.ts +2 -17
  90. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/util.d.ts +1 -0
  91. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerMobile/PriceListCardMobile.d.ts +3 -5
  92. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/BillingPeriodDescription.d.ts +12 -0
  93. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/PriceListCardPriceDescription.d.ts +13 -6
  94. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCard.d.ts +1 -1
  95. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCardDescription.d.ts +3 -2
  96. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/priceListCardUtils.d.ts +0 -4
  97. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListSelector/PriceListSelector.d.ts +3 -0
  98. package/dist/cjs/types/src/components/Subscriptions/Upgrade/Upgrade.d.ts +10 -4
  99. package/dist/cjs/types/src/components/Subscriptions/Upgrade/contexts/DefaultBillingPeriodContext.d.ts +4 -0
  100. package/dist/cjs/types/src/components/Subscriptions/Upgrade/queries/getSubscriptions.d.ts +2 -163
  101. package/dist/cjs/types/src/components/Subscriptions/context/upgradingSubscriptionContext.d.ts +21 -1
  102. package/dist/cjs/types/src/components/Subscriptions/fragments/UpgradingSubscriptionContext_SubscriptionFragment.d.ts +10 -0
  103. package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/QuantityDrawer.d.ts +2 -3
  104. package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/context/quoteRecalculateTaxesContext.d.ts +4 -1
  105. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionsList.d.ts +2 -0
  106. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/SubscriptionCardHeader.d.ts +1 -0
  107. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +61 -0
  108. package/dist/cjs/types/src/components/index.d.ts +1 -1
  109. package/dist/cjs/types/src/components/priceListPricing/PricingTooltip.d.ts +4 -5
  110. package/dist/cjs/types/src/components/priceListPricing/components/ChargePriceTiers.d.ts +2 -1
  111. package/dist/cjs/types/src/components/priceListPricing/components/PriceTierPrice.d.ts +10 -3
  112. package/dist/cjs/types/src/components/priceListPricing/utils/getPricingModelDescription.d.ts +1 -1
  113. package/dist/cjs/types/src/components/priceListPricing/utils/getPricingModelTitle.d.ts +1 -1
  114. package/dist/cjs/types/src/consts/AppConsts.d.ts +3 -0
  115. package/dist/cjs/types/src/contexts/InvoiceQuoteContext.d.ts +3 -3
  116. package/dist/cjs/types/src/contexts/onPaymentMethodRemoved.d.ts +5 -0
  117. package/dist/cjs/types/src/contexts/onPaymentMethodSaved.d.ts +5 -0
  118. package/dist/cjs/types/src/graphql/queries/getFormattedInvoice.d.ts +1 -1
  119. package/dist/cjs/types/src/hooks/useAllErrorFormats.d.ts +5 -1
  120. package/dist/cjs/types/src/hooks/usePaymentMethod.d.ts +4 -0
  121. package/dist/cjs/types/src/types/PriceList.d.ts +1 -0
  122. package/dist/cjs/types/src/types/frontendTypes/ComponentJSON.d.ts +1 -1
  123. package/dist/cjs/types/src/utils/QueryKeyFactory.d.ts +4 -4
  124. package/dist/cjs/types/src/utils/chargeUtils.d.ts +11 -5
  125. package/dist/cjs/types/src/utils/couponUtils.d.ts +6 -5
  126. package/dist/cjs/types/src/utils/featureAddonUtils/isAddonPurchased.d.ts +1 -1
  127. package/dist/cjs/types/src/utils/htmlUtils/isEmptyHTML.d.ts +5 -0
  128. package/dist/cjs/types/src/utils/htmlUtils/removeHTMLTags.d.ts +4 -0
  129. package/dist/cjs/types/src/utils/priceListChargeUtils/filterDeprecatedCharges.d.ts +11 -0
  130. package/dist/cjs/types/src/utils/priceListChargeUtils/priceListChargePriceDescription.d.ts +13 -0
  131. package/dist/cjs/types/src/utils/priceListUtils/getActiveCharges.d.ts +10 -0
  132. package/dist/cjs/types/src/utils/priceListUtils/getPrice.d.ts +9 -0
  133. package/dist/cjs/types/src/utils/priceListUtils/getPricingUnit.d.ts +16 -0
  134. package/dist/cjs/types/src/utils/priceListUtils/priceDescription.d.ts +11 -4
  135. package/dist/cjs/types/src/utils/pricePickerUtils.d.ts +1 -1
  136. package/dist/esm/index.js +6657 -5673
  137. package/dist/esm/types/node_modules/@reduxjs/toolkit/dist/uncheckedindexed.d.ts +5 -0
  138. package/dist/esm/types/src/UI/Tooltip.d.ts +2 -0
  139. package/dist/esm/types/src/UI/TruncatedText/TruncatedText.d.ts +4 -0
  140. package/dist/esm/types/src/UI/TruncatedText/hooks/useIsTextTruncated.d.ts +3 -0
  141. package/dist/esm/types/src/ajax.d.ts +1 -1
  142. package/dist/esm/types/src/components/BillingDetails/BillingDetails.d.ts +3 -2
  143. package/dist/esm/types/src/components/{BunnyProvider.d.ts → BunnyProvider/BunnyProvider.d.ts} +4 -1
  144. package/dist/esm/types/src/components/BunnyProvider/contexts/BunnyProviderCallbacksProvider.d.ts +13 -0
  145. package/dist/esm/types/src/components/Checkout/Checkout.d.ts +2 -1
  146. package/dist/esm/types/src/components/Checkout/QuoteCheckout.d.ts +5 -3
  147. package/dist/esm/types/src/components/Checkout/QuoteIsLoadingIndicator.d.ts +1 -0
  148. package/dist/esm/types/src/components/Invoice/Invoice.d.ts +3 -1
  149. package/dist/esm/types/src/components/PandadocPollingModal.d.ts +1 -1
  150. package/dist/esm/types/src/components/PaymentForm/DemoPay/DemoPayFormProvider.d.ts +10 -0
  151. package/dist/esm/types/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +2 -4
  152. package/dist/esm/types/src/components/PaymentForm/DemoPay/hooks/useSave.d.ts +1 -5
  153. package/dist/esm/types/src/components/PaymentForm/PaymentForm.d.ts +50 -10
  154. package/dist/esm/types/src/components/PaymentForm/Stripe/StripeFormProvider.d.ts +5 -0
  155. package/dist/esm/types/src/components/PaymentForm/Stripe/hooks/usePay.d.ts +2 -4
  156. package/dist/esm/types/src/components/PaymentForm/components/CheckoutNoPayment.d.ts +6 -0
  157. package/dist/esm/types/src/components/PaymentForm/components/Pay.d.ts +5 -0
  158. package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails/PaymentMethodDetails.d.ts +12 -0
  159. package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Cancel.d.ts +1 -0
  160. package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Save.d.ts +1 -0
  161. package/dist/esm/types/src/components/PaymentForm/components/StoredPaymentMethods.d.ts +18 -0
  162. package/dist/esm/types/src/components/PaymentForm/context/AccountIdContext.d.ts +5 -0
  163. package/dist/esm/types/src/components/PaymentForm/context/CallbacksContext.d.ts +14 -0
  164. package/dist/esm/types/src/components/PaymentForm/context/PaymentMethodFormVisibilityContext.d.ts +12 -0
  165. package/dist/esm/types/src/components/PaymentForm/context/PaymentProvider.d.ts +46 -30
  166. package/dist/esm/types/src/components/PaymentForm/fragments/PaymentForm_PaymentMethodsFragment.d.ts +3 -0
  167. package/dist/esm/types/src/components/PaymentForm/hooks/usePay.d.ts +14 -0
  168. package/dist/esm/types/src/components/PaymentForm/hooks/usePayableCurrency.d.ts +2 -1
  169. package/dist/esm/types/src/components/PaymentForm/hooks/usePaymentButtonText.d.ts +7 -1
  170. package/dist/esm/types/src/components/PaymentForm/hooks/usePaymentHold.d.ts +18 -0
  171. package/dist/esm/types/src/components/PaymentForm/hooks/useRemovePaymentMethod.d.ts +4 -1
  172. package/dist/esm/types/src/components/PaymentForm/hooks/useSave.d.ts +16 -0
  173. package/dist/esm/types/src/components/PaymentForm/types/PaymentType.d.ts +2 -1
  174. package/dist/esm/types/src/components/Quote/Quote.d.ts +31 -2
  175. package/dist/{cjs/types/src/components/Quote → esm/types/src/components/Quote/components}/AcceptQuoteModal.d.ts +3 -3
  176. package/dist/esm/types/src/components/Quote/components/NoSigningPluginsForm.d.ts +17 -0
  177. package/dist/esm/types/src/components/Quote/components/PaymentHoldDisplay.d.ts +18 -0
  178. package/dist/esm/types/src/components/Quote/{PaymentHoldModal.d.ts → components/PaymentHoldModal.d.ts} +5 -1
  179. package/dist/esm/types/src/components/Quote/components/QuoteButtons.d.ts +13 -4
  180. package/dist/esm/types/src/{hooks/quotes/useSendAcceptQuote.d.ts → components/Quote/hooks/useAcceptQuote.d.ts} +6 -3
  181. package/dist/esm/types/src/components/Quote/hooks/useQuotePaymentHold.d.ts +20 -0
  182. package/dist/esm/types/src/{graphql → components/Quote}/queries/getFormattedQuote.d.ts +6 -1
  183. package/dist/esm/types/src/components/Quote/queries/quoteAccept.d.ts +14 -0
  184. package/dist/esm/types/src/components/QuoteProvider/context/QuoteContext.d.ts +1 -0
  185. package/dist/esm/types/src/components/QuoteProvider/context/quantityEditableChargesContext.d.ts +26 -0
  186. package/dist/esm/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +5 -0
  187. package/dist/esm/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_PriceListChargeFragment.d.ts +16 -0
  188. package/dist/esm/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_QuoteFragment.d.ts +26 -0
  189. package/dist/esm/types/src/components/QuoteProvider/fragments/useQuoteQuantities_PriceListChargeFragment.d.ts +13 -0
  190. package/dist/esm/types/src/components/QuoteProvider/hooks/useFeatureQuantities.d.ts +4 -4
  191. package/dist/esm/types/src/components/QuoteProvider/hooks/useIsFetchingQuote.d.ts +4 -0
  192. package/dist/esm/types/src/components/QuoteProvider/hooks/useQuantityEditableCharges.d.ts +75 -0
  193. package/dist/esm/types/src/components/QuoteProvider/hooks/useQuoteCreate.d.ts +14 -3
  194. package/dist/esm/types/src/components/QuoteProvider/hooks/useQuoteQuantities.d.ts +16 -8
  195. package/dist/esm/types/src/components/QuoteProvider/hooks/useSelectedPriceListQuoteChange.d.ts +25 -0
  196. package/dist/esm/types/src/components/QuoteProvider/mutations/quoteChargeCreate.d.ts +23 -0
  197. package/dist/esm/types/src/components/QuoteProvider/mutations/quoteChargeUpdate.d.ts +12 -0
  198. package/dist/esm/types/src/components/QuoteProvider/quoteMutationKeys.d.ts +20 -0
  199. package/dist/esm/types/src/components/Signup/PaymentForms.d.ts +1 -1
  200. package/dist/esm/types/src/components/Signup/PriceListDisplay.d.ts +18 -4
  201. package/dist/esm/types/src/components/Signup/Signup.d.ts +0 -1
  202. package/dist/esm/types/src/components/Signup/components/CheckoutSummary/CheckoutSummary.d.ts +50 -0
  203. package/dist/esm/types/src/components/Signup/components/CheckoutSummary/hooks/sortQuoteChangeCharges.d.ts +14 -0
  204. package/dist/esm/types/src/components/Signup/components/SelfServiceBuyWarning.d.ts +14 -0
  205. package/dist/esm/types/src/components/Signup/fragments/Signup_PriceListFragment.d.ts +17 -0
  206. package/dist/esm/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +19 -0
  207. package/dist/esm/types/src/components/Signup/hooks/useApplyDefaultCoupon.d.ts +21 -0
  208. package/dist/esm/types/src/components/Signup/mutations/accountSignup.d.ts +58 -0
  209. package/dist/esm/types/src/components/Signup/mutations/quoteAccountSignup.d.ts +31 -0
  210. package/dist/{cjs/types/src/graphql → esm/types/src/components/Signup}/mutations/quoteRecalculateTaxes.d.ts +5 -1
  211. package/dist/{cjs/types/src/graphql → esm/types/src/components/Signup}/queries/getPriceList.d.ts +5 -2
  212. package/dist/esm/types/src/components/Signup/queries/getQuote.d.ts +10 -0
  213. package/dist/esm/types/src/components/Subscriptions/Subscriptions.d.ts +4 -1
  214. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/CheckoutBarInput.d.ts +9 -0
  215. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/CheckoutBarInput_PriceListChargeFragment.d.ts +13 -0
  216. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/useChargeCRUD_QuoteFragment.d.ts +22 -0
  217. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/hooks/useChargeCRUD.d.ts +31 -0
  218. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutPrice.d.ts +8 -3
  219. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +0 -19
  220. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/fragments/PlanPickerCheckoutBar_PriceListChargeFragment.d.ts +14 -0
  221. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/fragments/PlanPickerCheckoutBar_QuoteFragment.d.ts +20 -0
  222. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/FeatureAddonRow.d.ts +0 -3
  223. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/FeatureAddonsList.d.ts +2 -0
  224. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/PriceListCardDesktop.d.ts +2 -17
  225. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/util.d.ts +1 -0
  226. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerMobile/PriceListCardMobile.d.ts +3 -5
  227. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/BillingPeriodDescription.d.ts +12 -0
  228. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/PriceListCardPriceDescription.d.ts +13 -6
  229. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCard.d.ts +1 -1
  230. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCardDescription.d.ts +3 -2
  231. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/priceListCardUtils.d.ts +0 -4
  232. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListSelector/PriceListSelector.d.ts +3 -0
  233. package/dist/esm/types/src/components/Subscriptions/Upgrade/Upgrade.d.ts +10 -4
  234. package/dist/esm/types/src/components/Subscriptions/Upgrade/contexts/DefaultBillingPeriodContext.d.ts +4 -0
  235. package/dist/esm/types/src/components/Subscriptions/Upgrade/queries/getSubscriptions.d.ts +2 -163
  236. package/dist/esm/types/src/components/Subscriptions/context/upgradingSubscriptionContext.d.ts +21 -1
  237. package/dist/esm/types/src/components/Subscriptions/fragments/UpgradingSubscriptionContext_SubscriptionFragment.d.ts +10 -0
  238. package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/QuantityDrawer.d.ts +2 -3
  239. package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/context/quoteRecalculateTaxesContext.d.ts +4 -1
  240. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/SubscriptionsList.d.ts +2 -0
  241. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/SubscriptionCardHeader.d.ts +1 -0
  242. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +61 -0
  243. package/dist/esm/types/src/components/index.d.ts +1 -1
  244. package/dist/esm/types/src/components/priceListPricing/PricingTooltip.d.ts +4 -5
  245. package/dist/esm/types/src/components/priceListPricing/components/ChargePriceTiers.d.ts +2 -1
  246. package/dist/esm/types/src/components/priceListPricing/components/PriceTierPrice.d.ts +10 -3
  247. package/dist/esm/types/src/components/priceListPricing/utils/getPricingModelDescription.d.ts +1 -1
  248. package/dist/esm/types/src/components/priceListPricing/utils/getPricingModelTitle.d.ts +1 -1
  249. package/dist/esm/types/src/consts/AppConsts.d.ts +3 -0
  250. package/dist/esm/types/src/contexts/InvoiceQuoteContext.d.ts +3 -3
  251. package/dist/esm/types/src/contexts/onPaymentMethodRemoved.d.ts +5 -0
  252. package/dist/esm/types/src/contexts/onPaymentMethodSaved.d.ts +5 -0
  253. package/dist/esm/types/src/graphql/queries/getFormattedInvoice.d.ts +1 -1
  254. package/dist/esm/types/src/hooks/useAllErrorFormats.d.ts +5 -1
  255. package/dist/esm/types/src/hooks/usePaymentMethod.d.ts +4 -0
  256. package/dist/esm/types/src/types/PriceList.d.ts +1 -0
  257. package/dist/esm/types/src/types/frontendTypes/ComponentJSON.d.ts +1 -1
  258. package/dist/esm/types/src/utils/QueryKeyFactory.d.ts +4 -4
  259. package/dist/esm/types/src/utils/chargeUtils.d.ts +11 -5
  260. package/dist/esm/types/src/utils/couponUtils.d.ts +6 -5
  261. package/dist/esm/types/src/utils/featureAddonUtils/isAddonPurchased.d.ts +1 -1
  262. package/dist/esm/types/src/utils/htmlUtils/isEmptyHTML.d.ts +5 -0
  263. package/dist/esm/types/src/utils/htmlUtils/removeHTMLTags.d.ts +4 -0
  264. package/dist/esm/types/src/utils/priceListChargeUtils/filterDeprecatedCharges.d.ts +11 -0
  265. package/dist/esm/types/src/utils/priceListChargeUtils/priceListChargePriceDescription.d.ts +13 -0
  266. package/dist/esm/types/src/utils/priceListUtils/getActiveCharges.d.ts +10 -0
  267. package/dist/esm/types/src/utils/priceListUtils/getPrice.d.ts +9 -0
  268. package/dist/esm/types/src/utils/priceListUtils/getPricingUnit.d.ts +16 -0
  269. package/dist/esm/types/src/utils/priceListUtils/priceDescription.d.ts +11 -4
  270. package/dist/esm/types/src/utils/pricePickerUtils.d.ts +1 -1
  271. package/dist/index.d.ts +128 -24
  272. package/package.json +17 -17
  273. package/dist/cjs/types/src/components/PaymentForm/components/CheckoutFooter.d.ts +0 -2
  274. package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails.d.ts +0 -2
  275. package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodFooter.d.ts +0 -4
  276. package/dist/cjs/types/src/components/PaymentForm/hooks/useHandlePayment.d.ts +0 -40
  277. package/dist/cjs/types/src/components/Signup/CheckoutSummary.d.ts +0 -14
  278. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput.d.ts +0 -8
  279. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/utils/hasMultipleRecurringCharges.d.ts +0 -12
  280. package/dist/cjs/types/src/graphql/mutations/accountSignup.d.ts +0 -11
  281. package/dist/cjs/types/src/graphql/mutations/quoteAccountSignup.d.ts +0 -15
  282. package/dist/cjs/types/src/graphql/queries/getQuote.d.ts +0 -36
  283. package/dist/cjs/types/src/utils/priceListUtils/doesPriceListHaveFlatFeeCharges.d.ts +0 -12
  284. package/dist/esm/types/src/components/PaymentForm/components/CheckoutFooter.d.ts +0 -2
  285. package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails.d.ts +0 -2
  286. package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodFooter.d.ts +0 -4
  287. package/dist/esm/types/src/components/PaymentForm/hooks/useHandlePayment.d.ts +0 -40
  288. package/dist/esm/types/src/components/Signup/CheckoutSummary.d.ts +0 -14
  289. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput.d.ts +0 -8
  290. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/utils/hasMultipleRecurringCharges.d.ts +0 -12
  291. package/dist/esm/types/src/graphql/mutations/accountSignup.d.ts +0 -11
  292. package/dist/esm/types/src/graphql/mutations/quoteAccountSignup.d.ts +0 -15
  293. package/dist/esm/types/src/graphql/queries/getQuote.d.ts +0 -36
  294. package/dist/esm/types/src/utils/priceListUtils/doesPriceListHaveFlatFeeCharges.d.ts +0 -12
  295. /package/dist/cjs/types/src/{hooks → components/BunnyProvider/hooks}/useCreateQueryClient.d.ts +0 -0
  296. /package/dist/cjs/types/src/components/PaymentForm/components/{PaymentMethodSelector.d.ts → PaymentMethodDetails/components/PaymentMethodSelector.d.ts} +0 -0
  297. /package/dist/cjs/types/src/{hooks/quotes → components/Quote/hooks}/useSigningComplete.d.ts +0 -0
  298. /package/dist/esm/types/src/{hooks → components/BunnyProvider/hooks}/useCreateQueryClient.d.ts +0 -0
  299. /package/dist/esm/types/src/components/PaymentForm/components/{PaymentMethodSelector.d.ts → PaymentMethodDetails/components/PaymentMethodSelector.d.ts} +0 -0
  300. /package/dist/esm/types/src/{hooks/quotes → components/Quote/hooks}/useSigningComplete.d.ts +0 -0
@@ -0,0 +1,14 @@
1
+ import { FragmentOf } from 'gql.tada';
2
+ export declare const SelfServiceBuyWarning_PriceListFragment: import("gql.tada").TadaDocumentNode<{
3
+ plan: {
4
+ selfServiceBuy: boolean | null;
5
+ } | null;
6
+ }, {}, {
7
+ fragment: "SelfServiceBuyWarning_PriceListFragment";
8
+ on: "PriceList";
9
+ masked: true;
10
+ }>;
11
+ export default function SelfServiceBuyWarning({ priceList: maskedPriceList, onShowSelfServiceBuyWarning, }: {
12
+ priceList: FragmentOf<typeof SelfServiceBuyWarning_PriceListFragment> | undefined | null;
13
+ onShowSelfServiceBuyWarning: () => void;
14
+ }): null;
@@ -0,0 +1,17 @@
1
+ export declare const Signup_PriceListFragment: import("gql.tada").TadaDocumentNode<{
2
+ [$tada.fragmentRefs]: {
3
+ CheckoutSummary_PriceListFragment: "PriceList";
4
+ } & {
5
+ PriceListDisplay_PriceListFragment: "PriceList";
6
+ } & {
7
+ SelfServiceBuyWarning_PriceListFragment: "PriceList";
8
+ };
9
+ plan: {
10
+ selfServiceBuy: boolean | null;
11
+ } | null;
12
+ trialAllowed: boolean;
13
+ }, {}, {
14
+ fragment: "Signup_PriceListFragment";
15
+ on: "PriceList";
16
+ masked: true;
17
+ }>;
@@ -0,0 +1,19 @@
1
+ export declare const Signup_QuoteFragment: import("gql.tada").TadaDocumentNode<{
2
+ [$tada.fragmentRefs]: {
3
+ CheckoutSummary_QuoteFragment: "Quote";
4
+ } & {
5
+ PaymentForms_QuoteFragment: "Quote";
6
+ } & {
7
+ useApplyDefaultCoupon_QuoteFragment: "Quote";
8
+ };
9
+ id: string | null;
10
+ currencyId: string;
11
+ amountDue: number | null;
12
+ quoteChanges: {
13
+ id: string | null;
14
+ }[] | null;
15
+ }, {}, {
16
+ fragment: "Signup_QuoteFragment";
17
+ on: "Quote";
18
+ masked: true;
19
+ }>;
@@ -0,0 +1,21 @@
1
+ import { FragmentOf } from 'gql.tada';
2
+ export declare const useApplyDefaultCoupon_QuoteFragment: import("gql.tada").TadaDocumentNode<{
3
+ [$tada.fragmentRefs]: {
4
+ canApplyCoupons_QuoteFragment: "Quote";
5
+ };
6
+ }, {}, {
7
+ fragment: "useApplyDefaultCoupon_QuoteFragment";
8
+ on: "Quote";
9
+ masked: true;
10
+ }>;
11
+ /**
12
+ * Applies a default coupon code once when quoteChangeId is available.
13
+ * Uses a ref to ensure coupon code is only applied once.
14
+ */
15
+ export default function useApplyDefaultCoupon({ couponCode, quoteChangeId, quote: maskedQuote, activeCouponsExist, addCoupon, }: {
16
+ couponCode: string | undefined;
17
+ quoteChangeId: string | undefined;
18
+ quote: FragmentOf<typeof useApplyDefaultCoupon_QuoteFragment> | undefined | null;
19
+ activeCouponsExist: boolean;
20
+ addCoupon: (code: string) => void;
21
+ }): void;
@@ -0,0 +1,58 @@
1
+ declare const accountSignup: ({ token, apiHost, accountId, quoteId, paymentToken, paymentMethodId, pluginId, priceListCode, }: {
2
+ token: string;
3
+ apiHost: string;
4
+ accountId: string;
5
+ quoteId: string;
6
+ paymentToken?: string;
7
+ paymentMethodId?: string;
8
+ pluginId: string;
9
+ priceListCode: string;
10
+ }) => Promise<{
11
+ errors: string[] | null;
12
+ quote: {
13
+ accountId: string;
14
+ amount: number;
15
+ amountDue: number | null;
16
+ applicationDate: unknown;
17
+ applied: boolean;
18
+ backdatedPeriods: boolean | null;
19
+ backdatedQuote: boolean | null;
20
+ billingDay: number | null;
21
+ contactId: string | null;
22
+ createdAt: unknown;
23
+ credits: number | null;
24
+ currencyId: string;
25
+ dealId: string | null;
26
+ discount: number | null;
27
+ discountValue: number;
28
+ endDate: unknown;
29
+ evergreen: boolean | null;
30
+ expiresAt: unknown;
31
+ id: string | null;
32
+ invoiceImmediately: boolean | null;
33
+ invoiceImmediatelyAvailable: boolean | null;
34
+ invoiceUntil: unknown;
35
+ isPendingApprovalRequest: boolean;
36
+ kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
37
+ message: string | null;
38
+ name: string | null;
39
+ netPaymentDays: number | null;
40
+ notes: string | null;
41
+ number: string | null;
42
+ ownerId: string | null;
43
+ payableId: string | null;
44
+ periodAmount: number | null;
45
+ poNumber: string | null;
46
+ requiresApproval: boolean;
47
+ smallUnitAmountDue: number | null;
48
+ splitInvoice: boolean | null;
49
+ startDate: unknown;
50
+ state: "APPROVED" | "REJECTED" | "DRAFT" | "SHARED" | "VIEWED" | "ACCEPTED" | "IN_APPROVAL" | "UNDONE";
51
+ subtotal: number;
52
+ taxAmount: number;
53
+ taxCode: string | null;
54
+ updatedAt: unknown;
55
+ uuid: string;
56
+ } | null;
57
+ } | null>;
58
+ export default accountSignup;
@@ -0,0 +1,31 @@
1
+ import BillingDetails from '@/types/billingDetails';
2
+ type BillingContact = {
3
+ firstName: string;
4
+ lastName: string;
5
+ email: string;
6
+ };
7
+ declare const quoteAccountSignup: ({ token, apiHost, priceListCode, accountName, billingContact, billingDetails, trial, }: {
8
+ token?: string;
9
+ apiHost: string;
10
+ priceListCode: string;
11
+ accountName: string;
12
+ billingContact: BillingContact;
13
+ billingDetails?: BillingDetails;
14
+ trial: boolean;
15
+ }) => Promise<{
16
+ account: {
17
+ id: string;
18
+ } | null;
19
+ quote: {
20
+ [$tada.fragmentRefs]: {
21
+ Signup_QuoteFragment: "Quote";
22
+ };
23
+ id: string | null;
24
+ } | null;
25
+ tenant: {
26
+ code: string | null;
27
+ } | null;
28
+ portalSessionToken: string | null;
29
+ errors: string[] | null;
30
+ } | null>;
31
+ export default quoteAccountSignup;
@@ -2,5 +2,9 @@ declare const quoteRecalculateTaxes: ({ quoteId, apiHost, token, }: {
2
2
  quoteId: string;
3
3
  apiHost: string;
4
4
  token?: string;
5
- }) => Promise<any>;
5
+ }) => Promise<{
6
+ [$tada.fragmentRefs]: {
7
+ Signup_QuoteFragment: "Quote";
8
+ };
9
+ } | null | undefined>;
6
10
  export default quoteRecalculateTaxes;
@@ -1,7 +1,10 @@
1
- import PriceList from '@/types/PriceList';
2
1
  declare const getPriceList: ({ token, code, apiHost, }: {
3
2
  token?: string;
4
3
  code: string;
5
4
  apiHost: string;
6
- }) => Promise<PriceList>;
5
+ }) => Promise<{
6
+ [$tada.fragmentRefs]: {
7
+ Signup_PriceListFragment: "PriceList";
8
+ };
9
+ } | null>;
7
10
  export default getPriceList;
@@ -0,0 +1,10 @@
1
+ declare const getQuote: ({ id, token, apiHost, }: {
2
+ id: string;
3
+ token?: string;
4
+ apiHost: string;
5
+ }) => Promise<{
6
+ [$tada.fragmentRefs]: {
7
+ Signup_QuoteFragment: "Quote";
8
+ };
9
+ } | null>;
10
+ export default getQuote;
@@ -1,4 +1,4 @@
1
- declare const SubscriptionsWrapper: ({ handlePortalErrors, companyName, isInPreviewMode, productId, className, styles: userStyles, noSubscriptionsComponent, showInactiveSubscriptions, showInactiveSubscriptionsToggle, }: {
1
+ declare const SubscriptionsWrapper: ({ handlePortalErrors, companyName, isInPreviewMode, productId, className, styles: userStyles, noSubscriptionsComponent, showInactiveSubscriptions, showInactiveSubscriptionsToggle, onPaymentMethodSaved, onPaymentMethodRemoved, onSubscriptionUpgradeClick, }: {
2
2
  handlePortalErrors?: (errors: any) => void;
3
3
  companyName: string;
4
4
  isInPreviewMode?: boolean;
@@ -12,5 +12,8 @@ declare const SubscriptionsWrapper: ({ handlePortalErrors, companyName, isInPrev
12
12
  noSubscriptionsComponent?: React.ReactNode;
13
13
  showInactiveSubscriptions?: boolean;
14
14
  showInactiveSubscriptionsToggle?: boolean;
15
+ onPaymentMethodSaved?: (paymentMethodId: string) => void;
16
+ onPaymentMethodRemoved?: (paymentMethodId: string) => void;
17
+ onSubscriptionUpgradeClick?: (subscriptionId: string) => void;
15
18
  }) => import("react/jsx-runtime").JSX.Element;
16
19
  export default SubscriptionsWrapper;
@@ -0,0 +1,9 @@
1
+ import { FragmentOf } from 'gql.tada';
2
+ import { CheckoutBarInput_PriceListChargeFragment } from './fragments/CheckoutBarInput_PriceListChargeFragment';
3
+ declare const CheckoutBarInput: ({ disabled, priceListCharge: maskedPriceListCharge, quantity, onQuantityChanged, }: {
4
+ disabled?: boolean;
5
+ priceListCharge: FragmentOf<typeof CheckoutBarInput_PriceListChargeFragment>;
6
+ quantity: number | undefined;
7
+ onQuantityChanged: (quantity: number) => void;
8
+ }) => import("react/jsx-runtime").JSX.Element;
9
+ export default CheckoutBarInput;
@@ -0,0 +1,13 @@
1
+ export declare const CheckoutBarInput_PriceListChargeFragment: import("gql.tada").TadaDocumentNode<{
2
+ name: string;
3
+ quantityMin: number | null;
4
+ quantityMax: number | null;
5
+ id: string;
6
+ feature: {
7
+ id: string;
8
+ } | null;
9
+ }, {}, {
10
+ fragment: "CheckoutBarInput_PriceListChargeFragment";
11
+ on: "PriceListCharge";
12
+ masked: true;
13
+ }>;
@@ -0,0 +1,22 @@
1
+ export declare const useChargeCRUD_QuoteFragment: import("gql.tada").TadaDocumentNode<{
2
+ id: string | null;
3
+ startDate: unknown;
4
+ quoteChanges: {
5
+ subscriptionId: string | null;
6
+ charges: {
7
+ id: string | null;
8
+ quantity: number | null;
9
+ priceListCharge: {
10
+ id: string;
11
+ } | null;
12
+ }[];
13
+ id: string | null;
14
+ [$tada.fragmentRefs]: {
15
+ useSelectedPriceListQuoteChange_QuoteChangeFragment: "QuoteChange";
16
+ };
17
+ }[] | null;
18
+ }, {}, {
19
+ fragment: "useChargeCRUD_QuoteFragment";
20
+ on: "Quote";
21
+ masked: true;
22
+ }>;
@@ -0,0 +1,31 @@
1
+ export declare const useChargeCRUD_SubscriptionFragment: import("gql.tada").TadaDocumentNode<{
2
+ currentCharges: {
3
+ quantity: number | null;
4
+ priceListCharge: {
5
+ id: string;
6
+ } | null;
7
+ }[] | null;
8
+ }, {}, {
9
+ fragment: "useChargeCRUD_SubscriptionFragment";
10
+ on: "Subscription";
11
+ masked: true;
12
+ }>;
13
+ /**
14
+ * Hook used by a single `CheckoutBarInput` to manage CRUD for its own charge.
15
+ *
16
+ * Rules:
17
+ * 1) When quantity changes and there is an existing quote charge on the quote change,
18
+ * update that quote charge's quantity.
19
+ * 2) When quantity changes, there are subscription charges but no quote charges,
20
+ * create a new quote charge – but only if the input quantity differs from the
21
+ * subscription charge quantity. If the quantity later returns to the subscription
22
+ * quantity, delete the quote charge.
23
+ *
24
+ * All network operations are debounced.
25
+ */
26
+ export declare const useChargeCRUD: ({ priceListChargeId, featureId, }: {
27
+ priceListChargeId: string;
28
+ featureId: string | undefined;
29
+ }) => {
30
+ onQuantityChange: (nextQuantity: number) => void;
31
+ };
@@ -3,14 +3,19 @@ import { FragmentOf } from 'gql.tada';
3
3
  export declare const CheckoutPrice_QuoteFragment: import("gql.tada").TadaDocumentNode<{
4
4
  periodAmount: number | null;
5
5
  amountDue: number | null;
6
+ quoteChanges: {
7
+ charges: {
8
+ kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
9
+ chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
10
+ }[];
11
+ }[] | null;
6
12
  }, {}, {
7
13
  fragment: "CheckoutPrice_QuoteFragment";
8
14
  on: "Quote";
9
15
  masked: true;
10
16
  }>;
11
- declare const CheckoutPrice: ({ isUsage, quote: maskedQuote, selectedPriceList, }: {
12
- isUsage: boolean;
17
+ declare const CheckoutPrice: ({ quote: maskedQuote, selectedPriceList, }: {
13
18
  quote?: FragmentOf<typeof CheckoutPrice_QuoteFragment>;
14
19
  selectedPriceList: PriceList;
15
- }) => import("react/jsx-runtime").JSX.Element | null;
20
+ }) => import("react/jsx-runtime").JSX.Element;
16
21
  export default CheckoutPrice;
@@ -1,23 +1,4 @@
1
1
  import PriceList from '@/types/PriceList';
2
- export declare const PlanPickerCheckoutBar_QuoteFragment: import("gql.tada").TadaDocumentNode<{
3
- [$tada.fragmentRefs]: {
4
- Checkout_QuoteFragment: "Quote";
5
- };
6
- quoteChanges: {
7
- priceList: {
8
- id: string;
9
- } | null;
10
- charges: {
11
- priceListCharge: {
12
- id: string;
13
- } | null;
14
- }[];
15
- }[] | null;
16
- }, {}, {
17
- fragment: "PlanPickerCheckoutBar_QuoteFragment";
18
- on: "Quote";
19
- masked: true;
20
- }>;
21
2
  declare const PlanPickerCheckoutBar: ({ selectedPriceList, handlePortalErrors, onCheckoutSuccess, }: {
22
3
  selectedPriceList: PriceList;
23
4
  handlePortalErrors?: (errors: any) => void;
@@ -0,0 +1,14 @@
1
+ export declare const PlanPickerCheckoutBar_PriceListChargeFragment: import("gql.tada").TadaDocumentNode<{
2
+ [$tada.fragmentRefs]: {
3
+ CheckoutBarInput_PriceListChargeFragment: "PriceListCharge";
4
+ };
5
+ feature: {
6
+ id: string;
7
+ } | null;
8
+ featureAddon: boolean | null;
9
+ id: string;
10
+ }, {}, {
11
+ fragment: "PlanPickerCheckoutBar_PriceListChargeFragment";
12
+ on: "PriceListCharge";
13
+ masked: true;
14
+ }>;
@@ -0,0 +1,20 @@
1
+ export declare const PlanPickerCheckoutBar_QuoteFragment: import("gql.tada").TadaDocumentNode<{
2
+ [$tada.fragmentRefs]: {
3
+ Checkout_QuoteFragment: "Quote";
4
+ };
5
+ quoteChanges: {
6
+ priceList: {
7
+ id: string;
8
+ } | null;
9
+ charges: {
10
+ priceListCharge: {
11
+ id: string;
12
+ } | null;
13
+ }[];
14
+ }[] | null;
15
+ id: string | null;
16
+ }, {}, {
17
+ fragment: "PlanPickerCheckoutBar_QuoteFragment";
18
+ on: "Quote";
19
+ masked: true;
20
+ }>;
@@ -6,9 +6,6 @@ export declare const FeatureAddonRow_PriceListFragment: import("gql.tada").TadaD
6
6
  id: string;
7
7
  name: string;
8
8
  }[] | null;
9
- [$tada.fragmentRefs]: {
10
- PricingTooltip_PriceListFragment: "PriceList";
11
- };
12
9
  }, {}, {
13
10
  fragment: "FeatureAddonRow_PriceListFragment";
14
11
  on: "PriceList";
@@ -6,6 +6,8 @@ export declare const FeatureAddonsList_PriceListFragment: import("gql.tada").Tad
6
6
  id: string;
7
7
  name: string;
8
8
  featureAddon: boolean | null;
9
+ deprecated: boolean | null;
10
+ removeOnRenewal: boolean | null;
9
11
  [$tada.fragmentRefs]: {
10
12
  PricingTooltip_PriceListChargeFragment: "PriceListCharge";
11
13
  } & {
@@ -1,33 +1,19 @@
1
1
  import DeprecatedPriceList from '@/types/PriceList';
2
- import Feature from '@/types/Feature';
3
2
  import Subscription from '@/types/Subscription';
4
3
  import { FragmentOf } from 'gql.tada';
5
4
  export declare const PriceListCardDesktop_PriceListFragment: import("gql.tada").TadaDocumentNode<{
6
5
  id: string;
6
+ deprecated: boolean | null;
7
7
  plan: {
8
8
  id: string;
9
9
  pricingStyle: "PRICED" | "FREE" | "CONTACT_US";
10
10
  contactUsUrl: string | null;
11
11
  name: string;
12
12
  } | null;
13
- charges: {
14
- id: string;
15
- featureAddon: boolean | null;
16
- priceListChargeTiers: {
17
- starts: number | null;
18
- price: number | null;
19
- }[] | null;
20
- [$tada.fragmentRefs]: {
21
- PricingTooltip_PriceListChargeFragment: "PriceListCharge";
22
- };
23
- }[] | null;
24
- currencyId: string;
25
13
  [$tada.fragmentRefs]: {
26
14
  PriceListCardButton_PriceListFragment: "PriceList";
27
15
  } & {
28
16
  PriceListHasPriceTiers_PriceListFragment: "PriceList";
29
- } & {
30
- PricingTooltip_PriceListFragment: "PriceList";
31
17
  } & {
32
18
  PriceListCardPrice_PriceListFragment: "PriceList";
33
19
  } & {
@@ -38,11 +24,10 @@ export declare const PriceListCardDesktop_PriceListFragment: import("gql.tada").
38
24
  on: "PriceList";
39
25
  masked: true;
40
26
  }>;
41
- declare const PriceListCardDesktop: ({ hideButton, description, disableSelectCurrentPlan, feature, isPriceListCurrentSubscription, isSelected, priceList: maskedPriceList, subscriptionPlan, trialRemainingDays, noBorder, onClickPriceListCard, }: {
27
+ declare const PriceListCardDesktop: ({ hideButton, description, disableSelectCurrentPlan, isPriceListCurrentSubscription, isSelected, priceList: maskedPriceList, subscriptionPlan, trialRemainingDays, noBorder, onClickPriceListCard, }: {
42
28
  hideButton?: boolean;
43
29
  description: string;
44
30
  disableSelectCurrentPlan: boolean;
45
- feature?: Feature;
46
31
  isPriceListCurrentSubscription: boolean;
47
32
  isSelected: boolean;
48
33
  priceList: FragmentOf<typeof PriceListCardDesktop_PriceListFragment>;
@@ -62,4 +62,5 @@ export declare const filterUniqueFeatures: ({ availablePriceLists, }: {
62
62
  trialLengthDays?: number;
63
63
  updatedAt: string;
64
64
  addonPlans?: import("../../../../../types/Plan").Plan[];
65
+ deprecated?: boolean;
65
66
  }[];
@@ -1,7 +1,6 @@
1
- import { FragmentOf } from 'gql.tada';
2
- import Feature from '@/types/Feature';
3
- import Subscription from '@/types/Subscription';
4
1
  import PriceList from '@/types/PriceList';
2
+ import Subscription from '@/types/Subscription';
3
+ import { FragmentOf } from 'gql.tada';
5
4
  export declare const PriceListCardMobile_PriceListFragment: import("gql.tada").TadaDocumentNode<{
6
5
  plan: {
7
6
  name: string;
@@ -18,9 +17,8 @@ export declare const PriceListCardMobile_PriceListFragment: import("gql.tada").T
18
17
  on: "PriceList";
19
18
  masked: true;
20
19
  }>;
21
- declare const PriceListCardMobile: ({ description, feature, isPriceListCurrentSubscription, isSelected, priceList: maskedPriceList, subscriptionPlan, trialRemainingDays, disableOnClickPriceListCard, onClickPriceListCard, }: {
20
+ declare const PriceListCardMobile: ({ description, isPriceListCurrentSubscription, isSelected, priceList: maskedPriceList, subscriptionPlan, trialRemainingDays, disableOnClickPriceListCard, onClickPriceListCard, }: {
22
21
  description: string;
23
- feature?: Feature;
24
22
  isPriceListCurrentSubscription: boolean;
25
23
  isSelected: boolean;
26
24
  priceList: FragmentOf<typeof PriceListCardMobile_PriceListFragment>;
@@ -0,0 +1,12 @@
1
+ import { FragmentOf } from 'gql.tada';
2
+ export declare const BillingPeriodDescription_PriceListFragment: import("gql.tada").TadaDocumentNode<{
3
+ periodMonths: number | null;
4
+ }, {}, {
5
+ fragment: "BillingPeriodDescription_PriceListFragment";
6
+ on: "PriceList";
7
+ masked: true;
8
+ }>;
9
+ declare const BillingPeriodDescription: ({ priceList: maskedPriceList, }: {
10
+ priceList: FragmentOf<typeof BillingPeriodDescription_PriceListFragment>;
11
+ }) => import("react/jsx-runtime").JSX.Element;
12
+ export default BillingPeriodDescription;
@@ -1,23 +1,30 @@
1
- import Feature from '@/types/Feature';
2
1
  import { FragmentOf } from 'gql.tada';
3
2
  export declare const PriceListCardPriceDescription_PriceListFragment: import("gql.tada").TadaDocumentNode<{
4
3
  plan: {
5
4
  pricingDescription: string | null;
6
5
  } | null;
7
- showPriceAsMonthly: boolean | null;
6
+ charges: {
7
+ [$tada.fragmentRefs]: {
8
+ GetActiveCharges_PriceListChargeFragment: "PriceListCharge";
9
+ } & {
10
+ PricingTooltip_PriceListChargeFragment: "PriceListCharge";
11
+ };
12
+ }[] | null;
13
+ currencyId: string;
8
14
  periodMonths: number | null;
9
15
  [$tada.fragmentRefs]: {
10
- DoesPriceListHaveFlatFeeCharges_PriceListFragment: "PriceList";
16
+ priceDescriptionString_PriceListFragment: "PriceList";
11
17
  } & {
12
- HasMultipleRecurringCharges_PriceListFragment: "PriceList";
18
+ BillingPeriodDescription_PriceListFragment: "PriceList";
19
+ } & {
20
+ PriceListHasPriceTiers_PriceListFragment: "PriceList";
13
21
  };
14
22
  }, {}, {
15
23
  fragment: "PriceListCardPriceDescription_PriceListFragment";
16
24
  on: "PriceList";
17
25
  masked: true;
18
26
  }>;
19
- declare const PriceListCardPriceDescription: ({ feature, priceList: maskedPriceList, }: {
20
- feature?: Feature;
27
+ declare const PriceListCardPriceDescription: ({ priceList: maskedPriceList, }: {
21
28
  priceList: FragmentOf<typeof PriceListCardPriceDescription_PriceListFragment>;
22
29
  }) => import("react/jsx-runtime").JSX.Element | null;
23
30
  export default PriceListCardPriceDescription;
@@ -26,5 +26,5 @@ declare const PriceListCard: ({ hideButton, isSelected, priceList: maskedPriceLi
26
26
  noBorder?: boolean;
27
27
  onClickPriceListCard?: (priceList: DeprecatedPriceList) => void;
28
28
  disableCurrentPlan?: boolean;
29
- }) => import("react/jsx-runtime").JSX.Element | null;
29
+ }) => import("react/jsx-runtime").JSX.Element;
30
30
  export default PriceListCard;
@@ -1,4 +1,5 @@
1
- declare const PriceListCardDescription: ({ description }: {
1
+ declare const PriceListCardDescription: ({ description, className }: {
2
2
  description?: string;
3
- }) => import("react/jsx-runtime").JSX.Element;
3
+ className?: string;
4
+ }) => import("react/jsx-runtime").JSX.Element | null;
4
5
  export default PriceListCardDescription;
@@ -1,10 +1,6 @@
1
1
  import PriceList from '@/types/PriceList';
2
- import { PriceListCharge } from '@/types/PriceListCharge';
3
2
  import Subscription from '@/types/Subscription';
4
3
  export declare const createPlanDescription: (planDescription: string) => string;
5
- export declare const getActivePlanPriceData: (priceList?: PriceList, selectedPriceList?: PriceList) => {
6
- activeCharge: PriceListCharge | undefined;
7
- } | undefined;
8
4
  export declare const isPriceListDisabled: ({ priceList, upgradingSubscription, }: {
9
5
  priceList?: PriceList;
10
6
  upgradingSubscription: Subscription | undefined;
@@ -9,6 +9,9 @@ export declare const PriceListSelectorUpgradingSubscription_SubscriptionFragment
9
9
  addon: boolean | null;
10
10
  } | null;
11
11
  } | null;
12
+ [$tada.fragmentRefs]: {
13
+ createAvailableBillingPeriods_SubscriptionFragment: "Subscription";
14
+ };
12
15
  }, {}, {
13
16
  fragment: "PriceListSelectorUpgradingSubscription_SubscriptionFragment";
14
17
  on: "Subscription";
@@ -1,10 +1,16 @@
1
- declare const UpgradeWrapper: ({ onChangePlanCancel, handlePortalErrors, upgradingSubscriptionId, isInPreviewMode, productId, className, shadow, }: {
2
- onChangePlanCancel: () => void;
1
+ declare const UpgradeWrapper: ({ onChangePlanCancel, handlePortalErrors, onPaymentMethodSaved, onPaymentMethodRemoved, upgradingSubscriptionId, isInPreviewMode, productId, className, shadow, defaultBillingPeriod, }: {
2
+ onChangePlanCancel?: () => void;
3
3
  handlePortalErrors?: (error: any) => void;
4
+ onPaymentMethodSaved?: (paymentMethodId: string) => void;
5
+ onPaymentMethodRemoved?: (paymentMethodId: string) => void;
4
6
  upgradingSubscriptionId?: string;
5
- isInPreviewMode: boolean;
6
- productId: string | undefined;
7
+ isInPreviewMode?: boolean;
8
+ productId?: string | undefined;
7
9
  className?: string;
8
10
  shadow?: "none" | "sm" | "md" | "lg";
11
+ /**
12
+ * If provided and the billing period is available, the billing period selector will default to this value.
13
+ */
14
+ defaultBillingPeriod?: "ONCE" | "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "ANNUAL";
9
15
  }) => import("react/jsx-runtime").JSX.Element | null;
10
16
  export default UpgradeWrapper;
@@ -0,0 +1,4 @@
1
+ export declare const DefaultBillingPeriodProvider: ({ value, children }: {
2
+ value: "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "ANNUAL" | "ONCE" | undefined;
3
+ children?: import("react").ReactNode;
4
+ }) => import("react/jsx-runtime").JSX.Element, useDefaultBillingPeriod: () => "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "ANNUAL" | "ONCE" | undefined;