@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.
- package/dist/cjs/index.js +5355 -5441
- package/dist/cjs/types/src/ajax.d.ts +1 -1
- package/dist/cjs/types/src/components/Checkout/QuoteCheckout.d.ts +2 -2
- package/dist/cjs/types/src/components/PandadocPollingModal.d.ts +1 -1
- package/dist/cjs/types/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +4 -2
- package/dist/cjs/types/src/components/PaymentForm/DemoPay/hooks/useSave.d.ts +5 -1
- package/dist/cjs/types/src/components/PaymentForm/PaymentForm.d.ts +9 -40
- package/dist/cjs/types/src/components/PaymentForm/Stripe/hooks/usePay.d.ts +4 -2
- package/dist/cjs/types/src/components/PaymentForm/components/CheckoutFooter.d.ts +2 -0
- package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails.d.ts +2 -0
- package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodFooter.d.ts +4 -0
- package/dist/cjs/types/src/components/PaymentForm/context/PaymentProvider.d.ts +37 -46
- package/dist/cjs/types/src/components/PaymentForm/hooks/useHandlePayment.d.ts +41 -0
- package/dist/cjs/types/src/components/PaymentForm/hooks/usePaymentButtonText.d.ts +1 -7
- package/dist/cjs/types/src/components/PaymentForm/types/PaymentType.d.ts +1 -2
- package/dist/cjs/types/src/components/Quote/Quote.d.ts +1 -28
- package/dist/cjs/types/src/components/Quote/components/QuoteButtons.d.ts +4 -12
- package/dist/cjs/types/src/components/Quote/hooks/{useAcceptQuote.d.ts → useSendAcceptQuote.d.ts} +3 -6
- package/dist/cjs/types/src/components/QuoteProvider/context/quantityEditableChargesContext.d.ts +8 -2
- package/dist/cjs/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +3 -5
- package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuantityEditableCharges.d.ts +36 -41
- package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuoteCreate.d.ts +3 -14
- package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuoteQuantities.d.ts +19 -3
- package/dist/cjs/types/src/components/QuoteProvider/hooks/useSelectedPriceListQuoteChange.d.ts +30 -18
- package/dist/cjs/types/src/components/Signup/{components/CheckoutSummary/CheckoutSummary.d.ts → CheckoutSummary.d.ts} +1 -1
- package/dist/cjs/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +0 -2
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/CheckoutBarInput.d.ts +13 -1
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/hooks/useChargeCRUD.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +14 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListSelector/PriceListSelector.d.ts +0 -3
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/queries/getSubscriptions.d.ts +163 -2
- package/dist/cjs/types/src/components/Subscriptions/context/upgradingSubscriptionContext.d.ts +1 -9
- package/dist/cjs/types/src/components/Subscriptions/fragments/UpgradingSubscriptionContext_SubscriptionFragment.d.ts +0 -4
- package/dist/cjs/types/src/components/priceListPricing/PricingTooltip.d.ts +2 -0
- package/dist/cjs/types/src/contexts/InvoiceQuoteContext.d.ts +3 -1
- package/dist/cjs/types/src/graphql/queries/getFormattedInvoice.d.ts +1 -1
- package/dist/cjs/types/src/{components/Quote → graphql}/queries/getFormattedQuote.d.ts +1 -6
- package/dist/cjs/types/src/hooks/usePaymentMethod.d.ts +0 -4
- package/dist/cjs/types/src/utils/QueryKeyFactory.d.ts +4 -4
- package/dist/cjs/types/src/utils/chargeUtils.d.ts +0 -1
- package/dist/cjs/types/src/utils/couponUtils.d.ts +5 -5
- package/dist/cjs/types/src/utils/featureAddonUtils/isAddonPurchased.d.ts +1 -1
- package/dist/esm/index.js +5360 -5446
- package/dist/esm/types/src/ajax.d.ts +1 -1
- package/dist/esm/types/src/components/Checkout/QuoteCheckout.d.ts +2 -2
- package/dist/esm/types/src/components/PandadocPollingModal.d.ts +1 -1
- package/dist/esm/types/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +4 -2
- package/dist/esm/types/src/components/PaymentForm/DemoPay/hooks/useSave.d.ts +5 -1
- package/dist/esm/types/src/components/PaymentForm/PaymentForm.d.ts +9 -40
- package/dist/esm/types/src/components/PaymentForm/Stripe/hooks/usePay.d.ts +4 -2
- package/dist/esm/types/src/components/PaymentForm/components/CheckoutFooter.d.ts +2 -0
- package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails.d.ts +2 -0
- package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodFooter.d.ts +4 -0
- package/dist/esm/types/src/components/PaymentForm/context/PaymentProvider.d.ts +37 -46
- package/dist/esm/types/src/components/PaymentForm/hooks/useHandlePayment.d.ts +41 -0
- package/dist/esm/types/src/components/PaymentForm/hooks/usePaymentButtonText.d.ts +1 -7
- package/dist/esm/types/src/components/PaymentForm/types/PaymentType.d.ts +1 -2
- package/dist/esm/types/src/components/Quote/Quote.d.ts +1 -28
- package/dist/esm/types/src/components/Quote/components/QuoteButtons.d.ts +4 -12
- package/dist/esm/types/src/components/Quote/hooks/{useAcceptQuote.d.ts → useSendAcceptQuote.d.ts} +3 -6
- package/dist/esm/types/src/components/QuoteProvider/context/quantityEditableChargesContext.d.ts +8 -2
- package/dist/esm/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +3 -5
- package/dist/esm/types/src/components/QuoteProvider/hooks/useQuantityEditableCharges.d.ts +36 -41
- package/dist/esm/types/src/components/QuoteProvider/hooks/useQuoteCreate.d.ts +3 -14
- package/dist/esm/types/src/components/QuoteProvider/hooks/useQuoteQuantities.d.ts +19 -3
- package/dist/esm/types/src/components/QuoteProvider/hooks/useSelectedPriceListQuoteChange.d.ts +30 -18
- package/dist/esm/types/src/components/Signup/{components/CheckoutSummary/CheckoutSummary.d.ts → CheckoutSummary.d.ts} +1 -1
- package/dist/esm/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +0 -2
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/CheckoutBarInput.d.ts +13 -1
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/hooks/useChargeCRUD.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +14 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListSelector/PriceListSelector.d.ts +0 -3
- package/dist/esm/types/src/components/Subscriptions/Upgrade/queries/getSubscriptions.d.ts +163 -2
- package/dist/esm/types/src/components/Subscriptions/context/upgradingSubscriptionContext.d.ts +1 -9
- package/dist/esm/types/src/components/Subscriptions/fragments/UpgradingSubscriptionContext_SubscriptionFragment.d.ts +0 -4
- package/dist/esm/types/src/components/priceListPricing/PricingTooltip.d.ts +2 -0
- package/dist/esm/types/src/contexts/InvoiceQuoteContext.d.ts +3 -1
- package/dist/esm/types/src/graphql/queries/getFormattedInvoice.d.ts +1 -1
- package/dist/esm/types/src/{components/Quote → graphql}/queries/getFormattedQuote.d.ts +1 -6
- package/dist/esm/types/src/hooks/usePaymentMethod.d.ts +0 -4
- package/dist/esm/types/src/utils/QueryKeyFactory.d.ts +4 -4
- package/dist/esm/types/src/utils/chargeUtils.d.ts +0 -1
- package/dist/esm/types/src/utils/couponUtils.d.ts +5 -5
- package/dist/esm/types/src/utils/featureAddonUtils/isAddonPurchased.d.ts +1 -1
- package/dist/index.d.ts +14 -78
- package/package.json +1 -1
- package/dist/cjs/types/src/components/PaymentForm/DemoPay/DemoPayFormProvider.d.ts +0 -10
- package/dist/cjs/types/src/components/PaymentForm/Stripe/StripeFormProvider.d.ts +0 -5
- package/dist/cjs/types/src/components/PaymentForm/components/CheckoutNoPayment.d.ts +0 -6
- package/dist/cjs/types/src/components/PaymentForm/components/Pay.d.ts +0 -5
- package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails/PaymentMethodDetails.d.ts +0 -12
- package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Cancel.d.ts +0 -1
- package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Save.d.ts +0 -1
- package/dist/cjs/types/src/components/PaymentForm/components/StoredPaymentMethods.d.ts +0 -18
- package/dist/cjs/types/src/components/PaymentForm/context/AccountIdContext.d.ts +0 -5
- package/dist/cjs/types/src/components/PaymentForm/context/CallbacksContext.d.ts +0 -14
- package/dist/cjs/types/src/components/PaymentForm/context/PaymentMethodFormVisibilityContext.d.ts +0 -12
- package/dist/cjs/types/src/components/PaymentForm/hooks/usePay.d.ts +0 -14
- package/dist/cjs/types/src/components/PaymentForm/hooks/usePaymentHold.d.ts +0 -18
- package/dist/cjs/types/src/components/PaymentForm/hooks/useSave.d.ts +0 -16
- package/dist/cjs/types/src/components/Quote/components/PaymentHoldDisplay.d.ts +0 -18
- package/dist/cjs/types/src/components/Quote/hooks/useQuotePaymentHold.d.ts +0 -20
- package/dist/cjs/types/src/components/Quote/queries/quoteAccept.d.ts +0 -14
- package/dist/cjs/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_PriceListChargeFragment.d.ts +0 -16
- package/dist/cjs/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_QuoteFragment.d.ts +0 -26
- package/dist/cjs/types/src/components/QuoteProvider/fragments/useQuoteQuantities_PriceListChargeFragment.d.ts +0 -13
- package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/hooks/sortQuoteChangeCharges.d.ts +0 -14
- package/dist/cjs/types/src/components/Signup/hooks/useApplyDefaultCoupon.d.ts +0 -21
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/CheckoutBarInput_PriceListChargeFragment.d.ts +0 -13
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/useChargeCRUD_QuoteFragment.d.ts +0 -22
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/fragments/PlanPickerCheckoutBar_PriceListChargeFragment.d.ts +0 -14
- package/dist/esm/types/src/components/PaymentForm/DemoPay/DemoPayFormProvider.d.ts +0 -10
- package/dist/esm/types/src/components/PaymentForm/Stripe/StripeFormProvider.d.ts +0 -5
- package/dist/esm/types/src/components/PaymentForm/components/CheckoutNoPayment.d.ts +0 -6
- package/dist/esm/types/src/components/PaymentForm/components/Pay.d.ts +0 -5
- package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails/PaymentMethodDetails.d.ts +0 -12
- package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Cancel.d.ts +0 -1
- package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Save.d.ts +0 -1
- package/dist/esm/types/src/components/PaymentForm/components/StoredPaymentMethods.d.ts +0 -18
- package/dist/esm/types/src/components/PaymentForm/context/AccountIdContext.d.ts +0 -5
- package/dist/esm/types/src/components/PaymentForm/context/CallbacksContext.d.ts +0 -14
- package/dist/esm/types/src/components/PaymentForm/context/PaymentMethodFormVisibilityContext.d.ts +0 -12
- package/dist/esm/types/src/components/PaymentForm/hooks/usePay.d.ts +0 -14
- package/dist/esm/types/src/components/PaymentForm/hooks/usePaymentHold.d.ts +0 -18
- package/dist/esm/types/src/components/PaymentForm/hooks/useSave.d.ts +0 -16
- package/dist/esm/types/src/components/Quote/components/PaymentHoldDisplay.d.ts +0 -18
- package/dist/esm/types/src/components/Quote/hooks/useQuotePaymentHold.d.ts +0 -20
- package/dist/esm/types/src/components/Quote/queries/quoteAccept.d.ts +0 -14
- package/dist/esm/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_PriceListChargeFragment.d.ts +0 -16
- package/dist/esm/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_QuoteFragment.d.ts +0 -26
- package/dist/esm/types/src/components/QuoteProvider/fragments/useQuoteQuantities_PriceListChargeFragment.d.ts +0 -13
- package/dist/esm/types/src/components/Signup/components/CheckoutSummary/hooks/sortQuoteChangeCharges.d.ts +0 -14
- package/dist/esm/types/src/components/Signup/hooks/useApplyDefaultCoupon.d.ts +0 -21
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/CheckoutBarInput_PriceListChargeFragment.d.ts +0 -13
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/useChargeCRUD_QuoteFragment.d.ts +0 -22
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/fragments/PlanPickerCheckoutBar_PriceListChargeFragment.d.ts +0 -14
- /package/dist/cjs/types/src/components/PaymentForm/components/{PaymentMethodDetails/components/PaymentMethodSelector.d.ts → PaymentMethodSelector.d.ts} +0 -0
- /package/dist/esm/types/src/components/PaymentForm/components/{PaymentMethodDetails/components/PaymentMethodSelector.d.ts → PaymentMethodSelector.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useDownloadFile: (id?: string
|
|
1
|
+
export declare const useDownloadFile: (id?: string, onError?: (error: any) => void) => (url: string, token?: string) => Promise<any>;
|
|
@@ -72,7 +72,7 @@ export declare const QuoteCheckout_QuoteFragment: import("gql.tada").TadaDocumen
|
|
|
72
72
|
}[];
|
|
73
73
|
kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
|
|
74
74
|
[$tada.fragmentRefs]: {
|
|
75
|
-
|
|
75
|
+
shouldShowCouponEditor_QuoteFragment: "Quote";
|
|
76
76
|
} & {
|
|
77
77
|
PaymentForm_QuoteFragment: "Quote";
|
|
78
78
|
} & {
|
|
@@ -86,7 +86,7 @@ export declare const QuoteCheckout_QuoteFragment: import("gql.tada").TadaDocumen
|
|
|
86
86
|
export declare const QuoteCheckout_SubscriptionFragment: import("gql.tada").TadaDocumentNode<{
|
|
87
87
|
id: string;
|
|
88
88
|
[$tada.fragmentRefs]: {
|
|
89
|
-
|
|
89
|
+
shouldShowCouponEditor_SubscriptionFragment: "Subscription";
|
|
90
90
|
};
|
|
91
91
|
}, {}, {
|
|
92
92
|
fragment: "QuoteCheckout_SubscriptionFragment";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
interface PandadocPollingModalProps {
|
|
2
2
|
isVisible: boolean;
|
|
3
3
|
setVisible: (visible: boolean) => void;
|
|
4
|
-
id?: string
|
|
4
|
+
id?: string;
|
|
5
5
|
}
|
|
6
6
|
declare const PandadocPollingModal: ({ isVisible, setVisible, id }: PandadocPollingModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export default PandadocPollingModal;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import FormattedInvoice from '@/types/FormattedInvoice';
|
|
2
|
+
import Invoice from '@/types/Invoice';
|
|
1
3
|
import { PluginData } from '@/types/frontendTypes';
|
|
2
|
-
export declare function usePay({ onPaymentSuccess, onPaymentError, quoteId,
|
|
4
|
+
export declare function usePay({ onPaymentSuccess, onPaymentError, quoteId, invoice, plugin, }: {
|
|
3
5
|
onPaymentSuccess?: (response: any) => void;
|
|
4
6
|
onPaymentError?: (error: any) => void;
|
|
5
7
|
quoteId?: string | null;
|
|
6
|
-
|
|
8
|
+
invoice?: FormattedInvoice | Invoice;
|
|
7
9
|
plugin: PluginData | undefined;
|
|
8
10
|
}): {
|
|
9
11
|
pay: (paymentMethodId: string) => Promise<void>;
|
|
@@ -3,7 +3,11 @@ export declare function useSave({ onSaveSuccess, onSaveError, accountId, }: {
|
|
|
3
3
|
onSaveError?: (error: any) => void;
|
|
4
4
|
accountId: string | undefined;
|
|
5
5
|
}): {
|
|
6
|
-
save: (
|
|
6
|
+
save: (cardDetails: {
|
|
7
|
+
number: string;
|
|
8
|
+
expiry: string;
|
|
9
|
+
cvc: string;
|
|
10
|
+
}) => Promise<string | undefined>;
|
|
7
11
|
isSaving: boolean;
|
|
8
12
|
};
|
|
9
13
|
export default useSave;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
+
import FormattedInvoice from '@/types/FormattedInvoice';
|
|
2
|
+
import Invoice from '@/types/Invoice';
|
|
1
3
|
import { FragmentOf, ResultOf } from 'gql.tada';
|
|
2
|
-
import type { ComponentProps } from 'react';
|
|
3
|
-
import { ReactNode } from 'react';
|
|
4
|
-
import { CheckoutNoPayment } from './components/CheckoutNoPayment';
|
|
5
|
-
import { Pay } from './components/Pay';
|
|
6
|
-
import { PaymentMethodDetails } from './components/PaymentMethodDetails/PaymentMethodDetails';
|
|
7
|
-
import { StoredPaymentMethods } from './components/StoredPaymentMethods';
|
|
8
4
|
import { PaymentForm_PaymentMethodsFragment } from './fragments/PaymentForm_PaymentMethodsFragment';
|
|
9
5
|
type PaymentMethodFragment = ResultOf<typeof PaymentForm_PaymentMethodsFragment>;
|
|
10
6
|
export declare const PaymentForm_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
@@ -18,25 +14,10 @@ export declare const PaymentForm_QuoteFragment: import("gql.tada").TadaDocumentN
|
|
|
18
14
|
on: "Quote";
|
|
19
15
|
masked: true;
|
|
20
16
|
}>;
|
|
21
|
-
export declare
|
|
22
|
-
id: string | null;
|
|
23
|
-
currencyId: string;
|
|
24
|
-
[$tada.fragmentRefs]: {
|
|
25
|
-
PaymentProvider_InvoiceFragment: "Invoice";
|
|
26
|
-
};
|
|
27
|
-
}, {}, {
|
|
28
|
-
fragment: "PaymentForm_InvoiceFragment";
|
|
29
|
-
on: "Invoice";
|
|
30
|
-
masked: true;
|
|
31
|
-
}>;
|
|
32
|
-
declare function PaymentFormRoot({ currencyId: accountCurrencyId, invoice: maskedInvoice, quote: maskedQuote, paymentHold, onPaymentSuccess, onPaymentHoldSuccess, paymentHoldPrecondition, accountId, onSavePaymentMethod, onPaymentMethodRemoved, onSetDefaultPaymentMethod, overrideToken, customCheckoutFunction, children, }: {
|
|
17
|
+
export declare function PaymentForm({ currencyId: accountCurrencyId, invoice, quote: maskedQuote, onPaymentSuccess, onPaymentHoldSuccess, paymentHoldPrecondition, accountId, onSavePaymentMethod, onPaymentMethodRemoved, onSetDefaultPaymentMethod, overrideToken, customCheckoutFunction, paymentHoldOptions, disablePayButton, }: {
|
|
33
18
|
currencyId?: string;
|
|
34
|
-
invoice?:
|
|
19
|
+
invoice?: FormattedInvoice | Invoice;
|
|
35
20
|
quote?: FragmentOf<typeof PaymentForm_QuoteFragment>;
|
|
36
|
-
paymentHold?: {
|
|
37
|
-
quoteId: string;
|
|
38
|
-
amountToHold: number;
|
|
39
|
-
};
|
|
40
21
|
onPaymentSuccess?: (response: any) => void;
|
|
41
22
|
onPaymentHoldSuccess?: (response: any) => void;
|
|
42
23
|
/**
|
|
@@ -49,22 +30,10 @@ declare function PaymentFormRoot({ currencyId: accountCurrencyId, invoice: maske
|
|
|
49
30
|
accountId?: string;
|
|
50
31
|
overrideToken?: string;
|
|
51
32
|
customCheckoutFunction?: (pluginId: string, paymentMethodId: string) => Promise<any>;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
hasPaymentMethods: boolean;
|
|
57
|
-
isPaymentMethodDetailsOpen: boolean;
|
|
58
|
-
isPayableAvailable: boolean;
|
|
59
|
-
amountDue: number | undefined;
|
|
60
|
-
};
|
|
61
|
-
declare function PaymentFormInternal(props: PaymentFormProps & {
|
|
33
|
+
paymentHoldOptions?: {
|
|
34
|
+
payToAccept?: boolean;
|
|
35
|
+
amountToHold?: number;
|
|
36
|
+
};
|
|
62
37
|
disablePayButton?: boolean;
|
|
63
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
64
|
-
export declare const PaymentForm: typeof PaymentFormInternal & {
|
|
65
|
-
StoredPaymentMethods: typeof StoredPaymentMethods;
|
|
66
|
-
Pay: typeof Pay;
|
|
67
|
-
CheckoutNoPayment: typeof CheckoutNoPayment;
|
|
68
|
-
PaymentMethodDetails: typeof PaymentMethodDetails;
|
|
69
|
-
};
|
|
38
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
70
39
|
export {};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import FormattedInvoice from '@/types/FormattedInvoice';
|
|
2
|
+
import Invoice from '@/types/Invoice';
|
|
1
3
|
import { PluginData } from '@/types/frontendTypes';
|
|
2
|
-
export declare function usePay({ onPaymentSuccess, onPaymentError, quoteId,
|
|
4
|
+
export declare function usePay({ onPaymentSuccess, onPaymentError, quoteId, invoice, plugin, }: {
|
|
3
5
|
onPaymentSuccess?: (response: any) => void;
|
|
4
6
|
onPaymentError?: (error: any) => void;
|
|
5
7
|
quoteId?: string | null;
|
|
6
|
-
|
|
8
|
+
invoice?: FormattedInvoice | Invoice;
|
|
7
9
|
plugin: PluginData | undefined;
|
|
8
10
|
}): {
|
|
9
11
|
pay: (paymentMethodId: string) => Promise<void>;
|
|
@@ -1,60 +1,51 @@
|
|
|
1
|
+
import FormattedInvoice from '@/types/FormattedInvoice';
|
|
2
|
+
import Invoice from '@/types/Invoice';
|
|
1
3
|
import { FragmentOf } from 'gql.tada';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
2
5
|
import { PaymentType } from '../types/PaymentType';
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
invoiceId?: string;
|
|
21
|
-
paymentHold?: {
|
|
22
|
-
quoteId: string;
|
|
23
|
-
amountToHold: number;
|
|
24
|
-
};
|
|
25
|
-
paymentType: PaymentType;
|
|
26
|
-
amountDue: number | undefined;
|
|
27
|
-
formattedAmountDue: string | undefined;
|
|
28
|
-
isPaid: boolean;
|
|
29
|
-
setIsPaid: React.Dispatch<React.SetStateAction<boolean>>;
|
|
30
|
-
};
|
|
31
|
-
export { PayableProvider, usePayable, };
|
|
6
|
+
declare const useFormattedAmountDue: () => string | undefined;
|
|
7
|
+
declare const usePaymentType: () => PaymentType | undefined;
|
|
8
|
+
declare const useIsPaying: () => boolean | undefined;
|
|
9
|
+
declare const useHandlePaymentFormSubmit: () => (demoPayCardDetails?: {
|
|
10
|
+
number: string;
|
|
11
|
+
expiry: string;
|
|
12
|
+
cvc: string;
|
|
13
|
+
}) => Promise<void>;
|
|
14
|
+
declare const useIsSaving: () => boolean | undefined;
|
|
15
|
+
declare const useIsPaid: () => boolean | undefined;
|
|
16
|
+
declare const useAccountId: () => string | undefined;
|
|
17
|
+
declare const IsPayButtonDisabledProvider: ({ value, children }: {
|
|
18
|
+
value: boolean | undefined;
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
}) => import("react/jsx-runtime").JSX.Element, useIsPayButtonDisabled: () => boolean | undefined;
|
|
21
|
+
export { useAccountId, useFormattedAmountDue, useHandlePaymentFormSubmit, useIsPaid, useIsPaying, useIsSaving, usePaymentType, useIsPayButtonDisabled, };
|
|
22
|
+
export { IsPayButtonDisabledProvider };
|
|
32
23
|
export declare const PaymentProvider_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
33
24
|
id: string | null;
|
|
34
|
-
currencyId: string;
|
|
35
25
|
[$tada.fragmentRefs]: {
|
|
36
|
-
|
|
26
|
+
useHandlePayment_QuoteFragment: "Quote";
|
|
37
27
|
};
|
|
38
28
|
}, {}, {
|
|
39
29
|
fragment: "PaymentProvider_QuoteFragment";
|
|
40
30
|
on: "Quote";
|
|
41
31
|
masked: true;
|
|
42
32
|
}>;
|
|
43
|
-
export declare
|
|
44
|
-
id: string | null;
|
|
45
|
-
currencyId: string;
|
|
46
|
-
amountDue: number | null;
|
|
47
|
-
}, {}, {
|
|
48
|
-
fragment: "PaymentProvider_InvoiceFragment";
|
|
49
|
-
on: "Invoice";
|
|
50
|
-
masked: true;
|
|
51
|
-
}>;
|
|
52
|
-
export declare function PaymentProvider({ children, quote: maskedQuote, invoice: maskedInvoice, paymentHold, }: {
|
|
33
|
+
export declare function PaymentProvider({ children, accountId, quote: maskedQuote, invoice, onPaymentSuccess, onPaymentHoldSuccess, paymentHoldPrecondition, paymentHoldOptions, onSavePaymentMethod, }: {
|
|
53
34
|
children: React.ReactNode;
|
|
35
|
+
accountId?: string;
|
|
54
36
|
quote: FragmentOf<typeof PaymentProvider_QuoteFragment> | undefined;
|
|
55
|
-
invoice:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
37
|
+
invoice: FormattedInvoice | Invoice | undefined;
|
|
38
|
+
onPaymentSuccess?: (response: any) => void;
|
|
39
|
+
onPaymentHoldSuccess?: (response: any) => void;
|
|
40
|
+
paymentHoldPrecondition?: () => boolean | Promise<boolean>;
|
|
41
|
+
paymentHoldOptions: {
|
|
42
|
+
payToAccept?: boolean;
|
|
43
|
+
amountToHold?: number;
|
|
44
|
+
};
|
|
45
|
+
onSavePaymentMethod?: (response: any) => void;
|
|
46
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
export declare function StripeWrapper({ children, currencyId, accountId, }: {
|
|
48
|
+
children: React.ReactNode;
|
|
49
|
+
currencyId: string;
|
|
50
|
+
accountId?: string;
|
|
60
51
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import FormattedInvoice from '@/types/FormattedInvoice';
|
|
2
|
+
import Invoice from '@/types/Invoice';
|
|
3
|
+
import { PluginData } from '@/types/frontendTypes';
|
|
4
|
+
import { FragmentOf } from 'gql.tada';
|
|
5
|
+
import { PaymentType } from '../types/PaymentType';
|
|
6
|
+
export declare const useHandlePayment_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
7
|
+
id: string | null;
|
|
8
|
+
amount: number;
|
|
9
|
+
currencyId: string;
|
|
10
|
+
[$tada.fragmentRefs]: {
|
|
11
|
+
getQuoteAmountDue_QuoteFragment: "Quote";
|
|
12
|
+
};
|
|
13
|
+
}, {}, {
|
|
14
|
+
fragment: "useHandlePayment_QuoteFragment";
|
|
15
|
+
on: "Quote";
|
|
16
|
+
masked: true;
|
|
17
|
+
}>;
|
|
18
|
+
declare const useHandlePayment: ({ quote: maskedQuote, invoice, onPaymentSuccess, onPaymentHoldSuccess, paymentHoldPrecondition, plugin, paymentHoldOptions, accountId, }: {
|
|
19
|
+
quote?: FragmentOf<typeof useHandlePayment_QuoteFragment>;
|
|
20
|
+
invoice?: FormattedInvoice | Invoice;
|
|
21
|
+
onPaymentSuccess?: (response: any) => void;
|
|
22
|
+
onPaymentHoldSuccess?: (response: any) => void;
|
|
23
|
+
paymentHoldPrecondition?: () => boolean | Promise<boolean>;
|
|
24
|
+
plugin: PluginData | undefined;
|
|
25
|
+
paymentHoldOptions: {
|
|
26
|
+
payToAccept?: boolean;
|
|
27
|
+
amountToHold?: number;
|
|
28
|
+
};
|
|
29
|
+
accountId: string | undefined;
|
|
30
|
+
}) => {
|
|
31
|
+
handleApproveHold: (overridePaymentMethodId?: string) => Promise<void>;
|
|
32
|
+
handlePayment: (overridePaymentMethodId: string) => Promise<void>;
|
|
33
|
+
handleCheckoutNoPayment: import("@tanstack/react-query").UseMutateFunction<{
|
|
34
|
+
savePaymentMethod: boolean | undefined;
|
|
35
|
+
}, Error, void, unknown>;
|
|
36
|
+
isPaying: boolean;
|
|
37
|
+
isPaid: boolean;
|
|
38
|
+
paymentType: PaymentType;
|
|
39
|
+
formattedAmountDue: string | undefined;
|
|
40
|
+
};
|
|
41
|
+
export default useHandlePayment;
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
isSaving?: boolean;
|
|
3
|
-
isPaying?: boolean;
|
|
4
|
-
isApprovingHold?: boolean;
|
|
5
|
-
};
|
|
6
|
-
export declare function usePaymentButtonText(props?: usePaymentButtonTextProps): string;
|
|
7
|
-
export {};
|
|
1
|
+
export declare function usePaymentButtonText(): string;
|
|
@@ -1,36 +1,9 @@
|
|
|
1
|
-
import { ResultOf } from 'gql.tada';
|
|
2
1
|
import { InvoiceQuoteContextProps } from '../../contexts/InvoiceQuoteContext';
|
|
3
|
-
export declare const
|
|
4
|
-
quote: {
|
|
5
|
-
currentPaymentHold: {
|
|
6
|
-
[$tada.fragmentRefs]: {
|
|
7
|
-
PaymentHoldDisplay_QuoteButtonsFragment: "PaymentHold";
|
|
8
|
-
};
|
|
9
|
-
} | null;
|
|
10
|
-
firstInvoice: {
|
|
11
|
-
id: string | null;
|
|
12
|
-
} | null;
|
|
13
|
-
};
|
|
14
|
-
}, {}, {
|
|
15
|
-
fragment: "Quote_PaymentHoldFragment";
|
|
16
|
-
on: "FormattedQuote";
|
|
17
|
-
masked: true;
|
|
18
|
-
}>;
|
|
19
|
-
declare const OnQuoteLoadedFragment: import("gql.tada").TadaDocumentNode<{
|
|
20
|
-
vendorName: string | null;
|
|
21
|
-
quote: {
|
|
22
|
-
id: string | null;
|
|
23
|
-
};
|
|
24
|
-
}, {}, {
|
|
25
|
-
fragment: "OnQuoteLoadedFragment";
|
|
26
|
-
on: "FormattedQuote";
|
|
27
|
-
masked: true;
|
|
28
|
-
}>;
|
|
2
|
+
export declare const MarkupContainer: any;
|
|
29
3
|
type QuoteProps = InvoiceQuoteContextProps & {
|
|
30
4
|
onQuoteAccepted?: () => void;
|
|
31
5
|
onQuoteUnavailableError?: () => void;
|
|
32
6
|
suppressQuoteUnavailableErrorNotification?: boolean;
|
|
33
|
-
onQuoteLoaded?: (formattedQuote: ResultOf<typeof OnQuoteLoadedFragment>) => void;
|
|
34
7
|
};
|
|
35
8
|
export default function Quote({ id, invoiceQuoteViewComponent, onInvoiceDownloadError, onPaymentSuccess, shadow, className, hideDownloadButton, onQuoteLoaded, onQuoteAccepted, onQuoteUnavailableError, suppressQuoteUnavailableErrorNotification, }: QuoteProps): import("react/jsx-runtime").JSX.Element;
|
|
36
9
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import PaymentHold from '@/types/PaymentHold';
|
|
1
2
|
import { FragmentOf } from 'gql.tada';
|
|
2
3
|
export declare const QuoteButtons_FormattedQuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
3
4
|
acceptedAt: unknown;
|
|
@@ -10,26 +11,17 @@ export declare const QuoteButtons_FormattedQuoteFragment: import("gql.tada").Tad
|
|
|
10
11
|
on: "FormattedQuote";
|
|
11
12
|
masked: true;
|
|
12
13
|
}>;
|
|
13
|
-
export declare
|
|
14
|
-
[$tada.fragmentRefs]: {
|
|
15
|
-
PaymentHoldDisplay_PaymentHoldFragment: "PaymentHold";
|
|
16
|
-
};
|
|
17
|
-
}, {}, {
|
|
18
|
-
fragment: "PaymentHoldDisplay_QuoteButtonsFragment";
|
|
19
|
-
on: "PaymentHold";
|
|
20
|
-
masked: true;
|
|
21
|
-
}>;
|
|
22
|
-
export declare function QuoteButtons({ isAccepted, formattedQuote: maskedFormattedQuote, isMobile, hideDownloadButton, id, isAccepting, handleClickAccept, setPaymentHoldModalVisible, shouldDoPaymentHold, paymentHoldCompleted, paymentHold: maskedPaymentHold, isSendAcceptPending, }: {
|
|
14
|
+
export declare function QuoteButtons({ isAccepted, formattedQuote: maskedFormattedQuote, isMobile, hideDownloadButton, id, isAccepting, handleClickAccept, setPaymentHoldModalVisible, shouldDoPaymentHold, paymentHoldCompleted, paymentHold, isSendAcceptPending, }: {
|
|
23
15
|
isAccepted: boolean;
|
|
24
16
|
formattedQuote: FragmentOf<typeof QuoteButtons_FormattedQuoteFragment>;
|
|
25
17
|
isMobile: boolean;
|
|
26
18
|
hideDownloadButton?: boolean;
|
|
27
|
-
id?: string
|
|
19
|
+
id?: string;
|
|
28
20
|
isAccepting: boolean;
|
|
29
21
|
handleClickAccept: () => void;
|
|
30
22
|
setPaymentHoldModalVisible: (visible: boolean) => void;
|
|
31
23
|
shouldDoPaymentHold: boolean;
|
|
32
24
|
paymentHoldCompleted: boolean;
|
|
33
|
-
paymentHold:
|
|
25
|
+
paymentHold: PaymentHold | undefined;
|
|
34
26
|
isSendAcceptPending: boolean;
|
|
35
27
|
}): import("react/jsx-runtime").JSX.Element;
|
package/dist/esm/types/src/components/Quote/hooks/{useAcceptQuote.d.ts → useSendAcceptQuote.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
declare const useSendAcceptQuote: ({ quoteId, apiHost, token, onQuoteAccepted, }: {
|
|
2
2
|
quoteId?: string;
|
|
3
3
|
apiHost: string;
|
|
4
4
|
token?: string;
|
|
@@ -6,11 +6,7 @@ export declare const useAcceptQuote: ({ quoteId, apiHost, token, onQuoteAccepted
|
|
|
6
6
|
}) => {
|
|
7
7
|
acceptBoxVisible: boolean;
|
|
8
8
|
isAccepting: boolean;
|
|
9
|
-
sendAccept: import("@tanstack/react-query").UseMutateFunction<{
|
|
10
|
-
quoteAccept: {
|
|
11
|
-
errors: string | null;
|
|
12
|
-
} | null;
|
|
13
|
-
}, Error, {
|
|
9
|
+
sendAccept: import("@tanstack/react-query").UseMutateFunction<any, Error, {
|
|
14
10
|
[key: string]: string;
|
|
15
11
|
}, unknown>;
|
|
16
12
|
setAcceptBoxVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
@@ -20,3 +16,4 @@ export declare const useAcceptQuote: ({ quoteId, apiHost, token, onQuoteAccepted
|
|
|
20
16
|
setPandadocPollingModalVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
21
17
|
isSendAcceptPending: boolean;
|
|
22
18
|
};
|
|
19
|
+
export default useSendAcceptQuote;
|
package/dist/esm/types/src/components/QuoteProvider/context/quantityEditableChargesContext.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export declare const QuantityEditableChargesProvider: ({ value, children }: {
|
|
2
2
|
value: {
|
|
3
|
+
feature: {
|
|
4
|
+
id: string;
|
|
5
|
+
} | null;
|
|
3
6
|
deprecated: boolean | null;
|
|
4
7
|
id: string;
|
|
5
8
|
featureAddon: boolean | null;
|
|
@@ -10,9 +13,12 @@ export declare const QuantityEditableChargesProvider: ({ value, children }: {
|
|
|
10
13
|
} & {
|
|
11
14
|
useQuoteQuantities_PriceListChargeFragment: "PriceListCharge";
|
|
12
15
|
};
|
|
13
|
-
}[];
|
|
16
|
+
}[] | undefined;
|
|
14
17
|
children?: import("react").ReactNode;
|
|
15
18
|
}) => import("react/jsx-runtime").JSX.Element, useQuantityEditableChargesContext: () => {
|
|
19
|
+
feature: {
|
|
20
|
+
id: string;
|
|
21
|
+
} | null;
|
|
16
22
|
deprecated: boolean | null;
|
|
17
23
|
id: string;
|
|
18
24
|
featureAddon: boolean | null;
|
|
@@ -23,4 +29,4 @@ export declare const QuantityEditableChargesProvider: ({ value, children }: {
|
|
|
23
29
|
} & {
|
|
24
30
|
useQuoteQuantities_PriceListChargeFragment: "PriceListCharge";
|
|
25
31
|
};
|
|
26
|
-
}[];
|
|
32
|
+
}[] | undefined;
|
|
@@ -29,7 +29,9 @@ export declare const QuoteContext_QuoteFragment: import("gql.tada").TadaDocument
|
|
|
29
29
|
quantityMin: number | null;
|
|
30
30
|
quantityMax: number | null;
|
|
31
31
|
selfServiceQuantity: boolean | null;
|
|
32
|
-
|
|
32
|
+
[$tada.fragmentRefs]: {
|
|
33
|
+
CanEditChargeQuantity_PriceListChargeFragment: "PriceListCharge";
|
|
34
|
+
};
|
|
33
35
|
} | null;
|
|
34
36
|
feature: {
|
|
35
37
|
id: string;
|
|
@@ -48,10 +50,6 @@ export declare const QuoteContext_QuoteFragment: import("gql.tada").TadaDocument
|
|
|
48
50
|
FeatureAddonRow_QuoteFragment: "Quote";
|
|
49
51
|
} & {
|
|
50
52
|
PaymentForms_QuoteFragment: "Quote";
|
|
51
|
-
} & {
|
|
52
|
-
useQuantityEditableCharges_QuoteFragment: "Quote";
|
|
53
|
-
} & {
|
|
54
|
-
useChargeCRUD_QuoteFragment: "Quote";
|
|
55
53
|
};
|
|
56
54
|
}, {}, {
|
|
57
55
|
fragment: "QuoteContext_QuoteFragment";
|
|
@@ -1,52 +1,55 @@
|
|
|
1
|
-
import { FragmentOf } from 'gql.tada';
|
|
2
|
-
import {
|
|
1
|
+
import { FragmentOf, ResultOf } from 'gql.tada';
|
|
2
|
+
import { QuoteContext_QuoteFragment } from '../fragments/quoteFragment';
|
|
3
3
|
export declare const useQuantityEditableCharges_SubscriptionFragment: import("gql.tada").TadaDocumentNode<{
|
|
4
4
|
id: string;
|
|
5
|
-
priceListId: string;
|
|
6
5
|
currentCharges: {
|
|
6
|
+
quantity: number | null;
|
|
7
7
|
priceListCharge: {
|
|
8
|
-
deprecated: boolean | null;
|
|
9
8
|
id: string;
|
|
10
|
-
featureAddon: boolean | null;
|
|
11
|
-
[$tada.fragmentRefs]: {
|
|
12
|
-
CanEditChargeQuantity_PriceListChargeFragment: "PriceListCharge";
|
|
13
|
-
} & {
|
|
14
|
-
PlanPickerCheckoutBar_PriceListChargeFragment: "PriceListCharge";
|
|
15
|
-
} & {
|
|
16
|
-
useQuoteQuantities_PriceListChargeFragment: "PriceListCharge";
|
|
17
|
-
};
|
|
18
9
|
} | null;
|
|
19
10
|
}[] | null;
|
|
20
|
-
addonSubscriptions: {
|
|
21
|
-
currentCharges: {
|
|
22
|
-
priceListCharge: {
|
|
23
|
-
deprecated: boolean | null;
|
|
24
|
-
id: string;
|
|
25
|
-
featureAddon: boolean | null;
|
|
26
|
-
[$tada.fragmentRefs]: {
|
|
27
|
-
CanEditChargeQuantity_PriceListChargeFragment: "PriceListCharge";
|
|
28
|
-
} & {
|
|
29
|
-
PlanPickerCheckoutBar_PriceListChargeFragment: "PriceListCharge";
|
|
30
|
-
} & {
|
|
31
|
-
useQuoteQuantities_PriceListChargeFragment: "PriceListCharge";
|
|
32
|
-
};
|
|
33
|
-
} | null;
|
|
34
|
-
}[] | null;
|
|
35
|
-
}[] | null;
|
|
36
11
|
}, {}, {
|
|
37
12
|
fragment: "useQuantityEditableCharges_SubscriptionFragment";
|
|
38
13
|
on: "Subscription";
|
|
39
14
|
masked: true;
|
|
40
15
|
}>;
|
|
16
|
+
export declare const useQuantityEditableCharges_PriceListFragment: import("gql.tada").TadaDocumentNode<{
|
|
17
|
+
id: string;
|
|
18
|
+
charges: {
|
|
19
|
+
feature: {
|
|
20
|
+
id: string;
|
|
21
|
+
} | null;
|
|
22
|
+
deprecated: boolean | null;
|
|
23
|
+
id: string;
|
|
24
|
+
featureAddon: boolean | null;
|
|
25
|
+
[$tada.fragmentRefs]: {
|
|
26
|
+
CanEditChargeQuantity_PriceListChargeFragment: "PriceListCharge";
|
|
27
|
+
} & {
|
|
28
|
+
PlanPickerCheckoutBar_PriceListChargeFragment: "PriceListCharge";
|
|
29
|
+
} & {
|
|
30
|
+
useQuoteQuantities_PriceListChargeFragment: "PriceListCharge";
|
|
31
|
+
};
|
|
32
|
+
}[] | null;
|
|
33
|
+
[$tada.fragmentRefs]: {
|
|
34
|
+
useSelectedPriceListQuoteChange_PriceListFragment: "PriceList";
|
|
35
|
+
};
|
|
36
|
+
}, {}, {
|
|
37
|
+
fragment: "useQuantityEditableCharges_PriceListFragment";
|
|
38
|
+
on: "PriceList";
|
|
39
|
+
masked: true;
|
|
40
|
+
}>;
|
|
41
41
|
/**
|
|
42
42
|
* Hook to provide list of pricelist charges whose quantities can be edited
|
|
43
43
|
*/
|
|
44
|
-
export declare function useQuantityEditableCharges({ upgradingSubscription: maskedUpgradingSubscription,
|
|
44
|
+
export declare function useQuantityEditableCharges({ upgradingSubscription: maskedUpgradingSubscription, pricelist: maskedPricelist, quote }: {
|
|
45
45
|
upgradingSubscription: FragmentOf<typeof useQuantityEditableCharges_SubscriptionFragment> | undefined;
|
|
46
|
-
|
|
47
|
-
quote:
|
|
46
|
+
pricelist: FragmentOf<typeof useQuantityEditableCharges_PriceListFragment> | null;
|
|
47
|
+
quote: ResultOf<typeof QuoteContext_QuoteFragment> | null | undefined;
|
|
48
48
|
}): {
|
|
49
49
|
quantityEditableCharges: {
|
|
50
|
+
feature: {
|
|
51
|
+
id: string;
|
|
52
|
+
} | null;
|
|
50
53
|
deprecated: boolean | null;
|
|
51
54
|
id: string;
|
|
52
55
|
featureAddon: boolean | null;
|
|
@@ -57,19 +60,11 @@ export declare function useQuantityEditableCharges({ upgradingSubscription: mask
|
|
|
57
60
|
} & {
|
|
58
61
|
useQuoteQuantities_PriceListChargeFragment: "PriceListCharge";
|
|
59
62
|
};
|
|
60
|
-
}[];
|
|
63
|
+
}[] | undefined;
|
|
61
64
|
findSubscriptionCharge: (priceListChargeId: string) => {
|
|
65
|
+
quantity: number | null;
|
|
62
66
|
priceListCharge: {
|
|
63
|
-
deprecated: boolean | null;
|
|
64
67
|
id: string;
|
|
65
|
-
featureAddon: boolean | null;
|
|
66
|
-
[$tada.fragmentRefs]: {
|
|
67
|
-
CanEditChargeQuantity_PriceListChargeFragment: "PriceListCharge";
|
|
68
|
-
} & {
|
|
69
|
-
PlanPickerCheckoutBar_PriceListChargeFragment: "PriceListCharge";
|
|
70
|
-
} & {
|
|
71
|
-
useQuoteQuantities_PriceListChargeFragment: "PriceListCharge";
|
|
72
|
-
};
|
|
73
68
|
} | null;
|
|
74
69
|
} | undefined;
|
|
75
70
|
};
|
|
@@ -1,18 +1,7 @@
|
|
|
1
1
|
import PriceList from '@/types/PriceList';
|
|
2
|
-
import
|
|
3
|
-
export declare const
|
|
4
|
-
|
|
5
|
-
priceList: {
|
|
6
|
-
id: string;
|
|
7
|
-
} | null;
|
|
8
|
-
state: "ACTIVE" | "TRIAL" | "CANCELED" | "EXPIRED" | "TRIAL_EXPIRED" | "PENDING";
|
|
9
|
-
}, {}, {
|
|
10
|
-
fragment: "useQuoteCreate_SubscriptionFragment";
|
|
11
|
-
on: "Subscription";
|
|
12
|
-
masked: true;
|
|
13
|
-
}>;
|
|
14
|
-
export declare const useQuoteCreate: ({ maskedUpgradingSubscription, selectedPriceList, token, }: {
|
|
15
|
-
maskedUpgradingSubscription?: FragmentOf<typeof useQuoteCreate_SubscriptionFragment>;
|
|
2
|
+
import Subscription from '@/types/Subscription';
|
|
3
|
+
export declare const useQuoteCreate: ({ upgradingSubscription, selectedPriceList, token, }: {
|
|
4
|
+
upgradingSubscription?: Subscription;
|
|
16
5
|
selectedPriceList?: PriceList;
|
|
17
6
|
token?: string;
|
|
18
7
|
}) => {
|
|
@@ -1,5 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import PriceList from '@/types/PriceList';
|
|
2
|
+
import { FragmentOf, ResultOf } from 'gql.tada';
|
|
3
|
+
import { QuoteContext_QuoteFragment } from '../fragments/quoteFragment';
|
|
4
|
+
export declare const useQuoteQuantities_PriceListChargeFragment: import("gql.tada").TadaDocumentNode<{
|
|
5
|
+
feature: {
|
|
6
|
+
id: string;
|
|
7
|
+
} | null;
|
|
8
|
+
id: string;
|
|
9
|
+
quantityMax: number | null;
|
|
10
|
+
quantityMin: number | null;
|
|
11
|
+
selfServiceQuantity: boolean | null;
|
|
12
|
+
}, {}, {
|
|
13
|
+
fragment: "useQuoteQuantities_PriceListChargeFragment";
|
|
14
|
+
on: "PriceListCharge";
|
|
15
|
+
masked: true;
|
|
16
|
+
}>;
|
|
3
17
|
export declare const useQuoteQuantities_SubscriptionFragment: import("gql.tada").TadaDocumentNode<{
|
|
4
18
|
currentCharges: {
|
|
5
19
|
id: string | null;
|
|
@@ -10,7 +24,9 @@ export declare const useQuoteQuantities_SubscriptionFragment: import("gql.tada")
|
|
|
10
24
|
on: "Subscription";
|
|
11
25
|
masked: true;
|
|
12
26
|
}>;
|
|
13
|
-
export declare const useQuoteQuantities: ({ quantityEditableCharges: maskedQuantityEditableCharges, }: {
|
|
27
|
+
export declare const useQuoteQuantities: ({ selectedPriceList, quote, quantityEditableCharges: maskedQuantityEditableCharges, }: {
|
|
28
|
+
selectedPriceList: PriceList;
|
|
29
|
+
quote: ResultOf<typeof QuoteContext_QuoteFragment> | null | undefined;
|
|
14
30
|
quantityEditableCharges: FragmentOf<typeof useQuoteQuantities_PriceListChargeFragment>[] | undefined;
|
|
15
31
|
}) => {
|
|
16
32
|
onChangeQuantity: (priceListChargeId: string, quantity: number) => void;
|