@bunnyapp/components 1.6.0-beta.14 → 1.6.0-beta.15.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 (191) hide show
  1. package/README.md +42 -0
  2. package/dist/cjs/index.js +6859 -6187
  3. package/dist/cjs/types/src/components/BunnyProvider.d.ts +0 -2
  4. package/dist/cjs/types/src/components/Checkout/Checkout.d.ts +1 -1
  5. package/dist/cjs/types/src/components/Checkout/QuoteCheckout.d.ts +4 -4
  6. package/dist/cjs/types/src/components/Quote/Quote.d.ts +5 -1
  7. package/dist/cjs/types/src/components/QuoteProvider/fragments/quoteFieldsFragment.d.ts +65 -0
  8. package/dist/cjs/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +16 -112
  9. package/dist/cjs/types/src/components/QuoteProvider/hooks/useFeatureQuantities.d.ts +12 -0
  10. package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuoteQuantities.d.ts +0 -5
  11. package/dist/cjs/types/src/components/QuoteProvider/mutations/quoteChangeUpdate.d.ts +16 -0
  12. package/dist/cjs/types/src/components/QuoteProvider/utils/getQuantityFromQuoteChange.d.ts +11 -0
  13. package/dist/cjs/types/src/components/QuoteProvider/utils/quoteChangeCanBeEdited.d.ts +4 -0
  14. package/dist/cjs/types/src/components/Subscriptions/Subscriptions.d.ts +1 -5
  15. package/dist/cjs/types/src/components/Subscriptions/SubscriptionsListContainer.d.ts +0 -4
  16. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/PlanPicker.d.ts +1 -2
  17. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/PriceListGrid.d.ts +1 -1
  18. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutPrice.d.ts +1 -1
  19. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +19 -0
  20. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/BillingPeriodSelector.d.ts +3 -3
  21. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PriceListGridDesktop.d.ts +2 -2
  22. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/FeatureAddonRow.d.ts +33 -0
  23. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/FeatureAddons.d.ts +12 -3
  24. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/FeatureAddonsList.d.ts +26 -4
  25. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/planManagerUtils.d.ts +5 -2
  26. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/PriceListCardDesktop.d.ts +41 -4
  27. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/addonPlans/AddonPlans.d.ts +10 -0
  28. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/addonPlans/components/AddonPlanModal.d.ts +19 -0
  29. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/addonPlans/components/AddonPlanRow.d.ts +24 -0
  30. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/addonPlans/fragments/AddonPlans_PlanFragment.d.ts +18 -0
  31. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/addonPlans/queries/getAddonPlans.d.ts +13 -0
  32. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerMobile/PriceListCardMobile.d.ts +19 -2
  33. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/PriceListCardPriceDescription.d.ts +20 -3
  34. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/utils/hasMultipleRecurringCharges.d.ts +12 -2
  35. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCard.d.ts +21 -4
  36. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCardButton.d.ts +16 -3
  37. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCardFeature.d.ts +1 -1
  38. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCardPrice.d.ts +12 -3
  39. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCardTitle.d.ts +2 -3
  40. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/priceListCardUtils.d.ts +1 -1
  41. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PreviewModeAdvisary.d.ts +1 -1
  42. package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/QuantityChangeGridRow.d.ts +1 -5
  43. package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/QuantityDrawer.d.ts +1 -4
  44. package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/QuoteChangeSummarySection.d.ts +11 -6
  45. package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/context/quoteIdContext.d.ts +5 -0
  46. package/dist/{esm/types/src/components/Subscriptions/quantityChangeDrawer/fragments/QuantityDrawerQuoteFragment.d.ts → cjs/types/src/components/Subscriptions/quantityChangeDrawer/fragments/QuantityDrawer_QuoteFragment.d.ts} +4 -0
  47. package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/hooks/useQuoteQueryData.d.ts +3 -3
  48. package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/hooks/useSetQuoteQueryData.d.ts +2 -2
  49. package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/quantityChangeDrawerDesktop/QuantityChangeDrawerDesktop.d.ts +1 -6
  50. package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/{QuantityInput.d.ts → quantityInput/QuantityInput.d.ts} +2 -9
  51. package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/quantityInput/fragments/QuantityInput_QuoteFragment.d.ts +27 -0
  52. package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/utils/utils.d.ts +3 -2
  53. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionChargeTotal.d.ts +3 -3
  54. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/components/SubscriptionCardActions.d.ts +21 -0
  55. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/queries/getPriceListChangeOptions.d.ts +9 -0
  56. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/utils/filterSubscriptionCharges.d.ts +2 -0
  57. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/utils/sortSubscriptionCharges.d.ts +2 -0
  58. package/dist/cjs/types/src/components/Transactions/Transactions.d.ts +1 -1
  59. package/dist/cjs/types/src/components/priceListPricing/PricingTooltip.d.ts +18 -16
  60. package/dist/cjs/types/src/components/priceListPricing/utils/hasPriceTiers.d.ts +12 -8
  61. package/dist/cjs/types/src/components/priceListPricing/utils/priceListChargeUtil.ts/chargeHasPriceTiers.d.ts +12 -0
  62. package/dist/cjs/types/src/contexts/BrandContext.d.ts +11 -2
  63. package/dist/cjs/types/src/graphql/queries/getBranding.d.ts +7 -2
  64. package/dist/cjs/types/src/graphql/queries/getPriceListChangeOptions.d.ts +4 -4
  65. package/dist/cjs/types/src/hooks/quotes/useSendAcceptQuote.d.ts +2 -1
  66. package/dist/cjs/types/src/hooks/useAllErrorFormats.d.ts +1 -0
  67. package/dist/cjs/types/src/hooks/useCreateQueryClient.d.ts +2 -0
  68. package/dist/cjs/types/src/hooks/useToggleAddonQuoteChange.d.ts +1 -1
  69. package/dist/cjs/types/src/types/SubscriptionCharge.d.ts +39 -0
  70. package/dist/cjs/types/src/utils/QueryKeyFactory.d.ts +95 -0
  71. package/dist/cjs/types/src/utils/addonPlanUtils/addonPlanUtils.d.ts +5 -0
  72. package/dist/cjs/types/src/utils/addonPlanUtils/getAddonsForBillingPeriod.d.ts +8 -0
  73. package/dist/cjs/types/src/utils/addonPlanUtils/hasUnpurchasedAddonPricelists.d.ts +15 -0
  74. package/dist/cjs/types/src/utils/chargeUtils.d.ts +5 -2
  75. package/dist/cjs/types/src/utils/createStateContext.d.ts +11 -0
  76. package/dist/cjs/types/src/utils/createValueContext.d.ts +14 -0
  77. package/dist/{esm/types/src/utils → cjs/types/src/utils/featureAddonUtils}/featureAddonUtils.d.ts +2 -3
  78. package/dist/cjs/types/src/utils/featureAddonUtils/isAddonPurchased.d.ts +24 -0
  79. package/dist/cjs/types/src/utils/priceListUtils/doesPriceListHaveFlatFeeCharges.d.ts +11 -6
  80. package/dist/cjs/types/src/utils/priceListUtils/getPrice.d.ts +11 -5
  81. package/dist/cjs/types/src/utils/priceListUtils/priceDescription.d.ts +3 -3
  82. package/dist/cjs/types/src/utils/priceListUtils/priceListPriceText.d.ts +17 -10
  83. package/dist/cjs/types/src/utils/pricePickerUtils.d.ts +2 -2
  84. package/dist/esm/index.js +7890 -7218
  85. package/dist/esm/types/src/components/BunnyProvider.d.ts +0 -2
  86. package/dist/esm/types/src/components/Checkout/Checkout.d.ts +1 -1
  87. package/dist/esm/types/src/components/Checkout/QuoteCheckout.d.ts +4 -4
  88. package/dist/esm/types/src/components/Quote/Quote.d.ts +5 -1
  89. package/dist/esm/types/src/components/QuoteProvider/fragments/quoteFieldsFragment.d.ts +65 -0
  90. package/dist/esm/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +16 -112
  91. package/dist/esm/types/src/components/QuoteProvider/hooks/useFeatureQuantities.d.ts +12 -0
  92. package/dist/esm/types/src/components/QuoteProvider/hooks/useQuoteQuantities.d.ts +0 -5
  93. package/dist/esm/types/src/components/QuoteProvider/mutations/quoteChangeUpdate.d.ts +16 -0
  94. package/dist/esm/types/src/components/QuoteProvider/utils/getQuantityFromQuoteChange.d.ts +11 -0
  95. package/dist/esm/types/src/components/QuoteProvider/utils/quoteChangeCanBeEdited.d.ts +4 -0
  96. package/dist/esm/types/src/components/Subscriptions/Subscriptions.d.ts +1 -5
  97. package/dist/esm/types/src/components/Subscriptions/SubscriptionsListContainer.d.ts +0 -4
  98. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/PlanPicker.d.ts +1 -2
  99. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/PriceListGrid.d.ts +1 -1
  100. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutPrice.d.ts +1 -1
  101. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +19 -0
  102. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/BillingPeriodSelector.d.ts +3 -3
  103. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PriceListGridDesktop.d.ts +2 -2
  104. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/FeatureAddonRow.d.ts +33 -0
  105. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/FeatureAddons.d.ts +12 -3
  106. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/FeatureAddonsList.d.ts +26 -4
  107. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/planManagerUtils.d.ts +5 -2
  108. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/PriceListCardDesktop.d.ts +41 -4
  109. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/addonPlans/AddonPlans.d.ts +10 -0
  110. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/addonPlans/components/AddonPlanModal.d.ts +19 -0
  111. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/addonPlans/components/AddonPlanRow.d.ts +24 -0
  112. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/addonPlans/fragments/AddonPlans_PlanFragment.d.ts +18 -0
  113. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/addonPlans/queries/getAddonPlans.d.ts +13 -0
  114. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerMobile/PriceListCardMobile.d.ts +19 -2
  115. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/PriceListCardPriceDescription.d.ts +20 -3
  116. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/utils/hasMultipleRecurringCharges.d.ts +12 -2
  117. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCard.d.ts +21 -4
  118. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCardButton.d.ts +16 -3
  119. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCardFeature.d.ts +1 -1
  120. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCardPrice.d.ts +12 -3
  121. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCardTitle.d.ts +2 -3
  122. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/priceListCardUtils.d.ts +1 -1
  123. package/dist/esm/types/src/components/Subscriptions/Upgrade/PreviewModeAdvisary.d.ts +1 -1
  124. package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/QuantityChangeGridRow.d.ts +1 -5
  125. package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/QuantityDrawer.d.ts +1 -4
  126. package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/QuoteChangeSummarySection.d.ts +11 -6
  127. package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/context/quoteIdContext.d.ts +5 -0
  128. package/dist/{cjs/types/src/components/Subscriptions/quantityChangeDrawer/fragments/QuantityDrawerQuoteFragment.d.ts → esm/types/src/components/Subscriptions/quantityChangeDrawer/fragments/QuantityDrawer_QuoteFragment.d.ts} +4 -0
  129. package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/hooks/useQuoteQueryData.d.ts +3 -3
  130. package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/hooks/useSetQuoteQueryData.d.ts +2 -2
  131. package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/quantityChangeDrawerDesktop/QuantityChangeDrawerDesktop.d.ts +1 -6
  132. package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/{QuantityInput.d.ts → quantityInput/QuantityInput.d.ts} +2 -9
  133. package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/quantityInput/fragments/QuantityInput_QuoteFragment.d.ts +27 -0
  134. package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/utils/utils.d.ts +3 -2
  135. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/SubscriptionChargeTotal.d.ts +3 -3
  136. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/components/SubscriptionCardActions.d.ts +21 -0
  137. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/queries/getPriceListChangeOptions.d.ts +9 -0
  138. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/utils/filterSubscriptionCharges.d.ts +2 -0
  139. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/utils/sortSubscriptionCharges.d.ts +2 -0
  140. package/dist/esm/types/src/components/Transactions/Transactions.d.ts +1 -1
  141. package/dist/esm/types/src/components/priceListPricing/PricingTooltip.d.ts +18 -16
  142. package/dist/esm/types/src/components/priceListPricing/utils/hasPriceTiers.d.ts +12 -8
  143. package/dist/esm/types/src/components/priceListPricing/utils/priceListChargeUtil.ts/chargeHasPriceTiers.d.ts +12 -0
  144. package/dist/esm/types/src/contexts/BrandContext.d.ts +11 -2
  145. package/dist/esm/types/src/graphql/queries/getBranding.d.ts +7 -2
  146. package/dist/esm/types/src/graphql/queries/getPriceListChangeOptions.d.ts +4 -4
  147. package/dist/esm/types/src/hooks/quotes/useSendAcceptQuote.d.ts +2 -1
  148. package/dist/esm/types/src/hooks/useAllErrorFormats.d.ts +1 -0
  149. package/dist/esm/types/src/hooks/useCreateQueryClient.d.ts +2 -0
  150. package/dist/esm/types/src/hooks/useToggleAddonQuoteChange.d.ts +1 -1
  151. package/dist/esm/types/src/types/SubscriptionCharge.d.ts +39 -0
  152. package/dist/esm/types/src/utils/QueryKeyFactory.d.ts +95 -0
  153. package/dist/esm/types/src/utils/addonPlanUtils/addonPlanUtils.d.ts +5 -0
  154. package/dist/esm/types/src/utils/addonPlanUtils/getAddonsForBillingPeriod.d.ts +8 -0
  155. package/dist/esm/types/src/utils/addonPlanUtils/hasUnpurchasedAddonPricelists.d.ts +15 -0
  156. package/dist/esm/types/src/utils/chargeUtils.d.ts +5 -2
  157. package/dist/esm/types/src/utils/createStateContext.d.ts +11 -0
  158. package/dist/esm/types/src/utils/createValueContext.d.ts +14 -0
  159. package/dist/{cjs/types/src/utils → esm/types/src/utils/featureAddonUtils}/featureAddonUtils.d.ts +2 -3
  160. package/dist/esm/types/src/utils/featureAddonUtils/isAddonPurchased.d.ts +24 -0
  161. package/dist/esm/types/src/utils/priceListUtils/doesPriceListHaveFlatFeeCharges.d.ts +11 -6
  162. package/dist/esm/types/src/utils/priceListUtils/getPrice.d.ts +11 -5
  163. package/dist/esm/types/src/utils/priceListUtils/priceDescription.d.ts +3 -3
  164. package/dist/esm/types/src/utils/priceListUtils/priceListPriceText.d.ts +17 -10
  165. package/dist/esm/types/src/utils/pricePickerUtils.d.ts +2 -2
  166. package/dist/index.d.ts +4 -1
  167. package/package.json +1 -1
  168. package/dist/cjs/types/src/components/QuoteProvider/mutations/quoteChargeUpdate.d.ts +0 -23
  169. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanAddonsCard.d.ts +0 -11
  170. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionCardActions.d.ts +0 -9
  171. package/dist/cjs/types/src/graphql/queries/getAddonPlans.d.ts +0 -37
  172. package/dist/cjs/types/src/graphql/queries/getFeatureUsage.d.ts +0 -7
  173. package/dist/cjs/types/src/hooks/usePriceListChangeOptions.d.ts +0 -9
  174. package/dist/cjs/types/src/utils/GraphQLClient.d.ts +0 -2
  175. package/dist/cjs/types/src/utils/addonPlanUtils.d.ts +0 -8
  176. package/dist/esm/types/src/components/QuoteProvider/mutations/quoteChargeUpdate.d.ts +0 -23
  177. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanAddonsCard.d.ts +0 -11
  178. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/SubscriptionCardActions.d.ts +0 -9
  179. package/dist/esm/types/src/graphql/queries/getAddonPlans.d.ts +0 -37
  180. package/dist/esm/types/src/graphql/queries/getFeatureUsage.d.ts +0 -7
  181. package/dist/esm/types/src/hooks/usePriceListChangeOptions.d.ts +0 -9
  182. package/dist/esm/types/src/utils/GraphQLClient.d.ts +0 -2
  183. package/dist/esm/types/src/utils/addonPlanUtils.d.ts +0 -8
  184. /package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/{queries → mutations}/quoteChargeCreate.d.ts +0 -0
  185. /package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/{queries → mutations}/quoteChargeUpdate.d.ts +0 -0
  186. /package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/{queries → mutations}/quoteSubscriptionUpdate.d.ts +0 -0
  187. /package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/{SubscriptionCardHeader.d.ts → subscriptionCardHeader/SubscriptionCardHeader.d.ts} +0 -0
  188. /package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/{queries → mutations}/quoteChargeCreate.d.ts +0 -0
  189. /package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/{queries → mutations}/quoteChargeUpdate.d.ts +0 -0
  190. /package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/{queries → mutations}/quoteSubscriptionUpdate.d.ts +0 -0
  191. /package/dist/esm/types/src/components/Subscriptions/subscriptionsList/{SubscriptionCardHeader.d.ts → subscriptionCardHeader/SubscriptionCardHeader.d.ts} +0 -0
