@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bunnyapp/components",
3
- "version": "1.8.0-beta.9",
3
+ "version": "1.8.1",
4
4
  "description": "Components from the Bunny portal to embed Bunny UI functionality into your application.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -1,10 +0,0 @@
1
- export type DemoPayCardDetails = {
2
- number: string;
3
- expiry: string;
4
- cvc: string;
5
- };
6
- declare const DemoPayFormProvider: ({ initialValue, children, }: {
7
- initialValue?: DemoPayCardDetails | undefined;
8
- children?: import("react").ReactNode;
9
- }) => import("react/jsx-runtime").JSX.Element, useDemoPayCardDetails: () => [DemoPayCardDetails, import("react").Dispatch<import("react").SetStateAction<DemoPayCardDetails>>];
10
- export { DemoPayFormProvider, useDemoPayCardDetails };
@@ -1,5 +0,0 @@
1
- export declare function StripeFormProvider({ children, currencyId, accountId, }: {
2
- children: React.ReactNode;
3
- currencyId: string;
4
- accountId?: string;
5
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- type Props = {
2
- className?: string;
3
- disabled?: boolean;
4
- };
5
- export declare function CheckoutNoPayment(props?: Props): import("react/jsx-runtime").JSX.Element;
6
- export {};
@@ -1,5 +0,0 @@
1
- type PayProps = {
2
- disabled?: boolean;
3
- };
4
- export declare function Pay(props?: PayProps): import("react/jsx-runtime").JSX.Element;
5
- export {};
@@ -1,12 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { Cancel } from './components/Cancel';
3
- import { Save } from './components/Save';
4
- type PaymentMethodDetailsProps = {
5
- footer?: ReactNode;
6
- };
7
- declare function PaymentMethodDetailsRoot(props?: PaymentMethodDetailsProps): import("react/jsx-runtime").JSX.Element;
8
- export declare const PaymentMethodDetails: typeof PaymentMethodDetailsRoot & {
9
- Cancel: typeof Cancel;
10
- Save: typeof Save;
11
- };
12
- export {};
@@ -1 +0,0 @@
1
- export declare function Cancel(): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare function Save(): import("react/jsx-runtime").JSX.Element;
@@ -1,18 +0,0 @@
1
- export declare const StoredPaymentMethods_PaymentMethodsFragment: import("gql.tada").TadaDocumentNode<{
2
- [$tada.fragmentRefs]: {
3
- MiniCreditCard_PaymentMethodFragment: "PaymentMethod";
4
- };
5
- id: string;
6
- plugin: {
7
- id: string;
8
- } | null;
9
- }, {}, {
10
- fragment: "StoredPaymentMethods_PaymentMethodsFragment";
11
- on: "PaymentMethod";
12
- masked: true;
13
- }>;
14
- type StoredPaymentMethodsProps = {
15
- className?: string;
16
- };
17
- export declare function StoredPaymentMethods(props?: StoredPaymentMethodsProps): import("react/jsx-runtime").JSX.Element;
18
- export {};
@@ -1,5 +0,0 @@
1
- declare const AccountIdProvider: ({ value, children }: {
2
- value: string | undefined;
3
- children?: import("react").ReactNode;
4
- }) => import("react/jsx-runtime").JSX.Element, useAccountId: () => string | undefined;
5
- export { AccountIdProvider, useAccountId };
@@ -1,14 +0,0 @@
1
- import { PaymentMethodFragment } from './PaymentMethodFormVisibilityContext';
2
- export type PaymentCallbacksContextValue = {
3
- onPaymentSuccess: ((response: any) => void) | undefined;
4
- onSetDefaultPaymentMethod: (() => void) | undefined;
5
- onPaymentMethodRemoved: ((paymentMethod: PaymentMethodFragment) => void) | undefined;
6
- onSavePaymentMethod: ((response: any) => void) | undefined;
7
- onPaymentHoldSuccess: ((response: any) => void) | undefined;
8
- paymentHoldPrecondition: (() => boolean | Promise<boolean>) | undefined;
9
- };
10
- declare const PaymentFormCallbacksProvider: ({ value, children }: {
11
- value: PaymentCallbacksContextValue;
12
- children?: import("react").ReactNode;
13
- }) => import("react/jsx-runtime").JSX.Element, usePaymentFormCallbacks: () => PaymentCallbacksContextValue;
14
- export { PaymentFormCallbacksProvider, usePaymentFormCallbacks };
@@ -1,12 +0,0 @@
1
- import { ResultOf } from 'gql.tada';
2
- import { PaymentForm_PaymentMethodsFragment } from '../fragments/PaymentForm_PaymentMethodsFragment';
3
- export type PaymentMethodFragment = ResultOf<typeof PaymentForm_PaymentMethodsFragment>;
4
- export type PaymentMethodFormVisibilityContextValue = {
5
- showPaymentMethodForm: boolean;
6
- setShowPaymentMethodForm: (show: boolean) => void;
7
- };
8
- declare const PaymentMethodFormVisibilityProvider: ({ value, children }: {
9
- value: PaymentMethodFormVisibilityContextValue;
10
- children?: import("react").ReactNode;
11
- }) => import("react/jsx-runtime").JSX.Element, usePaymentMethodFormVisibility: () => PaymentMethodFormVisibilityContextValue;
12
- export { PaymentMethodFormVisibilityProvider, usePaymentMethodFormVisibility };
@@ -1,14 +0,0 @@
1
- import { PluginData } from '@/types/frontendTypes';
2
- type UsePayArgs = {
3
- plugin: PluginData | undefined;
4
- quoteId?: string | null;
5
- invoiceId?: string | null;
6
- onPaymentSuccess?: (response: any) => void;
7
- onPaymentError?: (error: any) => void;
8
- };
9
- type UsePayResult = {
10
- pay: (paymentMethodId: string) => Promise<void>;
11
- isPaying: boolean;
12
- };
13
- export declare function usePay({ plugin, quoteId, invoiceId, onPaymentSuccess, onPaymentError, }: UsePayArgs): UsePayResult;
14
- export default usePay;
@@ -1,18 +0,0 @@
1
- import { PluginData } from '@/types/frontendTypes';
2
- type UsePaymentHoldArgs = {
3
- plugin: PluginData | undefined;
4
- onPaymentHoldSuccess?: (response: any) => void;
5
- onPaymentHoldError?: (error: any) => void;
6
- };
7
- type UsePaymentHoldResult = {
8
- approveHold: (args: {
9
- quote: {
10
- id: string;
11
- amount: number;
12
- };
13
- paymentMethodId: string;
14
- }) => Promise<void>;
15
- isApprovingHold: boolean;
16
- };
17
- export declare function usePaymentHold({ plugin, onPaymentHoldSuccess, onPaymentHoldError, }: UsePaymentHoldArgs): UsePaymentHoldResult;
18
- export default usePaymentHold;
@@ -1,16 +0,0 @@
1
- type SaveHookArgs = {
2
- accountId: string | undefined;
3
- onSaveSuccess?: (response: any) => void;
4
- onSaveError?: (error: any) => void;
5
- /**
6
- * When true, invalidates the account payment methods query after a successful save.
7
- * Defaults to true.
8
- */
9
- invalidatePaymentMethodsQuery?: boolean;
10
- };
11
- type SaveHookResult = {
12
- save: () => Promise<string | undefined>;
13
- isSaving: boolean;
14
- };
15
- export declare function useSave({ accountId, onSaveSuccess, onSaveError, invalidatePaymentMethodsQuery, }: SaveHookArgs): SaveHookResult;
16
- export default useSave;
@@ -1,18 +0,0 @@
1
- import { FragmentOf } from 'gql.tada';
2
- export declare const PaymentHoldDisplay_PaymentHoldFragment: import("gql.tada").TadaDocumentNode<{
3
- expiresAt: unknown;
4
- paymentMethod: {
5
- metadata: {
6
- identifier: string | null;
7
- } | null;
8
- } | null;
9
- }, {}, {
10
- fragment: "PaymentHoldDisplay_PaymentHoldFragment";
11
- on: "PaymentHold";
12
- masked: true;
13
- }>;
14
- export declare function PaymentHoldDisplay({ paymentHold: maskedPaymentHold, currency, amount, }: {
15
- paymentHold: FragmentOf<typeof PaymentHoldDisplay_PaymentHoldFragment>;
16
- currency: string | null;
17
- amount: number;
18
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,20 +0,0 @@
1
- import { FragmentOf } from 'gql.tada';
2
- export declare const useQuotePaymentHold_FormattedQuoteFragment: import("gql.tada").TadaDocumentNode<{
3
- quote: {
4
- payToAccept: boolean | null;
5
- currentPaymentHold: {
6
- id: string | null;
7
- } | null;
8
- };
9
- }, {}, {
10
- fragment: "useQuotePaymentHold_FormattedQuoteFragment";
11
- on: "FormattedQuote";
12
- masked: true;
13
- }>;
14
- declare const useQuotePaymentHold: (maskedFormattedQuote?: FragmentOf<typeof useQuotePaymentHold_FormattedQuoteFragment>) => {
15
- paymentHoldModalVisible: boolean;
16
- setPaymentHoldModalVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
17
- shouldDoPaymentHold: boolean;
18
- paymentHoldCompleted: boolean;
19
- };
20
- export default useQuotePaymentHold;
@@ -1,14 +0,0 @@
1
- type QuoteAcceptProps = {
2
- apiHost: string;
3
- changedFormItems: {
4
- [key: string]: string;
5
- };
6
- quoteId?: string;
7
- token?: string;
8
- };
9
- declare const quoteAccept: ({ quoteId, apiHost, token, changedFormItems }: QuoteAcceptProps) => Promise<{
10
- quoteAccept: {
11
- errors: string | null;
12
- } | null;
13
- }>;
14
- export default quoteAccept;
@@ -1,16 +0,0 @@
1
- export declare const useQuantityEditableCharges_PriceListChargeFragment: import("gql.tada").TadaDocumentNode<{
2
- deprecated: boolean | null;
3
- id: string;
4
- featureAddon: boolean | null;
5
- [$tada.fragmentRefs]: {
6
- CanEditChargeQuantity_PriceListChargeFragment: "PriceListCharge";
7
- } & {
8
- PlanPickerCheckoutBar_PriceListChargeFragment: "PriceListCharge";
9
- } & {
10
- useQuoteQuantities_PriceListChargeFragment: "PriceListCharge";
11
- };
12
- }, {}, {
13
- fragment: "useQuantityEditableCharges_PriceListChargeFragment";
14
- on: "PriceListCharge";
15
- masked: false;
16
- }>;
@@ -1,26 +0,0 @@
1
- export declare const useQuantityEditableCharges_QuoteFragment: import("gql.tada").TadaDocumentNode<{
2
- quoteChanges: {
3
- kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
4
- charges: {
5
- priceListCharge: {
6
- deprecated: boolean | null;
7
- id: string;
8
- featureAddon: boolean | null;
9
- [$tada.fragmentRefs]: {
10
- CanEditChargeQuantity_PriceListChargeFragment: "PriceListCharge";
11
- } & {
12
- PlanPickerCheckoutBar_PriceListChargeFragment: "PriceListCharge";
13
- } & {
14
- useQuoteQuantities_PriceListChargeFragment: "PriceListCharge";
15
- };
16
- } | null;
17
- }[];
18
- [$tada.fragmentRefs]: {
19
- useSelectedPriceListQuoteChange_QuoteChangeFragment: "QuoteChange";
20
- };
21
- }[] | null;
22
- }, {}, {
23
- fragment: "useQuantityEditableCharges_QuoteFragment";
24
- on: "Quote";
25
- masked: true;
26
- }>;
@@ -1,13 +0,0 @@
1
- export declare const useQuoteQuantities_PriceListChargeFragment: import("gql.tada").TadaDocumentNode<{
2
- feature: {
3
- id: string;
4
- } | null;
5
- id: string;
6
- quantityMax: number | null;
7
- quantityMin: number | null;
8
- selfServiceQuantity: boolean | null;
9
- }, {}, {
10
- fragment: "useQuoteQuantities_PriceListChargeFragment";
11
- on: "PriceListCharge";
12
- masked: true;
13
- }>;
@@ -1,14 +0,0 @@
1
- import { ResultOf } from 'gql.tada';
2
- declare const sortQuoteChangeCharges_QuoteChargeFragment: import("gql.tada").TadaDocumentNode<{
3
- kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
4
- }, {}, {
5
- fragment: "sortQuoteChangeCharges_QuoteChargeFragment";
6
- on: "QuoteCharge";
7
- masked: true;
8
- }>;
9
- /**
10
- * Sorts quote change charges so that coupon charges appear at the end of the list.
11
- * Uses a generic type so the full charge shape is preserved.
12
- */
13
- export declare function sortQuoteChangeCharges<T extends ResultOf<typeof sortQuoteChangeCharges_QuoteChargeFragment>>(charges: T[]): T[];
14
- export {};
@@ -1,21 +0,0 @@
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;
@@ -1,13 +0,0 @@
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
- }>;
@@ -1,22 +0,0 @@
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
- }>;
@@ -1,14 +0,0 @@
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
- }>;
@@ -1,10 +0,0 @@
1
- export type DemoPayCardDetails = {
2
- number: string;
3
- expiry: string;
4
- cvc: string;
5
- };
6
- declare const DemoPayFormProvider: ({ initialValue, children, }: {
7
- initialValue?: DemoPayCardDetails | undefined;
8
- children?: import("react").ReactNode;
9
- }) => import("react/jsx-runtime").JSX.Element, useDemoPayCardDetails: () => [DemoPayCardDetails, import("react").Dispatch<import("react").SetStateAction<DemoPayCardDetails>>];
10
- export { DemoPayFormProvider, useDemoPayCardDetails };
@@ -1,5 +0,0 @@
1
- export declare function StripeFormProvider({ children, currencyId, accountId, }: {
2
- children: React.ReactNode;
3
- currencyId: string;
4
- accountId?: string;
5
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- type Props = {
2
- className?: string;
3
- disabled?: boolean;
4
- };
5
- export declare function CheckoutNoPayment(props?: Props): import("react/jsx-runtime").JSX.Element;
6
- export {};
@@ -1,5 +0,0 @@
1
- type PayProps = {
2
- disabled?: boolean;
3
- };
4
- export declare function Pay(props?: PayProps): import("react/jsx-runtime").JSX.Element;
5
- export {};
@@ -1,12 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { Cancel } from './components/Cancel';
3
- import { Save } from './components/Save';
4
- type PaymentMethodDetailsProps = {
5
- footer?: ReactNode;
6
- };
7
- declare function PaymentMethodDetailsRoot(props?: PaymentMethodDetailsProps): import("react/jsx-runtime").JSX.Element;
8
- export declare const PaymentMethodDetails: typeof PaymentMethodDetailsRoot & {
9
- Cancel: typeof Cancel;
10
- Save: typeof Save;
11
- };
12
- export {};
@@ -1 +0,0 @@
1
- export declare function Cancel(): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare function Save(): import("react/jsx-runtime").JSX.Element;
@@ -1,18 +0,0 @@
1
- export declare const StoredPaymentMethods_PaymentMethodsFragment: import("gql.tada").TadaDocumentNode<{
2
- [$tada.fragmentRefs]: {
3
- MiniCreditCard_PaymentMethodFragment: "PaymentMethod";
4
- };
5
- id: string;
6
- plugin: {
7
- id: string;
8
- } | null;
9
- }, {}, {
10
- fragment: "StoredPaymentMethods_PaymentMethodsFragment";
11
- on: "PaymentMethod";
12
- masked: true;
13
- }>;
14
- type StoredPaymentMethodsProps = {
15
- className?: string;
16
- };
17
- export declare function StoredPaymentMethods(props?: StoredPaymentMethodsProps): import("react/jsx-runtime").JSX.Element;
18
- export {};
@@ -1,5 +0,0 @@
1
- declare const AccountIdProvider: ({ value, children }: {
2
- value: string | undefined;
3
- children?: import("react").ReactNode;
4
- }) => import("react/jsx-runtime").JSX.Element, useAccountId: () => string | undefined;
5
- export { AccountIdProvider, useAccountId };
@@ -1,14 +0,0 @@
1
- import { PaymentMethodFragment } from './PaymentMethodFormVisibilityContext';
2
- export type PaymentCallbacksContextValue = {
3
- onPaymentSuccess: ((response: any) => void) | undefined;
4
- onSetDefaultPaymentMethod: (() => void) | undefined;
5
- onPaymentMethodRemoved: ((paymentMethod: PaymentMethodFragment) => void) | undefined;
6
- onSavePaymentMethod: ((response: any) => void) | undefined;
7
- onPaymentHoldSuccess: ((response: any) => void) | undefined;
8
- paymentHoldPrecondition: (() => boolean | Promise<boolean>) | undefined;
9
- };
10
- declare const PaymentFormCallbacksProvider: ({ value, children }: {
11
- value: PaymentCallbacksContextValue;
12
- children?: import("react").ReactNode;
13
- }) => import("react/jsx-runtime").JSX.Element, usePaymentFormCallbacks: () => PaymentCallbacksContextValue;
14
- export { PaymentFormCallbacksProvider, usePaymentFormCallbacks };
@@ -1,12 +0,0 @@
1
- import { ResultOf } from 'gql.tada';
2
- import { PaymentForm_PaymentMethodsFragment } from '../fragments/PaymentForm_PaymentMethodsFragment';
3
- export type PaymentMethodFragment = ResultOf<typeof PaymentForm_PaymentMethodsFragment>;
4
- export type PaymentMethodFormVisibilityContextValue = {
5
- showPaymentMethodForm: boolean;
6
- setShowPaymentMethodForm: (show: boolean) => void;
7
- };
8
- declare const PaymentMethodFormVisibilityProvider: ({ value, children }: {
9
- value: PaymentMethodFormVisibilityContextValue;
10
- children?: import("react").ReactNode;
11
- }) => import("react/jsx-runtime").JSX.Element, usePaymentMethodFormVisibility: () => PaymentMethodFormVisibilityContextValue;
12
- export { PaymentMethodFormVisibilityProvider, usePaymentMethodFormVisibility };
@@ -1,14 +0,0 @@
1
- import { PluginData } from '@/types/frontendTypes';
2
- type UsePayArgs = {
3
- plugin: PluginData | undefined;
4
- quoteId?: string | null;
5
- invoiceId?: string | null;
6
- onPaymentSuccess?: (response: any) => void;
7
- onPaymentError?: (error: any) => void;
8
- };
9
- type UsePayResult = {
10
- pay: (paymentMethodId: string) => Promise<void>;
11
- isPaying: boolean;
12
- };
13
- export declare function usePay({ plugin, quoteId, invoiceId, onPaymentSuccess, onPaymentError, }: UsePayArgs): UsePayResult;
14
- export default usePay;
@@ -1,18 +0,0 @@
1
- import { PluginData } from '@/types/frontendTypes';
2
- type UsePaymentHoldArgs = {
3
- plugin: PluginData | undefined;
4
- onPaymentHoldSuccess?: (response: any) => void;
5
- onPaymentHoldError?: (error: any) => void;
6
- };
7
- type UsePaymentHoldResult = {
8
- approveHold: (args: {
9
- quote: {
10
- id: string;
11
- amount: number;
12
- };
13
- paymentMethodId: string;
14
- }) => Promise<void>;
15
- isApprovingHold: boolean;
16
- };
17
- export declare function usePaymentHold({ plugin, onPaymentHoldSuccess, onPaymentHoldError, }: UsePaymentHoldArgs): UsePaymentHoldResult;
18
- export default usePaymentHold;
@@ -1,16 +0,0 @@
1
- type SaveHookArgs = {
2
- accountId: string | undefined;
3
- onSaveSuccess?: (response: any) => void;
4
- onSaveError?: (error: any) => void;
5
- /**
6
- * When true, invalidates the account payment methods query after a successful save.
7
- * Defaults to true.
8
- */
9
- invalidatePaymentMethodsQuery?: boolean;
10
- };
11
- type SaveHookResult = {
12
- save: () => Promise<string | undefined>;
13
- isSaving: boolean;
14
- };
15
- export declare function useSave({ accountId, onSaveSuccess, onSaveError, invalidatePaymentMethodsQuery, }: SaveHookArgs): SaveHookResult;
16
- export default useSave;
@@ -1,18 +0,0 @@
1
- import { FragmentOf } from 'gql.tada';
2
- export declare const PaymentHoldDisplay_PaymentHoldFragment: import("gql.tada").TadaDocumentNode<{
3
- expiresAt: unknown;
4
- paymentMethod: {
5
- metadata: {
6
- identifier: string | null;
7
- } | null;
8
- } | null;
9
- }, {}, {
10
- fragment: "PaymentHoldDisplay_PaymentHoldFragment";
11
- on: "PaymentHold";
12
- masked: true;
13
- }>;
14
- export declare function PaymentHoldDisplay({ paymentHold: maskedPaymentHold, currency, amount, }: {
15
- paymentHold: FragmentOf<typeof PaymentHoldDisplay_PaymentHoldFragment>;
16
- currency: string | null;
17
- amount: number;
18
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,20 +0,0 @@
1
- import { FragmentOf } from 'gql.tada';
2
- export declare const useQuotePaymentHold_FormattedQuoteFragment: import("gql.tada").TadaDocumentNode<{
3
- quote: {
4
- payToAccept: boolean | null;
5
- currentPaymentHold: {
6
- id: string | null;
7
- } | null;
8
- };
9
- }, {}, {
10
- fragment: "useQuotePaymentHold_FormattedQuoteFragment";
11
- on: "FormattedQuote";
12
- masked: true;
13
- }>;
14
- declare const useQuotePaymentHold: (maskedFormattedQuote?: FragmentOf<typeof useQuotePaymentHold_FormattedQuoteFragment>) => {
15
- paymentHoldModalVisible: boolean;
16
- setPaymentHoldModalVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
17
- shouldDoPaymentHold: boolean;
18
- paymentHoldCompleted: boolean;
19
- };
20
- export default useQuotePaymentHold;
@@ -1,14 +0,0 @@
1
- type QuoteAcceptProps = {
2
- apiHost: string;
3
- changedFormItems: {
4
- [key: string]: string;
5
- };
6
- quoteId?: string;
7
- token?: string;
8
- };
9
- declare const quoteAccept: ({ quoteId, apiHost, token, changedFormItems }: QuoteAcceptProps) => Promise<{
10
- quoteAccept: {
11
- errors: string | null;
12
- } | null;
13
- }>;
14
- export default quoteAccept;
@@ -1,16 +0,0 @@
1
- export declare const useQuantityEditableCharges_PriceListChargeFragment: import("gql.tada").TadaDocumentNode<{
2
- deprecated: boolean | null;
3
- id: string;
4
- featureAddon: boolean | null;
5
- [$tada.fragmentRefs]: {
6
- CanEditChargeQuantity_PriceListChargeFragment: "PriceListCharge";
7
- } & {
8
- PlanPickerCheckoutBar_PriceListChargeFragment: "PriceListCharge";
9
- } & {
10
- useQuoteQuantities_PriceListChargeFragment: "PriceListCharge";
11
- };
12
- }, {}, {
13
- fragment: "useQuantityEditableCharges_PriceListChargeFragment";
14
- on: "PriceListCharge";
15
- masked: false;
16
- }>;