@bunnyapp/components 1.8.0-beta.19 → 1.8.0-beta.20

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 (162) hide show
  1. package/dist/cjs/index.js +1999 -1377
  2. package/dist/cjs/types/src/components/DocumentTemplatePreview.d.ts +5 -1
  3. package/dist/cjs/types/src/components/Invoice/InvoiceQuoteView/DownloadQuoteButton.d.ts +5 -0
  4. package/dist/cjs/types/src/components/Invoice/InvoiceQuoteView/InvoiceQuoteView.d.ts +8 -0
  5. package/dist/cjs/types/src/components/Invoice/InvoiceQuoteView/InvoiceQuoteViewWithButtons.d.ts +14 -0
  6. package/dist/cjs/types/src/components/PaymentForm/PaymentForm.d.ts +4 -14
  7. package/dist/cjs/types/src/components/PaymentForm/Stripe/StripeFormProvider.d.ts +1 -2
  8. package/dist/cjs/types/src/components/PaymentForm/Stripe/stripeUtils.d.ts +1 -1
  9. package/dist/cjs/types/src/components/PaymentForm/components/CheckoutNoPayment.d.ts +5 -0
  10. package/dist/cjs/types/src/components/PaymentForm/components/Pay.d.ts +1 -0
  11. package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Save.d.ts +9 -1
  12. package/dist/cjs/types/src/components/PaymentForm/components/StoredPaymentMethods.d.ts +0 -13
  13. package/dist/cjs/types/src/components/PaymentForm/context/PaymentProvider.d.ts +4 -0
  14. package/dist/cjs/types/src/components/PaymentForm/fragments/PaymentForm_QuoteFragment.d.ts +11 -0
  15. package/dist/cjs/types/src/components/PaymentForm/fragments/StoredPaymentMethods_PaymentMethodsFragment.d.ts +13 -0
  16. package/dist/cjs/types/src/components/PaymentForm/hooks/usePayableCurrency.d.ts +1 -1
  17. package/dist/cjs/types/src/components/Quote/components/QuoteIsAcceptedLabel.d.ts +6 -0
  18. package/dist/cjs/types/src/components/Quote/hooks/useAcceptQuote.d.ts +11 -6
  19. package/dist/cjs/types/src/components/Quote/queries/quoteAccept.d.ts +30 -6
  20. package/dist/cjs/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +0 -2
  21. package/dist/cjs/types/src/components/Signup/Signup.d.ts +25 -18
  22. package/dist/cjs/types/src/components/Signup/SignupContent.d.ts +2 -0
  23. package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/CheckoutSummary.d.ts +5 -46
  24. package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/components/CheckoutSummaryTotals.d.ts +11 -0
  25. package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/fragments/CheckoutSummary_PriceListFragment.d.ts +21 -0
  26. package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/fragments/CheckoutSummary_QuoteFragment.d.ts +32 -0
  27. package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/totalsUtils.d.ts +9 -0
  28. package/dist/cjs/types/src/components/Signup/components/InitialSignupFormFields.d.ts +47 -0
  29. package/dist/cjs/types/src/components/Signup/components/Logo.d.ts +2 -0
  30. package/dist/cjs/types/src/components/Signup/components/PurchaseSuccessDisplay.d.ts +6 -0
  31. package/dist/cjs/types/src/components/Signup/components/QuoteCreateButton.d.ts +9 -0
  32. package/dist/cjs/types/src/components/Signup/components/SignupForm/SignupForm.d.ts +13 -0
  33. package/dist/cjs/types/src/components/Signup/components/SignupForm/components/ExistingAccountForm.d.ts +31 -0
  34. package/dist/cjs/types/src/components/Signup/components/SignupForm/components/ExistingAccountLoadedEffect.d.ts +34 -0
  35. package/dist/cjs/types/src/components/Signup/components/SignupForm/components/NewAccountForm.d.ts +8 -0
  36. package/dist/cjs/types/src/components/Signup/components/SignupForm/fragments/SignupForm_AccountFragment.d.ts +24 -0
  37. package/dist/cjs/types/src/components/Signup/components/SignupForm/hooks/useExistingAccount.d.ts +15 -0
  38. package/dist/cjs/types/src/components/Signup/components/SignupPaymentForm.d.ts +15 -0
  39. package/dist/cjs/types/src/components/Signup/components/SignupSplitScreenContainer.d.ts +6 -0
  40. package/dist/cjs/types/src/components/Signup/components/SuccessDisplay/SuccessDisplay.d.ts +10 -0
  41. package/dist/cjs/types/src/components/Signup/components/SuccessDisplay/components/SignupSuccessDisplay.d.ts +6 -0
  42. package/dist/cjs/types/src/components/Signup/components/SuccessDisplay/components/SuccessIcon.d.ts +2 -0
  43. package/dist/cjs/types/src/components/Signup/components/SuccessDisplay/components/ViewPortalSubscription.d.ts +5 -0
  44. package/dist/cjs/types/src/components/Signup/fragments/QuoteAcceptPage_PriceListFragment.d.ts +9 -0
  45. package/dist/cjs/types/src/components/Signup/fragments/SignupPaymentForm_QuoteFragment.d.ts +13 -0
  46. package/dist/cjs/types/src/components/Signup/fragments/Signup_PriceListFragment.d.ts +9 -2
  47. package/dist/cjs/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +13 -2
  48. package/dist/cjs/types/src/components/Signup/fragments/useApplyDefaultCoupon_QuoteFragment.d.ts +9 -0
  49. package/dist/cjs/types/src/components/Signup/hooks/useAccountDetailsUpdate.d.ts +10 -0
  50. package/dist/cjs/types/src/components/Signup/hooks/useApplyDefaultCoupon.d.ts +1 -9
  51. package/dist/cjs/types/src/components/Signup/hooks/useApplySignupFormDefaults.d.ts +9 -0
  52. package/dist/cjs/types/src/components/Signup/hooks/useQuoteAccountSignupMutation.d.ts +32 -0
  53. package/dist/cjs/types/src/components/Signup/hooks/useQuoteAccountSignupOnExit.d.ts +46 -0
  54. package/dist/cjs/types/src/components/Signup/hooks/useQuoteRecalculateTaxes.d.ts +4 -0
  55. package/dist/cjs/types/src/components/Signup/hooks/useSetSignupQuoteQueryData.d.ts +5 -0
  56. package/dist/cjs/types/src/components/Signup/hooks/useSignupQuoteQueryData.d.ts +5 -0
  57. package/dist/cjs/types/src/components/Signup/mutations/contactUpdate.d.ts +12 -0
  58. package/dist/cjs/types/src/components/Signup/mutations/quoteAccountSignup.d.ts +6 -3
  59. package/dist/cjs/types/src/components/Signup/mutations/quoteChangeUpdate.d.ts +12 -0
  60. package/dist/cjs/types/src/components/Signup/mutations/quoteRecalculateTaxes.d.ts +1 -0
  61. package/dist/cjs/types/src/components/Signup/queries/getAccountByCode.d.ts +8 -0
  62. package/dist/cjs/types/src/components/Signup/queries/getAccountForSignupCompose.d.ts +20 -0
  63. package/dist/cjs/types/src/components/Signup/queries/getCurrentUserAccountForSignup.d.ts +14 -0
  64. package/dist/cjs/types/src/components/Signup/signup-quote/SignupQuote.d.ts +2 -0
  65. package/dist/cjs/types/src/components/Signup/signup-quote/SignupQuoteProvider.d.ts +9 -0
  66. package/dist/cjs/types/src/components/Signup/signup-quote/fragments/SignupQuote_QuoteFragment.d.ts +14 -0
  67. package/dist/cjs/types/src/components/Signup/utils/createPortalReturnUrl.d.ts +4 -0
  68. package/dist/cjs/types/src/graphql/mutations/quoteChangeAddCoupon.d.ts +4 -4
  69. package/dist/cjs/types/src/graphql/mutations/quoteChangeRemoveCoupon.d.ts +5 -2
  70. package/dist/cjs/types/src/hooks/usePaymentPlugins.d.ts +1 -1
  71. package/dist/cjs/types/src/hooks/useUpdateCoupons.d.ts +8 -2
  72. package/dist/cjs/types/src/utils/QueryKeyFactory.d.ts +4 -0
  73. package/dist/esm/index.js +2010 -1388
  74. package/dist/esm/types/src/components/DocumentTemplatePreview.d.ts +5 -1
  75. package/dist/esm/types/src/components/Invoice/InvoiceQuoteView/DownloadQuoteButton.d.ts +5 -0
  76. package/dist/esm/types/src/components/Invoice/InvoiceQuoteView/InvoiceQuoteView.d.ts +8 -0
  77. package/dist/esm/types/src/components/Invoice/InvoiceQuoteView/InvoiceQuoteViewWithButtons.d.ts +14 -0
  78. package/dist/esm/types/src/components/PaymentForm/PaymentForm.d.ts +4 -14
  79. package/dist/esm/types/src/components/PaymentForm/Stripe/StripeFormProvider.d.ts +1 -2
  80. package/dist/esm/types/src/components/PaymentForm/Stripe/stripeUtils.d.ts +1 -1
  81. package/dist/esm/types/src/components/PaymentForm/components/CheckoutNoPayment.d.ts +5 -0
  82. package/dist/esm/types/src/components/PaymentForm/components/Pay.d.ts +1 -0
  83. package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Save.d.ts +9 -1
  84. package/dist/esm/types/src/components/PaymentForm/components/StoredPaymentMethods.d.ts +0 -13
  85. package/dist/esm/types/src/components/PaymentForm/context/PaymentProvider.d.ts +4 -0
  86. package/dist/esm/types/src/components/PaymentForm/fragments/PaymentForm_QuoteFragment.d.ts +11 -0
  87. package/dist/esm/types/src/components/PaymentForm/fragments/StoredPaymentMethods_PaymentMethodsFragment.d.ts +13 -0
  88. package/dist/esm/types/src/components/PaymentForm/hooks/usePayableCurrency.d.ts +1 -1
  89. package/dist/esm/types/src/components/Quote/components/QuoteIsAcceptedLabel.d.ts +6 -0
  90. package/dist/esm/types/src/components/Quote/hooks/useAcceptQuote.d.ts +11 -6
  91. package/dist/esm/types/src/components/Quote/queries/quoteAccept.d.ts +30 -6
  92. package/dist/esm/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +0 -2
  93. package/dist/esm/types/src/components/Signup/Signup.d.ts +25 -18
  94. package/dist/esm/types/src/components/Signup/SignupContent.d.ts +2 -0
  95. package/dist/esm/types/src/components/Signup/components/CheckoutSummary/CheckoutSummary.d.ts +5 -46
  96. package/dist/esm/types/src/components/Signup/components/CheckoutSummary/components/CheckoutSummaryTotals.d.ts +11 -0
  97. package/dist/esm/types/src/components/Signup/components/CheckoutSummary/fragments/CheckoutSummary_PriceListFragment.d.ts +21 -0
  98. package/dist/esm/types/src/components/Signup/components/CheckoutSummary/fragments/CheckoutSummary_QuoteFragment.d.ts +32 -0
  99. package/dist/esm/types/src/components/Signup/components/CheckoutSummary/totalsUtils.d.ts +9 -0
  100. package/dist/esm/types/src/components/Signup/components/InitialSignupFormFields.d.ts +47 -0
  101. package/dist/esm/types/src/components/Signup/components/Logo.d.ts +2 -0
  102. package/dist/esm/types/src/components/Signup/components/PurchaseSuccessDisplay.d.ts +6 -0
  103. package/dist/esm/types/src/components/Signup/components/QuoteCreateButton.d.ts +9 -0
  104. package/dist/esm/types/src/components/Signup/components/SignupForm/SignupForm.d.ts +13 -0
  105. package/dist/esm/types/src/components/Signup/components/SignupForm/components/ExistingAccountForm.d.ts +31 -0
  106. package/dist/esm/types/src/components/Signup/components/SignupForm/components/ExistingAccountLoadedEffect.d.ts +34 -0
  107. package/dist/esm/types/src/components/Signup/components/SignupForm/components/NewAccountForm.d.ts +8 -0
  108. package/dist/esm/types/src/components/Signup/components/SignupForm/fragments/SignupForm_AccountFragment.d.ts +24 -0
  109. package/dist/esm/types/src/components/Signup/components/SignupForm/hooks/useExistingAccount.d.ts +15 -0
  110. package/dist/esm/types/src/components/Signup/components/SignupPaymentForm.d.ts +15 -0
  111. package/dist/esm/types/src/components/Signup/components/SignupSplitScreenContainer.d.ts +6 -0
  112. package/dist/esm/types/src/components/Signup/components/SuccessDisplay/SuccessDisplay.d.ts +10 -0
  113. package/dist/esm/types/src/components/Signup/components/SuccessDisplay/components/SignupSuccessDisplay.d.ts +6 -0
  114. package/dist/esm/types/src/components/Signup/components/SuccessDisplay/components/SuccessIcon.d.ts +2 -0
  115. package/dist/esm/types/src/components/Signup/components/SuccessDisplay/components/ViewPortalSubscription.d.ts +5 -0
  116. package/dist/esm/types/src/components/Signup/fragments/QuoteAcceptPage_PriceListFragment.d.ts +9 -0
  117. package/dist/esm/types/src/components/Signup/fragments/SignupPaymentForm_QuoteFragment.d.ts +13 -0
  118. package/dist/esm/types/src/components/Signup/fragments/Signup_PriceListFragment.d.ts +9 -2
  119. package/dist/esm/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +13 -2
  120. package/dist/esm/types/src/components/Signup/fragments/useApplyDefaultCoupon_QuoteFragment.d.ts +9 -0
  121. package/dist/esm/types/src/components/Signup/hooks/useAccountDetailsUpdate.d.ts +10 -0
  122. package/dist/esm/types/src/components/Signup/hooks/useApplyDefaultCoupon.d.ts +1 -9
  123. package/dist/esm/types/src/components/Signup/hooks/useApplySignupFormDefaults.d.ts +9 -0
  124. package/dist/esm/types/src/components/Signup/hooks/useQuoteAccountSignupMutation.d.ts +32 -0
  125. package/dist/esm/types/src/components/Signup/hooks/useQuoteAccountSignupOnExit.d.ts +46 -0
  126. package/dist/esm/types/src/components/Signup/hooks/useQuoteRecalculateTaxes.d.ts +4 -0
  127. package/dist/esm/types/src/components/Signup/hooks/useSetSignupQuoteQueryData.d.ts +5 -0
  128. package/dist/esm/types/src/components/Signup/hooks/useSignupQuoteQueryData.d.ts +5 -0
  129. package/dist/esm/types/src/components/Signup/mutations/contactUpdate.d.ts +12 -0
  130. package/dist/esm/types/src/components/Signup/mutations/quoteAccountSignup.d.ts +6 -3
  131. package/dist/esm/types/src/components/Signup/mutations/quoteChangeUpdate.d.ts +12 -0
  132. package/dist/esm/types/src/components/Signup/mutations/quoteRecalculateTaxes.d.ts +1 -0
  133. package/dist/esm/types/src/components/Signup/queries/getAccountByCode.d.ts +8 -0
  134. package/dist/esm/types/src/components/Signup/queries/getAccountForSignupCompose.d.ts +20 -0
  135. package/dist/esm/types/src/components/Signup/queries/getCurrentUserAccountForSignup.d.ts +14 -0
  136. package/dist/esm/types/src/components/Signup/signup-quote/SignupQuote.d.ts +2 -0
  137. package/dist/esm/types/src/components/Signup/signup-quote/SignupQuoteProvider.d.ts +9 -0
  138. package/dist/esm/types/src/components/Signup/signup-quote/fragments/SignupQuote_QuoteFragment.d.ts +14 -0
  139. package/dist/esm/types/src/components/Signup/utils/createPortalReturnUrl.d.ts +4 -0
  140. package/dist/esm/types/src/graphql/mutations/quoteChangeAddCoupon.d.ts +4 -4
  141. package/dist/esm/types/src/graphql/mutations/quoteChangeRemoveCoupon.d.ts +5 -2
  142. package/dist/esm/types/src/hooks/usePaymentPlugins.d.ts +1 -1
  143. package/dist/esm/types/src/hooks/useUpdateCoupons.d.ts +8 -2
  144. package/dist/esm/types/src/utils/QueryKeyFactory.d.ts +4 -0
  145. package/dist/index.d.ts +55 -23
  146. package/package.json +3 -3
  147. package/dist/cjs/types/src/components/Invoice/InvoiceQuoteView.d.ts +0 -12
  148. package/dist/cjs/types/src/components/QuoteProvider/utils/getQuantityFromQuoteChange.d.ts +0 -11
  149. package/dist/cjs/types/src/components/Signup/PaymentForms.d.ts +0 -39
  150. package/dist/cjs/types/src/components/Signup/PaymentSuccess.d.ts +0 -8
  151. package/dist/cjs/types/src/components/Signup/mutations/accountSignup.d.ts +0 -58
  152. package/dist/cjs/types/src/components/Signup/queries/getQuote.d.ts +0 -10
  153. package/dist/cjs/types/src/graphql/mutations/quoteCompose.d.ts +0 -12
  154. package/dist/esm/types/src/components/Invoice/InvoiceQuoteView.d.ts +0 -12
  155. package/dist/esm/types/src/components/QuoteProvider/utils/getQuantityFromQuoteChange.d.ts +0 -11
  156. package/dist/esm/types/src/components/Signup/PaymentForms.d.ts +0 -39
  157. package/dist/esm/types/src/components/Signup/PaymentSuccess.d.ts +0 -8
  158. package/dist/esm/types/src/components/Signup/mutations/accountSignup.d.ts +0 -58
  159. package/dist/esm/types/src/components/Signup/queries/getQuote.d.ts +0 -10
  160. package/dist/esm/types/src/graphql/mutations/quoteCompose.d.ts +0 -12
  161. /package/dist/cjs/types/src/components/Signup/{PriceListDisplay.d.ts → components/PriceListDisplay.d.ts} +0 -0
  162. /package/dist/esm/types/src/components/Signup/{PriceListDisplay.d.ts → components/PriceListDisplay.d.ts} +0 -0