@@ -1,6 +1,11 @@
1
- import { EntityBranding } from '@bunnyapp/common';
2
1
  declare const getBranding: ({ token, apiHost }: {
3
2
  token?: string;
4
3
  apiHost: string;
5
- }) => Promise<EntityBranding>;
4
+ }) => Promise<{
5
+ entityBranding: {
6
+ accentColor: string | null;
7
+ brandColor: string | null;
8
+ topNavImageUrl: string;
9
+ };
10
+ }>;
6
11
  export default getBranding;
@@ -1,9 +1,9 @@
1
- import { PriceListChangeOptions, Subscription } from '@bunnyapp/common';
2
- declare const getPriceListChangeOptions: ({ apiHost, isInPreviewMode, productId, token, upgradingSubscription, }: {
1
+ import { PriceListChangeOptions } from '@bunnyapp/common';
2
+ declare const getPriceListChangeOptions: ({ apiHost, isInPreviewMode, token, subscriptionId, productId, }: {
3
3
  apiHost: string;
4
4
  isInPreviewMode?: boolean;
5
- productId?: string;
6
5
  token?: string;
7
- upgradingSubscription?: Subscription;
6
+ subscriptionId?: string;
7
+ productId?: string;
8
8
  }) => Promise<PriceListChangeOptions>;
9
9
  export default getPriceListChangeOptions;
@@ -1,7 +1,8 @@
1
- declare const useSendAcceptQuote: ({ quoteId, apiHost, token, }: {
1
+ declare const useSendAcceptQuote: ({ quoteId, apiHost, token, onQuoteAccepted, }: {
2
2
  quoteId?: string;
3
3
  apiHost: string;
4
4
  token?: string;
5
+ onQuoteAccepted?: () => void;
5
6
  }) => {
6
7
  acceptBoxVisible: boolean;
7
8
  isAccepting: boolean;
@@ -0,0 +1 @@
1
+ export declare const useAllErrorFormats: () => (error: any, mutationName?: string) => any;
@@ -0,0 +1,2 @@
1
+ import { QueryClient } from '@tanstack/react-query';
2
+ export declare const useCreateQueryClient: () => () => QueryClient;
@@ -1,5 +1,5 @@
1
1
  import { PriceList, Quote } from '@bunnyapp/common';
2
- export declare const useToggleAddonPlan: (quote: Quote | undefined, addonPriceList: PriceList, selectedPriceList: PriceList, setIsAddonPlanLoading: React.Dispatch<React.SetStateAction<boolean>>) => {
2
+ export declare const useToggleAddonPlan: (quote: Quote | undefined, addonPriceListId: string, selectedPriceList: PriceList, setIsAddonPlanLoading: React.Dispatch<React.SetStateAction<boolean>>) => {
3
3
  isPending: boolean;
4
4
  addedQuoteChange: boolean;
5
5
  deleteQuoteChange: () => void;
@@ -0,0 +1,39 @@
1
+ import { Account, BillingPeriod, ChargeType, Currency, Feature, FeatureUsage, PriceList, PriceListCharge, PriceTier, PricingModel, QuoteChangeKind } from '@bunnyapp/common';
2
+ export type SubscriptionCharge = {
3
+ account: Account;
4
+ amount: number;
5
+ billingPeriod: BillingPeriod;
6
+ chargeType: ChargeType;
7
+ createdAt: string;
8
+ currency: Currency;
9
+ discount?: number;
10
+ discountedPrice: string;
11
+ endDate: string;
12
+ expired: boolean;
13
+ feature?: Feature;
14
+ id: string;
15
+ invoiceLineText: string;
16
+ isAmendment: boolean;
17
+ isRamp?: boolean;
18
+ kind: QuoteChangeKind;
19
+ name: string;
20
+ periodPrice: number;
21
+ price: string;
22
+ priceDecimals: number;
23
+ priceList: PriceList;
24
+ priceListCharge?: PriceListCharge;
25
+ priceListChargeId: string;
26
+ priceListId: string;
27
+ priceTiers: PriceTier[];
28
+ pricingModel: PricingModel;
29
+ prorationRate?: number;
30
+ quantity: number;
31
+ quantityMax?: number;
32
+ quantityMin?: number;
33
+ selfServiceQuantity?: boolean;
34
+ startDate: string;
35
+ tieredAveragePrice?: number;
36
+ trial: boolean;
37
+ updatedAt: string;
38
+ histogram?: FeatureUsage;
39
+ };
@@ -0,0 +1,95 @@
1
+ export declare const CHILD_SEARCH_CACHE_KEY = "childSearch";
2
+ export declare const SEARCH_CACHE_KEY = "search";
3
+ interface AccountPaymentMethodKeyParams {
4
+ accountId?: string;
5
+ entityId?: string;
6
+ token?: string;
7
+ }
8
+ interface BillingDetailsKeyParams {
9
+ entityId?: string;
10
+ token?: string;
11
+ }
12
+ interface CalculatedPricesKeyParams {
13
+ priceListId?: string;
14
+ quantity?: number;
15
+ token?: string;
16
+ }
17
+ interface EventsKeyParams {
18
+ entityId: string;
19
+ pluralType: string;
20
+ token?: string;
21
+ }
22
+ interface ObjectKeyParams {
23
+ id?: string;
24
+ objectName: string;
25
+ token?: string;
26
+ }
27
+ interface TableKeyParams {
28
+ filterString?: string;
29
+ pluralType: string;
30
+ token?: string;
31
+ }
32
+ interface FormattedInvoiceKeyParams {
33
+ id?: string;
34
+ token?: string;
35
+ }
36
+ interface InvoiceKeyParams {
37
+ id?: string;
38
+ token?: string;
39
+ }
40
+ interface PlanChangeOptionsKeyParams {
41
+ subscriptionId?: string | null;
42
+ productId?: string | null;
43
+ token?: string;
44
+ }
45
+ interface PortalPreviewDataKeyParams {
46
+ productId?: string | null;
47
+ token?: string;
48
+ }
49
+ interface QuoteKeyParams {
50
+ id?: string;
51
+ token?: string;
52
+ }
53
+ interface QuoteTaxCalculateKeyParams {
54
+ id?: string;
55
+ token?: string;
56
+ }
57
+ interface TaxationRequiredAccountFieldsKeyParams {
58
+ entityId?: string;
59
+ token?: string;
60
+ }
61
+ interface TransactionsKeyParams {
62
+ filter?: string;
63
+ token?: string;
64
+ }
65
+ declare const QueryKeyFactory: {
66
+ accountPaymentMethodsKey: ({ accountId, entityId, token }: AccountPaymentMethodKeyParams) => string[];
67
+ billingDetailsKey: ({ entityId, token }: BillingDetailsKeyParams) => string[];
68
+ brandingKey: (token?: string) => string[];
69
+ calculatedPricesKey: ({ priceListId, quantity, token }: CalculatedPricesKeyParams) => (string | number)[];
70
+ createEventsKey: ({ entityId, pluralType, token }: EventsKeyParams) => string[];
71
+ createFormattedInvoiceKey: ({ id, token }: FormattedInvoiceKeyParams) => (string | undefined)[];
72
+ createInvoiceKey: ({ id, token }: InvoiceKeyParams) => (string | undefined)[];
73
+ createObjectKey: ({ id, objectName, token }: ObjectKeyParams) => string[];
74
+ createQuoteKey: ({ id, token }: QuoteKeyParams) => (string | undefined)[];
75
+ createQuoteTaxCalculateKey: ({ id, token }: QuoteTaxCalculateKeyParams) => string[];
76
+ createTableKey: ({ filterString, pluralType, token }: TableKeyParams) => (string | undefined)[];
77
+ currentUserKey: (token?: string) => string[];
78
+ editingQuoteKey: (token?: string) => string[];
79
+ finixAchKey: (token?: string) => string[];
80
+ finixKey: (token?: string) => string[];
81
+ planChangeOptionsKey: ({ subscriptionId, productId, token }: PlanChangeOptionsKeyParams) => string[];
82
+ pluginsKey: (token?: string) => string[];
83
+ portalPreviewDataKey: ({ productId, token }: PortalPreviewDataKeyParams) => string[];
84
+ taxationRequiredAccountFieldsKey: ({ entityId, token, }: TaxationRequiredAccountFieldsKeyParams) => string[];
85
+ transactionsKey: ({ filter, token }: TransactionsKeyParams) => string[];
86
+ availableAddonPlansKey: ({ priceListId, token, }: {
87
+ priceListId: string | undefined;
88
+ token?: string;
89
+ }) => (string | undefined)[];
90
+ addonPlansKey: ({ priceListId, token }: {
91
+ priceListId: string;
92
+ token?: string;
93
+ }) => string[];
94
+ };
95
+ export default QueryKeyFactory;
@@ -0,0 +1,5 @@
1
+ import { Subscription } from '@bunnyapp/common';
2
+ export declare const ADDON_INDENTATION = 64;
3
+ export declare function findNonAddonSubscriptions(subscriptions: Subscription[]): Subscription[];
4
+ export declare function findAddonSubscriptions(parentSubscription: Subscription, subscriptions: Subscription[]): Subscription[];
5
+ export declare function addonPlanSwitchTestId(planName: string): string;
@@ -0,0 +1,8 @@
1
+ import { BillingPeriod } from '@/graphql-codegen/exportedScalarTypes';
2
+ type PriceListFragment = {
3
+ periodMonths: number | null | undefined;
4
+ };
5
+ export declare function getAddonsForBillingPeriod<TPlan extends {
6
+ priceLists: readonly (PriceListFragment & Record<string, any>)[];
7
+ }>(billingPeriod: BillingPeriod, addonPlans: TPlan[]): TPlan['priceLists'][number][];
8
+ export {};
@@ -0,0 +1,15 @@
1
+ import { BillingPeriod } from '@/graphql-codegen/exportedScalarTypes';
2
+ import { Subscription } from '@bunnyapp/common';
3
+ import { FragmentOf } from 'gql.tada';
4
+ export declare const hasUnpurchasedAddonPriceLists_PlanFragment: import("gql.tada").TadaDocumentNode<{
5
+ priceLists: {
6
+ id: string;
7
+ isVisible: boolean | null;
8
+ periodMonths: number | null;
9
+ }[];
10
+ }, {}, {
11
+ fragment: "hasUnpurchasedAddonPriceLists_PlanFragment";
12
+ on: "Plan";
13
+ masked: true;
14
+ }>;
15
+ export declare function hasUnpurchasedAddonPriceLists(maskedPriceListAddonPlans: FragmentOf<typeof hasUnpurchasedAddonPriceLists_PlanFragment>[], currentSubscription: Subscription | undefined, billingPeriod: BillingPeriod): boolean;
@@ -1,2 +1,5 @@
1
- import { PriceListCharge } from '@bunnyapp/common';
2
- export declare function canEditChargeQuantity(charge: PriceListCharge): boolean;
1
+ import { ChargeType, PricingModel } from '@/graphql-codegen/exportedScalarTypes';
2
+ export declare function canEditChargeQuantity(charge: {
3
+ chargeType: ChargeType | null;
4
+ pricingModel: PricingModel | null;
5
+ } | null): boolean;
@@ -0,0 +1,11 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * Creates a context and provider for a state value
4
+ * @param useValue - A function that returns the state value
5
+ * @returns A tuple containing the provider and the context value
6
+ * @example take a look at how this is used in the quoteIdContext in the QuantityDrawer
7
+ */
8
+ export declare const createStateContext: <Value, State>(useValue: (init?: Value) => State) => readonly [({ initialValue, children, }: {
9
+ initialValue?: Value;
10
+ children?: ReactNode;
11
+ }) => import("react/jsx-runtime").JSX.Element, () => State & ({} | undefined)];
@@ -0,0 +1,14 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * Creates a context and provider for a value
4
+ * Unlike createStateContext, this accepts a value prop directly that can be updated
5
+ * @returns A tuple containing the provider and the context hook
6
+ * @example
7
+ * const [ValueProvider, useValue] = createValueContext<string>();
8
+ * // Usage: ValueProvider with value prop that updates when changed
9
+ * // In a child component: const value = useValue();
10
+ */
11
+ export declare const createValueContext: <Value>() => readonly [({ value, children }: {
12
+ value: Value;
13
+ children?: ReactNode;
14
+ }) => import("react/jsx-runtime").JSX.Element, () => Value & ({} | undefined)];
@@ -1,5 +1,4 @@
1
- import { PriceList, PriceListCharge, Quote, Subscription } from '@bunnyapp/common';
2
- export declare function isAddonPurchased(featureAddon: PriceListCharge, currentSubscription: Subscription | undefined): boolean;
1
+ import { PriceList, Quote, Subscription } from '@bunnyapp/common';
3
2
  export declare function hasUnpurchasedFeatureAddons(priceList: PriceList, currentSubscription: Subscription | undefined): boolean;
4
3
  export declare function findQuoteChangeForFeatureAddon(quote: Quote): import("@bunnyapp/common").QuoteChange | undefined;
5
4
  export declare function featureAddonInQuote(selectedPriceList: {
@@ -18,4 +17,4 @@ export declare function featureAddonInQuote(selectedPriceList: {
18
17
  }[];
19
18
  }[] | null;
20
19
  } | null): boolean;
21
- export declare function featureAddonSwitchTestId(featureAddon: PriceListCharge): string;
20
+ export declare function featureAddonSwitchTestId(addonName: string): string;
@@ -0,0 +1,24 @@
1
+ import { FragmentOf } from 'gql.tada';
2
+ export declare const isAddonPurchased_PriceListChargeFragment: import("gql.tada").TadaDocumentNode<{
3
+ id: string;
4
+ featureAddon: boolean | null;
5
+ }, {}, {
6
+ fragment: "isAddonPurchased_PriceListChargeFragment";
7
+ on: "PriceListCharge";
8
+ masked: true;
9
+ }>;
10
+ export declare const isAddonPurchased_SubscriptionChargeFragment: import("gql.tada").TadaDocumentNode<{
11
+ id: string;
12
+ charges: {
13
+ id: string | null;
14
+ priceListCharge: {
15
+ id: string;
16
+ featureAddon: boolean | null;
17
+ } | null;
18
+ }[] | null;
19
+ }, {}, {
20
+ fragment: "isAddonPurchased_SubscriptionChargeFragment";
21
+ on: "Subscription";
22
+ masked: true;
23
+ }>;
24
+ export declare function isAddonPurchased(maskedFeatureAddon: FragmentOf<typeof isAddonPurchased_PriceListChargeFragment>, maskedCurrentSubscription: FragmentOf<typeof isAddonPurchased_SubscriptionChargeFragment>): boolean;
@@ -1,7 +1,12 @@
1
- import { PricingModel } from '@/graphql-codegen/exportedScalarTypes';
2
- export declare function doesPriceListHaveFlatFeeCharges(priceList: {
1
+ import { FragmentOf } from 'gql.tada';
2
+ export declare const DoesPriceListHaveFlatFeeCharges_PriceListFragment: import("gql.tada").TadaDocumentNode<{
3
3
  charges: {
4
- pricingModel?: PricingModel;
5
- basePrice?: number;
6
- }[];
7
- }): boolean;
4
+ pricingModel: "FLAT" | "TIERED" | "VOLUME" | "BANDS" | null;
5
+ basePrice: number;
6
+ }[] | null;
7
+ }, {}, {
8
+ fragment: "DoesPriceListHaveFlatFeeCharges_PriceListFragment";
9
+ on: "PriceList";
10
+ masked: true;
11
+ }>;
12
+ export declare function doesPriceListHaveFlatFeeCharges(maskedPriceList: FragmentOf<typeof DoesPriceListHaveFlatFeeCharges_PriceListFragment>): boolean;
@@ -1,5 +1,11 @@
1
- export declare const getPrice: (priceList: {
2
- showPriceAsMonthly?: boolean;
3
- monthlyBasePrice?: number;
4
- basePrice?: number;
5
- }) => number | undefined;
1
+ import { FragmentOf } from 'gql.tada';
2
+ export declare const GetPrice_PriceListFragment: import("gql.tada").TadaDocumentNode<{
3
+ showPriceAsMonthly: boolean | null;
4
+ monthlyBasePrice: number | null;
5
+ basePrice: number | null;
6
+ }, {}, {
7
+ fragment: "GetPrice_PriceListFragment";
8
+ on: "PriceList";
9
+ masked: true;
10
+ }>;
11
+ export declare function getPrice(maskedPriceList: FragmentOf<typeof GetPrice_PriceListFragment>): number | null;
@@ -1,6 +1,6 @@
1
1
  export declare function priceDescriptionString({ unitName, showPriceAsMonthly, periodMonths, priceListHasFlatFeeCharges, }: {
2
- unitName?: string;
3
- showPriceAsMonthly?: boolean;
4
- periodMonths?: number;
2
+ unitName?: string | null;
3
+ showPriceAsMonthly: boolean | null;
4
+ periodMonths: number | null;
5
5
  priceListHasFlatFeeCharges: boolean;
6
6
  }): string;
@@ -1,12 +1,19 @@
1
- import { PlanPricingStyles } from '@/graphql-codegen/exportedScalarTypes';
2
- export declare function priceListPriceText({ priceList, }: {
3
- priceList: {
4
- plan: {
5
- pricingStyle?: PlanPricingStyles;
6
- };
7
- currencyId?: string;
8
- showPriceAsMonthly?: boolean;
9
- monthlyBasePrice?: number;
10
- basePrice?: number;
1
+ import { FragmentOf } from 'gql.tada';
2
+ export declare const PriceListPriceText_PriceListFragment: import("gql.tada").TadaDocumentNode<{
3
+ id: string;
4
+ plan: {
5
+ id: string;
6
+ pricingStyle: "PRICED" | "FREE" | "CONTACT_US";
7
+ } | null;
8
+ currencyId: string;
9
+ [$tada.fragmentRefs]: {
10
+ GetPrice_PriceListFragment: "PriceList";
11
11
  };
12
+ }, {}, {
13
+ fragment: "PriceListPriceText_PriceListFragment";
14
+ on: "PriceList";
15
+ masked: true;
16
+ }>;
17
+ export declare function priceListPriceText({ priceList: maskedPriceList, }: {
18
+ priceList: FragmentOf<typeof PriceListPriceText_PriceListFragment>;
12
19
  }): string | number;
@@ -1,5 +1,5 @@
1
1
  import { Plan, Product } from '@bunnyapp/common';
2
2
  import { BillingPeriod } from '@/graphql-codegen/exportedScalarTypes';
3
- export declare const periodMonthsConverter: (period?: number) => "ONCE" | "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "ANNUAL";
4
- export declare const billingPeriodConverter: (period?: BillingPeriod) => 1 | 0 | 3 | 6 | 12;
3
+ export declare const periodMonthsConverter: (period: number | null) => "ONCE" | "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "ANNUAL" | null;
4
+ export declare const billingPeriodConverter: (period?: BillingPeriod) => 0 | 1 | 3 | 6 | 12;
5
5
  export declare const createAvailableBillingPeriods: (plans?: Plan[], selectedProduct?: Product) => (0 | 1 | 3 | 6 | 12)[] | undefined;