@@ -0,0 +1,34 @@
1
+ import { type FragmentOf, type ResultOf } from 'gql.tada';
2
+ import { Signup_PriceListFragment } from '../../../fragments/Signup_PriceListFragment';
3
+ import { Signup_QuoteFragment } from '../../../fragments/Signup_QuoteFragment';
4
+ import { type DefaultSignupValues } from '../../InitialSignupFormFields';
5
+ export declare const ExistingAccountLoadedEffect_AccountFragment: import("gql.tada").TadaDocumentNode<{
6
+ id: string;
7
+ code: string | null;
8
+ name: string | null;
9
+ billingCountry: string | null;
10
+ billingState: string | null;
11
+ billingCity: string | null;
12
+ billingZip: string | null;
13
+ billingStreet: string | null;
14
+ taxNumber: string | null;
15
+ billingContact: {
16
+ firstName: string;
17
+ lastName: string | null;
18
+ email: string | null;
19
+ } | null;
20
+ }, {}, {
21
+ fragment: "ExistingAccountLoadedEffect_AccountFragment";
22
+ on: "Account";
23
+ masked: true;
24
+ }>;
25
+ export default function ExistingAccountLoadedEffect({ account: maskedAccount, defaultFormValues, priceList, onSelfServiceBuyDisabled, priceListCode, paymentRequiredToAcceptQuote, documentTemplateId, onQuoteAccountSignupSuccess, }: {
26
+ account: FragmentOf<typeof ExistingAccountLoadedEffect_AccountFragment> | null | undefined;
27
+ defaultFormValues?: DefaultSignupValues;
28
+ priceList?: ResultOf<typeof Signup_PriceListFragment> | null;
29
+ onSelfServiceBuyDisabled: () => void;
30
+ priceListCode: string;
31
+ paymentRequiredToAcceptQuote?: boolean;
32
+ documentTemplateId?: string;
33
+ onQuoteAccountSignupSuccess: (portalSessionToken: string, accountId: string, quote: FragmentOf<typeof Signup_QuoteFragment> | null) => void;
34
+ }): null;
@@ -0,0 +1,8 @@
1
+ import { ExtraSignupFormField, type DefaultSignupValues, type RequiredBillingDetailsFlags } from '../../InitialSignupFormFields';
2
+ export default function NewAccountForm({ className, extraFieldsToShow, requiredBillingDetails, defaultFormValues, title, }: {
3
+ className?: string;
4
+ extraFieldsToShow?: ExtraSignupFormField[];
5
+ requiredBillingDetails?: RequiredBillingDetailsFlags;
6
+ defaultFormValues?: DefaultSignupValues;
7
+ title: string;
8
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,24 @@
1
+ export declare const SignupForm_AccountFragment: import("gql.tada").TadaDocumentNode<{
2
+ [$tada.fragmentRefs]: {
3
+ ExistingAccountForm_AccountFragment: "Account";
4
+ };
5
+ id: string;
6
+ code: string | null;
7
+ name: string | null;
8
+ billingCountry: string | null;
9
+ billingState: string | null;
10
+ billingCity: string | null;
11
+ billingZip: string | null;
12
+ billingStreet: string | null;
13
+ taxNumber: string | null;
14
+ billingContact: {
15
+ id: string;
16
+ firstName: string;
17
+ lastName: string | null;
18
+ email: string | null;
19
+ } | null;
20
+ }, {}, {
21
+ fragment: "SignupForm_AccountFragment";
22
+ on: "Account";
23
+ masked: true;
24
+ }>;
@@ -0,0 +1,15 @@
1
+ import getCurrentUserAccountForSignup from '@/components/Signup/queries/getCurrentUserAccountForSignup';
2
+ export type ExistingAccountForSignup = Awaited<ReturnType<typeof getCurrentUserAccountForSignup>>['currentUser'] extends {
3
+ account?: infer T;
4
+ } ? T : never;
5
+ export declare function useExistingAccount({ onAccountLoaded, }?: {
6
+ onAccountLoaded?: (account: ExistingAccountForSignup | null | undefined) => void;
7
+ }): {
8
+ account: {
9
+ id: string;
10
+ [$tada.fragmentRefs]: {
11
+ SignupForm_AccountFragment: "Account";
12
+ };
13
+ } | null | undefined;
14
+ isLoading: boolean;
15
+ };
@@ -0,0 +1,15 @@
1
+ import { FragmentOf } from 'gql.tada';
2
+ import { SignupPaymentForm_QuoteFragment } from '../fragments/SignupPaymentForm_QuoteFragment';
3
+ export declare const SignupPaymentForm_PriceListFragment: import("gql.tada").TadaDocumentNode<{
4
+ currencyId: string;
5
+ }, {}, {
6
+ fragment: "SignupPaymentForm_PriceListFragment";
7
+ on: "PriceList";
8
+ masked: true;
9
+ }>;
10
+ type SignupPaymentFormProps = {
11
+ quote?: FragmentOf<typeof SignupPaymentForm_QuoteFragment> | null;
12
+ priceList: FragmentOf<typeof SignupPaymentForm_PriceListFragment> | null | undefined;
13
+ };
14
+ declare const SignupPaymentForm: ({ quote: maskedQuote, priceList: maskedPriceList }: SignupPaymentFormProps) => import("react/jsx-runtime").JSX.Element | null;
15
+ export default SignupPaymentForm;
@@ -0,0 +1,6 @@
1
+ export default function SignupSplitScreenContainer({ left, right, style, className, }: {
2
+ left: React.ReactNode;
3
+ right: React.ReactNode;
4
+ style?: React.CSSProperties;
5
+ className?: string;
6
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { ResultOf } from 'gql.tada';
2
+ import { Signup_QuoteFragment } from '../../fragments/Signup_QuoteFragment';
3
+ type SuccessDisplayProps = {
4
+ quote?: ResultOf<typeof Signup_QuoteFragment> | null;
5
+ currencyId: string | undefined | null;
6
+ returnUrl?: string;
7
+ className?: string;
8
+ };
9
+ declare const SuccessDisplay: ({ quote: maskedQuote, currencyId, returnUrl, className, }: SuccessDisplayProps) => import("react/jsx-runtime").JSX.Element;
10
+ export default SuccessDisplay;
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from 'react';
2
+ export default function SignupSuccessDisplay({ returnUrl, className, children, }: {
3
+ returnUrl?: string;
4
+ className?: string;
5
+ children?: ReactNode;
6
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ declare const SuccessIcon: () => import("react/jsx-runtime").JSX.Element;
2
+ export default SuccessIcon;
@@ -0,0 +1,5 @@
1
+ type ViewPortalSubscriptionProps = {
2
+ returnUrl?: string;
3
+ };
4
+ declare const ViewPortalSubscription: ({ returnUrl }: ViewPortalSubscriptionProps) => import("react/jsx-runtime").JSX.Element | null;
5
+ export default ViewPortalSubscription;
@@ -0,0 +1,9 @@
1
+ export declare const QuoteAcceptPage_PriceListFragment: import("gql.tada").TadaDocumentNode<{
2
+ [$tada.fragmentRefs]: {
3
+ CheckoutSummary_PriceListFragment: "PriceList";
4
+ };
5
+ }, {}, {
6
+ fragment: "QuoteAcceptPage_PriceListFragment";
7
+ on: "PriceList";
8
+ masked: true;
9
+ }>;
@@ -0,0 +1,13 @@
1
+ export declare const SignupPaymentForm_QuoteFragment: import("gql.tada").TadaDocumentNode<{
2
+ [$tada.fragmentRefs]: {
3
+ PaymentForm_QuoteFragment: "Quote";
4
+ };
5
+ payToAccept: boolean | null;
6
+ amountDue: number | null;
7
+ amount: number;
8
+ id: string | null;
9
+ }, {}, {
10
+ fragment: "SignupPaymentForm_QuoteFragment";
11
+ on: "Quote";
12
+ masked: true;
13
+ }>;
@@ -1,14 +1,21 @@
1
1
  export declare const Signup_PriceListFragment: import("gql.tada").TadaDocumentNode<{
2
2
  [$tada.fragmentRefs]: {
3
- CheckoutSummary_PriceListFragment: "PriceList";
3
+ SelfServiceBuyWarning_PriceListFragment: "PriceList";
4
+ } & {
5
+ QuoteAcceptPage_PriceListFragment: "PriceList";
4
6
  } & {
5
7
  PriceListDisplay_PriceListFragment: "PriceList";
6
8
  } & {
7
- SelfServiceBuyWarning_PriceListFragment: "PriceList";
9
+ CheckoutSummary_PriceListFragment: "PriceList";
10
+ } & {
11
+ SignupPaymentForm_PriceListFragment: "PriceList";
8
12
  };
13
+ id: string;
9
14
  plan: {
10
15
  selfServiceBuy: boolean | null;
11
16
  } | null;
17
+ code: string | null;
18
+ currencyId: string;
12
19
  trialAllowed: boolean;
13
20
  }, {}, {
14
21
  fragment: "Signup_PriceListFragment";
@@ -1,17 +1,28 @@
1
1
  export declare const Signup_QuoteFragment: import("gql.tada").TadaDocumentNode<{
2
2
  [$tada.fragmentRefs]: {
3
+ useApplyDefaultCoupon_QuoteFragment: "Quote";
4
+ } & {
3
5
  CheckoutSummary_QuoteFragment: "Quote";
4
6
  } & {
5
- PaymentForms_QuoteFragment: "Quote";
7
+ PaymentForm_QuoteFragment: "Quote";
6
8
  } & {
7
- useApplyDefaultCoupon_QuoteFragment: "Quote";
9
+ SignupPaymentForm_QuoteFragment: "Quote";
10
+ } & {
11
+ SignupQuote_QuoteFragment: "Quote";
8
12
  };
13
+ state: "APPROVED" | "REJECTED" | "DRAFT" | "SHARED" | "VIEWED" | "ACCEPTED" | "IN_APPROVAL" | "UNDONE";
9
14
  id: string | null;
15
+ accountId: string;
10
16
  currencyId: string;
11
17
  amountDue: number | null;
18
+ payToAccept: boolean | null;
12
19
  quoteChanges: {
13
20
  id: string | null;
21
+ isTrial: boolean;
14
22
  }[] | null;
23
+ account: {
24
+ billingContactId: string | null;
25
+ } | null;
15
26
  }, {}, {
16
27
  fragment: "Signup_QuoteFragment";
17
28
  on: "Quote";
@@ -0,0 +1,9 @@
1
+ export declare const useApplyDefaultCoupon_QuoteFragment: import("gql.tada").TadaDocumentNode<{
2
+ [$tada.fragmentRefs]: {
3
+ canApplyCoupons_QuoteFragment: "Quote";
4
+ };
5
+ }, {}, {
6
+ fragment: "useApplyDefaultCoupon_QuoteFragment";
7
+ on: "Quote";
8
+ masked: true;
9
+ }>;
@@ -0,0 +1,10 @@
1
+ import { FormInstance } from 'antd';
2
+ import type { InitialSignupFormData } from '../components/InitialSignupFormFields';
3
+ type UseAccountDetailsUpdateParams = {
4
+ form: FormInstance<InitialSignupFormData>;
5
+ accountId: string | undefined;
6
+ /** Billing contact id from `quote.account.billingContactId` — required to update name/email on the server. */
7
+ billingContactId: string | null | undefined;
8
+ };
9
+ export declare function useAccountDetailsUpdate({ form, accountId, billingContactId, }: UseAccountDetailsUpdateParams): () => Promise<void>;
10
+ export {};
@@ -1,13 +1,5 @@
1
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
- }>;
2
+ import { useApplyDefaultCoupon_QuoteFragment } from '../fragments/useApplyDefaultCoupon_QuoteFragment';
11
3
  /**
12
4
  * Applies a default coupon code once when quoteChangeId is available.
13
5
  * Uses a ref to ensure coupon code is only applied once.
@@ -0,0 +1,9 @@
1
+ import type { FormInstance } from 'antd';
2
+ import type { InitialSignupFormData } from '../components/InitialSignupFormFields';
3
+ type ApplySignupFormDefaultsArgs = {
4
+ defaults: Partial<InitialSignupFormData>;
5
+ fillEmptyOnly?: boolean;
6
+ validateBillingCountry?: boolean;
7
+ };
8
+ export declare function useApplySignupFormDefaults(form: FormInstance<InitialSignupFormData>): ({ defaults, fillEmptyOnly, validateBillingCountry, }: ApplySignupFormDefaultsArgs) => void;
9
+ export {};
@@ -0,0 +1,32 @@
1
+ import { FragmentOf } from 'gql.tada';
2
+ import type { InitialSignupFormData } from '../components/InitialSignupFormFields';
3
+ import { Signup_QuoteFragment } from '../fragments/Signup_QuoteFragment';
4
+ export type UseQuoteAccountSignupMutationOptions = {
5
+ priceListCode: string;
6
+ enableTrial: boolean;
7
+ priceList: {
8
+ trialAllowed?: boolean;
9
+ } | null | undefined;
10
+ paymentRequiredToAcceptQuote?: boolean;
11
+ documentTemplateId?: string;
12
+ onQuoteAccountSignupSuccess: (portalSessionToken: string, accountId: string, quote: FragmentOf<typeof Signup_QuoteFragment> | null) => void;
13
+ };
14
+ export declare function useQuoteAccountSignupMutation({ priceListCode, enableTrial, priceList, paymentRequiredToAcceptQuote, documentTemplateId, onQuoteAccountSignupSuccess, }: UseQuoteAccountSignupMutationOptions): import("@tanstack/react-query").UseMutationResult<{
15
+ account: {
16
+ id: string;
17
+ } | null;
18
+ quote: {
19
+ [$tada.fragmentRefs]: {
20
+ Signup_QuoteFragment: "Quote";
21
+ };
22
+ id: string | null;
23
+ } | null;
24
+ tenant: {
25
+ code: string | null;
26
+ } | null;
27
+ portalSessionToken: string | null;
28
+ errors: string[] | null;
29
+ } | null, Error, {
30
+ formData?: InitialSignupFormData;
31
+ accountCode?: string;
32
+ }, unknown>;
@@ -0,0 +1,46 @@
1
+ import { FormInstance } from 'antd';
2
+ import type { InitialSignupFormData } from '../components/InitialSignupFormFields';
3
+ import { FragmentOf } from 'gql.tada';
4
+ import { Signup_QuoteFragment } from '../fragments/Signup_QuoteFragment';
5
+ type UseQuoteAccountSignupOnExitParams = {
6
+ form: FormInstance<InitialSignupFormData>;
7
+ priceListCode: string;
8
+ enableTrial: boolean;
9
+ priceList: {
10
+ trialAllowed?: boolean;
11
+ plan?: {
12
+ selfServiceBuy?: boolean;
13
+ };
14
+ } | null | undefined;
15
+ paymentRequiredToAcceptQuote?: boolean;
16
+ documentTemplateId?: string | undefined;
17
+ /** When set, account + quote already exist — do not run signup again. */
18
+ quoteAccountId: string | null | undefined;
19
+ onQuoteAccountSignupSuccess: (portalSessionToken: string, accountId: string, quote: FragmentOf<typeof Signup_QuoteFragment> | null) => void;
20
+ handleShowSelfServiceBuyWarning: () => void;
21
+ };
22
+ /** Runs `quoteAccountSignup` when the account form is exited (focus leaves the wrapper) or on page hide / tab switch. */
23
+ export declare function useQuoteAccountSignupOnExit({ form, priceListCode, enableTrial, priceList, paymentRequiredToAcceptQuote, documentTemplateId, quoteAccountId, onQuoteAccountSignupSuccess, handleShowSelfServiceBuyWarning, }: UseQuoteAccountSignupOnExitParams): {
24
+ onSignupFormBlur: () => Promise<void>;
25
+ quoteAccountSignupMutate: import("@tanstack/react-query").UseMutateFunction<{
26
+ account: {
27
+ id: string;
28
+ } | null;
29
+ quote: {
30
+ [$tada.fragmentRefs]: {
31
+ Signup_QuoteFragment: "Quote";
32
+ };
33
+ id: string | null;
34
+ } | null;
35
+ tenant: {
36
+ code: string | null;
37
+ } | null;
38
+ portalSessionToken: string | null;
39
+ errors: string[] | null;
40
+ } | null, Error, {
41
+ formData?: InitialSignupFormData;
42
+ accountCode?: string;
43
+ }, unknown>;
44
+ isSigningUp: boolean;
45
+ };
46
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare const useQuoteRecalculateTaxes: () => {
2
+ recalculateTaxes: (quoteId: string) => void;
3
+ isRecalculatingTaxes: boolean;
4
+ };
@@ -0,0 +1,5 @@
1
+ import { FragmentOf } from 'gql.tada';
2
+ import { Signup_QuoteFragment } from '../fragments/Signup_QuoteFragment';
3
+ export declare const useSetSignupQuoteQueryData: () => {
4
+ setSignupQuoteQueryData: (quote: FragmentOf<typeof Signup_QuoteFragment> | null, token: string) => void;
5
+ };
@@ -0,0 +1,5 @@
1
+ import { ResultOf } from 'gql.tada';
2
+ import { Signup_QuoteFragment } from '../fragments/Signup_QuoteFragment';
3
+ export declare const useSignupQuoteQueryData: ({ tokenOverride, }: {
4
+ tokenOverride?: string;
5
+ }) => ResultOf<typeof Signup_QuoteFragment> | undefined;
@@ -0,0 +1,12 @@
1
+ export declare function signupContactUpdate({ token, apiHost, contactId, attributes, }: {
2
+ token?: string;
3
+ apiHost: string;
4
+ contactId: string;
5
+ attributes: {
6
+ firstName?: string | null;
7
+ lastName?: string | null;
8
+ email?: string | null;
9
+ };
10
+ }): Promise<{
11
+ id: string;
12
+ } | null | undefined>;
@@ -4,14 +4,17 @@ type BillingContact = {
4
4
  lastName: string;
5
5
  email: string;
6
6
  };
7
- declare const quoteAccountSignup: ({ token, apiHost, priceListCode, accountName, billingContact, billingDetails, trial, }: {
7
+ declare const quoteAccountSignup: ({ token, apiHost, priceListCode, accountName, accountCode, billingContact, billingDetails, trial, payToAccept, documentTemplateId, }: {
8
8
  token?: string;
9
9
  apiHost: string;
10
10
  priceListCode: string;
11
- accountName: string;
12
- billingContact: BillingContact;
11
+ accountName?: string;
12
+ accountCode?: string;
13
+ billingContact?: BillingContact;
13
14
  billingDetails?: BillingDetails;
14
15
  trial: boolean;
16
+ payToAccept?: boolean;
17
+ documentTemplateId?: string;
15
18
  }) => Promise<{
16
19
  account: {
17
20
  id: string;
@@ -0,0 +1,12 @@
1
+ export declare const quoteChangeUpdate: ({ apiHost, token, quoteChangeId, trial, }: {
2
+ apiHost: string;
3
+ token?: string;
4
+ quoteChangeId: string;
5
+ trial?: boolean;
6
+ }) => Promise<{
7
+ quote: {
8
+ [$tada.fragmentRefs]: {
9
+ Signup_QuoteFragment: "Quote";
10
+ };
11
+ };
12
+ } | null | undefined>;
@@ -6,5 +6,6 @@ declare const quoteRecalculateTaxes: ({ quoteId, apiHost, token, }: {
6
6
  [$tada.fragmentRefs]: {
7
7
  Signup_QuoteFragment: "Quote";
8
8
  };
9
+ id: string | null;
9
10
  } | null | undefined>;
10
11
  export default quoteRecalculateTaxes;
@@ -0,0 +1,8 @@
1
+ declare const getAccountByCode: ({ token, code, apiHost, }: {
2
+ token?: string;
3
+ code: string;
4
+ apiHost: string;
5
+ }) => Promise<{
6
+ id: string;
7
+ } | null>;
8
+ export default getAccountByCode;
@@ -0,0 +1,20 @@
1
+ declare const getAccountForSignupCompose: ({ token, code, apiHost, }: {
2
+ token?: string;
3
+ code: string;
4
+ apiHost: string;
5
+ }) => Promise<{
6
+ id: string;
7
+ name: string | null;
8
+ billingCountry: string | null;
9
+ billingState: string | null;
10
+ billingCity: string | null;
11
+ billingZip: string | null;
12
+ billingStreet: string | null;
13
+ taxNumber: string | null;
14
+ billingContact: {
15
+ firstName: string;
16
+ lastName: string | null;
17
+ email: string | null;
18
+ } | null;
19
+ } | null>;
20
+ export default getAccountForSignupCompose;
@@ -0,0 +1,14 @@
1
+ declare const getCurrentUserAccountForSignup: ({ token, apiHost, }: {
2
+ token?: string;
3
+ apiHost: string;
4
+ }) => Promise<{
5
+ currentUser: {
6
+ account: {
7
+ id: string;
8
+ [$tada.fragmentRefs]: {
9
+ SignupForm_AccountFragment: "Account";
10
+ };
11
+ } | null;
12
+ };
13
+ }>;
14
+ export default getCurrentUserAccountForSignup;
@@ -0,0 +1,2 @@
1
+ declare const SignupQuote: () => import("react/jsx-runtime").JSX.Element | null;
2
+ export default SignupQuote;
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from 'react';
2
+ declare const useSignupQuote: () => {
3
+ hasSigningPlugins: boolean | undefined;
4
+ onPaymentHoldSuccess: () => void;
5
+ };
6
+ export declare function SignupQuoteProvider({ children, }: {
7
+ children: ReactNode;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ export { useSignupQuote };
@@ -0,0 +1,14 @@
1
+ export declare const SignupQuote_QuoteFragment: import("gql.tada").TadaDocumentNode<{
2
+ id: string | null;
3
+ formattedQuote: {
4
+ html: string | null;
5
+ } | null;
6
+ acceptedAt: unknown;
7
+ acceptedByName: string | null;
8
+ state: "APPROVED" | "REJECTED" | "DRAFT" | "SHARED" | "VIEWED" | "ACCEPTED" | "IN_APPROVAL" | "UNDONE";
9
+ documentTemplateId: string | null;
10
+ }, {}, {
11
+ fragment: "SignupQuote_QuoteFragment";
12
+ on: "Quote";
13
+ masked: true;
14
+ }>;
@@ -0,0 +1,4 @@
1
+ export declare function createPortalReturnUrl({ apiHost, token }: {
2
+ apiHost: string;
3
+ token: string;
4
+ }): string;
@@ -1,8 +1,8 @@
1
- import { Quote } from '@/types/Quote';
2
- declare const quoteChangeAddCoupon: ({ quoteChangeId, couponCode, token, apiHost, }: {
1
+ export declare const quoteChangeAddCoupon: ({ quoteChangeId, couponCode, token, apiHost, }: {
3
2
  quoteChangeId: string;
4
3
  couponCode: string;
5
4
  token?: string;
6
5
  apiHost: string;
7
- }) => Promise<Quote>;
8
- export default quoteChangeAddCoupon;
6
+ }) => Promise<{
7
+ id: string | null;
8
+ } | null | undefined>;
@@ -1,8 +1,11 @@
1
- import { Quote } from '@/types/Quote';
2
1
  declare const quoteChangeRemoveCoupon: ({ quoteChangeId, couponCode, token, apiHost, }: {
3
2
  quoteChangeId: string;
4
3
  couponCode: string;
5
4
  token?: string;
6
5
  apiHost: string;
7
- }) => Promise<Quote>;
6
+ }) => Promise<{
7
+ quote: {
8
+ id: string | null;
9
+ };
10
+ } | null | undefined>;
8
11
  export default quoteChangeRemoveCoupon;
@@ -1,4 +1,4 @@
1
- export declare const usePaymentPlugins: (accountId: string | undefined) => {
1
+ export declare const usePaymentPlugins: () => {
2
2
  paymentPlugins: {
3
3
  enabled: boolean;
4
4
  entities: string[];
@@ -5,8 +5,14 @@ declare const useUpdateCoupons: ({ apiHost, token, quoteChangeId, onCouponAdded,
5
5
  onCouponAdded?: () => void;
6
6
  onCouponRemoved?: () => void;
7
7
  }) => {
8
- addCoupon: import("@tanstack/react-query").UseMutateFunction<import("../types/Quote").Quote, any, string, unknown>;
9
- removeCoupon: import("@tanstack/react-query").UseMutateFunction<import("../types/Quote").Quote, any, string, unknown>;
8
+ addCoupon: import("@tanstack/react-query").UseMutateFunction<{
9
+ id: string | null;
10
+ } | null | undefined, Error, string, unknown>;
11
+ removeCoupon: import("@tanstack/react-query").UseMutateFunction<{
12
+ quote: {
13
+ id: string | null;
14
+ };
15
+ } | null | undefined, Error, string, unknown>;
10
16
  isAddingCoupon: boolean;
11
17
  isRemovingCoupon: boolean;
12
18
  activeCouponsExist: boolean;
@@ -83,6 +83,9 @@ declare const QueryKeyFactory: {
83
83
  createInvoiceKey: ({ id, token }: InvoiceKeyParams) => (string | undefined)[];
84
84
  createObjectKey: ({ id, objectName, token }: ObjectKeyParams) => string[];
85
85
  createQuoteKey: ({ id, token }: QuoteKeyParams) => (string | null | undefined)[];
86
+ signupQuoteKey: ({ token }: {
87
+ token?: string;
88
+ }) => string[];
86
89
  createQuoteTaxCalculateKey: ({ id, token }: QuoteTaxCalculateKeyParams) => string[];
87
90
  createTableKey: ({ filterString, pluralType, token }: TableKeyParams) => (string | undefined)[];
88
91
  currentUserKey: (token?: string) => string[];
@@ -103,5 +106,6 @@ declare const QueryKeyFactory: {
103
106
  token?: string;
104
107
  }) => string[];
105
108
  paymentPluginsKey: (token?: string) => string[];
109
+ accountForSignup: (token?: string) => string[];
106
110
  };
107
111
  export default QueryKeyFactory;