@bunnyapp/components 1.6.0-beta.1 → 1.6.0-beta.11
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/README.md +71 -0
- package/dist/cjs/index.js +2811 -2381
- package/dist/cjs/types/src/components/Checkout/Checkout.d.ts +18 -3
- package/dist/cjs/types/src/components/Checkout/QuoteCheckout.d.ts +77 -3
- package/dist/cjs/types/src/components/Checkout/checkoutUtils.d.ts +4 -2
- package/dist/cjs/types/src/components/FeatureUsageGraph.d.ts +4 -3
- package/dist/cjs/types/src/components/QuoteProvider/QuoteProvider.d.ts +4 -0
- package/dist/cjs/types/src/components/{QuoteProvider.d.ts → QuoteProvider/context/QuoteContext.d.ts} +4 -6
- package/dist/cjs/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +142 -0
- package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuoteCreate.d.ts +19 -0
- package/dist/{esm/types/src/hooks/quotes → cjs/types/src/components/QuoteProvider/hooks}/useQuoteQuantities.d.ts +4 -2
- package/dist/cjs/types/src/{graphql → components/QuoteProvider}/mutations/quoteChargeUpdate.d.ts +12 -2
- package/dist/cjs/types/src/components/QuoteProvider/queries/getQuote.d.ts +16 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/PriceListGrid.d.ts +2 -1
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput.d.ts +2 -2
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/BillingPeriodSelector.d.ts +3 -2
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanAddonsCard.d.ts +2 -1
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PriceListGridDesktop.d.ts +3 -2
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/util.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/PriceListCardPriceDescription.d.ts +6 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/utils/hasMultipleRecurringCharges.d.ts +2 -0
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/QuantityChangeGridRow.d.ts +2 -3
- package/dist/{esm/types/src/components/Subscriptions/QuantityDrawerContainer.d.ts → cjs/types/src/components/Subscriptions/quantityChangeDrawer/QuantityDrawer.d.ts} +4 -4
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/QuantityInput.d.ts +3 -11
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/fragments/QuantityDrawerQuoteFragment.d.ts +10 -0
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/hooks/useQuoteQueryData.d.ts +3 -0
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/hooks/useSetQuoteQueryData.d.ts +5 -0
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/quantityChangeDrawerDesktop/QuantityChangeDrawerDesktop.d.ts +0 -2
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/queries/quoteChargeCreate.d.ts +23 -0
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/queries/quoteChargeUpdate.d.ts +12 -0
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/queries/quoteSubscriptionUpdate.d.ts +22 -0
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/utils/formatDateForApi.d.ts +2 -0
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/{utils.d.ts → utils/utils.d.ts} +0 -9
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionsNavigation.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +0 -2
- package/dist/cjs/types/src/components/Subscriptions/tieredDisplayDropdown/TieredDisplayDropdown.d.ts +9 -0
- package/dist/cjs/types/src/components/Subscriptions/tieredDisplayDropdown/util.d.ts +9 -0
- package/dist/cjs/types/src/components/TaxationForm.d.ts +3 -3
- package/dist/cjs/types/src/components/priceListPricing/PricingTooltip.d.ts +40 -0
- package/dist/cjs/types/src/components/priceListPricing/components/ChargePriceTiers.d.ts +23 -0
- package/dist/cjs/types/src/components/priceListPricing/components/PriceTierPrice.d.ts +7 -0
- package/dist/cjs/types/src/components/priceListPricing/components/PriceTierRow.d.ts +13 -0
- package/dist/cjs/types/src/components/priceListPricing/misc/consts.d.ts +1 -0
- package/dist/cjs/types/src/components/priceListPricing/types/PriceTier.d.ts +4 -0
- package/dist/cjs/types/src/components/priceListPricing/utils/getPricingModelDescription.d.ts +2 -0
- package/dist/cjs/types/src/components/priceListPricing/utils/getPricingModelTitle.d.ts +2 -0
- package/dist/cjs/types/src/components/priceListPricing/utils/hasPriceTiers.d.ts +9 -0
- package/dist/cjs/types/src/components/priceListPricing/utils/priceListChargeUtil.ts/getFirstTierPrice.d.ts +7 -0
- package/dist/cjs/types/src/enums/SubscriptionState.d.ts +9 -0
- package/dist/cjs/types/src/graphql/QuoteRequests.d.ts +0 -5
- package/dist/cjs/types/src/graphql/mutations/quoteChargeDelete.d.ts +11 -2
- package/dist/cjs/types/src/graphql/queries/getQuote.d.ts +29 -2
- package/dist/cjs/types/src/graphql-codegen/exportedScalarTypes.d.ts +6 -0
- package/dist/cjs/types/src/index.d.ts +2 -2
- package/dist/cjs/types/src/utils/addonPlanUtils.d.ts +2 -1
- package/dist/cjs/types/src/utils/featureAddonUtils.d.ts +16 -1
- package/dist/cjs/types/src/utils/formatCurrency.d.ts +1 -0
- package/dist/cjs/types/src/utils/priceListUtils/doesPriceListHaveFlatFeeCharges.d.ts +7 -0
- package/dist/cjs/types/src/utils/priceListUtils/getPrice.d.ts +5 -0
- package/dist/cjs/types/src/utils/priceListUtils/priceDescription.d.ts +6 -0
- package/dist/cjs/types/src/utils/priceListUtils/priceListPriceText.d.ts +12 -0
- package/dist/cjs/types/src/utils/pricePickerUtils.d.ts +3 -3
- package/dist/esm/index.js +2849 -2419
- package/dist/esm/types/src/components/Checkout/Checkout.d.ts +18 -3
- package/dist/esm/types/src/components/Checkout/QuoteCheckout.d.ts +77 -3
- package/dist/esm/types/src/components/Checkout/checkoutUtils.d.ts +4 -2
- package/dist/esm/types/src/components/FeatureUsageGraph.d.ts +4 -3
- package/dist/esm/types/src/components/QuoteProvider/QuoteProvider.d.ts +4 -0
- package/dist/esm/types/src/components/{QuoteProvider.d.ts → QuoteProvider/context/QuoteContext.d.ts} +4 -6
- package/dist/esm/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +142 -0
- package/dist/esm/types/src/components/QuoteProvider/hooks/useQuoteCreate.d.ts +19 -0
- package/dist/{cjs/types/src/hooks/quotes → esm/types/src/components/QuoteProvider/hooks}/useQuoteQuantities.d.ts +4 -2
- package/dist/esm/types/src/{graphql → components/QuoteProvider}/mutations/quoteChargeUpdate.d.ts +12 -2
- package/dist/esm/types/src/components/QuoteProvider/queries/getQuote.d.ts +16 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/PriceListGrid.d.ts +2 -1
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput.d.ts +2 -2
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/BillingPeriodSelector.d.ts +3 -2
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanAddonsCard.d.ts +2 -1
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PriceListGridDesktop.d.ts +3 -2
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/util.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/PriceListCardPriceDescription.d.ts +6 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/utils/hasMultipleRecurringCharges.d.ts +2 -0
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/QuantityChangeGridRow.d.ts +2 -3
- package/dist/{cjs/types/src/components/Subscriptions/QuantityDrawerContainer.d.ts → esm/types/src/components/Subscriptions/quantityChangeDrawer/QuantityDrawer.d.ts} +4 -4
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/QuantityInput.d.ts +3 -11
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/fragments/QuantityDrawerQuoteFragment.d.ts +10 -0
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/hooks/useQuoteQueryData.d.ts +3 -0
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/hooks/useSetQuoteQueryData.d.ts +5 -0
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/quantityChangeDrawerDesktop/QuantityChangeDrawerDesktop.d.ts +0 -2
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/queries/quoteChargeCreate.d.ts +23 -0
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/queries/quoteChargeUpdate.d.ts +12 -0
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/queries/quoteSubscriptionUpdate.d.ts +22 -0
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/utils/formatDateForApi.d.ts +2 -0
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/{utils.d.ts → utils/utils.d.ts} +0 -9
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/SubscriptionsNavigation.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +0 -2
- package/dist/esm/types/src/components/Subscriptions/tieredDisplayDropdown/TieredDisplayDropdown.d.ts +9 -0
- package/dist/esm/types/src/components/Subscriptions/tieredDisplayDropdown/util.d.ts +9 -0
- package/dist/esm/types/src/components/TaxationForm.d.ts +3 -3
- package/dist/esm/types/src/components/priceListPricing/PricingTooltip.d.ts +40 -0
- package/dist/esm/types/src/components/priceListPricing/components/ChargePriceTiers.d.ts +23 -0
- package/dist/esm/types/src/components/priceListPricing/components/PriceTierPrice.d.ts +7 -0
- package/dist/esm/types/src/components/priceListPricing/components/PriceTierRow.d.ts +13 -0
- package/dist/esm/types/src/components/priceListPricing/misc/consts.d.ts +1 -0
- package/dist/esm/types/src/components/priceListPricing/types/PriceTier.d.ts +4 -0
- package/dist/esm/types/src/components/priceListPricing/utils/getPricingModelDescription.d.ts +2 -0
- package/dist/esm/types/src/components/priceListPricing/utils/getPricingModelTitle.d.ts +2 -0
- package/dist/esm/types/src/components/priceListPricing/utils/hasPriceTiers.d.ts +9 -0
- package/dist/esm/types/src/components/priceListPricing/utils/priceListChargeUtil.ts/getFirstTierPrice.d.ts +7 -0
- package/dist/esm/types/src/enums/SubscriptionState.d.ts +9 -0
- package/dist/esm/types/src/graphql/QuoteRequests.d.ts +0 -5
- package/dist/esm/types/src/graphql/mutations/quoteChargeDelete.d.ts +11 -2
- package/dist/esm/types/src/graphql/queries/getQuote.d.ts +29 -2
- package/dist/esm/types/src/graphql-codegen/exportedScalarTypes.d.ts +6 -0
- package/dist/esm/types/src/index.d.ts +2 -2
- package/dist/esm/types/src/utils/addonPlanUtils.d.ts +2 -1
- package/dist/esm/types/src/utils/featureAddonUtils.d.ts +16 -1
- package/dist/esm/types/src/utils/formatCurrency.d.ts +1 -0
- package/dist/esm/types/src/utils/priceListUtils/doesPriceListHaveFlatFeeCharges.d.ts +7 -0
- package/dist/esm/types/src/utils/priceListUtils/getPrice.d.ts +5 -0
- package/dist/esm/types/src/utils/priceListUtils/priceDescription.d.ts +6 -0
- package/dist/esm/types/src/utils/priceListUtils/priceListPriceText.d.ts +12 -0
- package/dist/esm/types/src/utils/pricePickerUtils.d.ts +3 -3
- package/package.json +2 -2
- package/dist/cjs/types/src/components/Subscriptions/TieredDisplayDropdown.d.ts +0 -8
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCardPriceDescription.d.ts +0 -13
- package/dist/cjs/types/src/hooks/quotes/useQuoteCreate.d.ts +0 -9
- package/dist/esm/types/src/components/Subscriptions/TieredDisplayDropdown.d.ts +0 -8
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCardPriceDescription.d.ts +0 -13
- package/dist/esm/types/src/hooks/quotes/useQuoteCreate.d.ts +0 -9
- /package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/{PriceListCardDesktop.d.ts → priceListCardDesktop/PriceListCardDesktop.d.ts} +0 -0
- /package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/{PriceListCardDesktop.d.ts → priceListCardDesktop/PriceListCardDesktop.d.ts} +0 -0
|
@@ -1,13 +1,28 @@
|
|
|
1
|
-
import { FormattedInvoice
|
|
1
|
+
import { FormattedInvoice } from '@bunnyapp/common';
|
|
2
|
+
import { FragmentOf } from 'gql.tada';
|
|
3
|
+
export declare const Checkout_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
4
|
+
id: string | null;
|
|
5
|
+
accountId: string;
|
|
6
|
+
formattedQuote: {
|
|
7
|
+
html: string | null;
|
|
8
|
+
} | null;
|
|
9
|
+
[$tada.fragmentRefs]: {
|
|
10
|
+
QuoteCheckout_QuoteFragment: "Quote";
|
|
11
|
+
};
|
|
12
|
+
}, {}, {
|
|
13
|
+
fragment: "Checkout_QuoteFragment";
|
|
14
|
+
on: "Quote";
|
|
15
|
+
masked: true;
|
|
16
|
+
}>;
|
|
2
17
|
type CheckoutProps = {
|
|
3
18
|
invoice?: FormattedInvoice;
|
|
4
19
|
onCancel: () => void;
|
|
5
20
|
onFail: (error: any) => void;
|
|
6
21
|
onSuccess: () => void;
|
|
7
22
|
open: boolean;
|
|
8
|
-
quote?:
|
|
23
|
+
quote?: FragmentOf<typeof Checkout_QuoteFragment>;
|
|
9
24
|
token?: string;
|
|
10
25
|
isUpdatingQuote: boolean;
|
|
11
26
|
};
|
|
12
|
-
declare const Checkout: ({ onCancel, onSuccess, onFail, invoice, open, quote, isUpdatingQuote, }: CheckoutProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
27
|
+
declare const Checkout: ({ onCancel, onSuccess, onFail, invoice, open, quote: maskedQuote, isUpdatingQuote, }: CheckoutProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
13
28
|
export default Checkout;
|
|
@@ -1,12 +1,86 @@
|
|
|
1
|
-
import { Account, PaymentMethod,
|
|
1
|
+
import { Account, PaymentMethod, TaxationRequiredAccountFields } from '@bunnyapp/common';
|
|
2
|
+
import { FragmentOf } from 'gql.tada';
|
|
2
3
|
import { InvoiceQuoteParentProps } from '../PaymentForm/PaymentFormTypes';
|
|
4
|
+
export declare const QuoteCheckout_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
5
|
+
id: string | null;
|
|
6
|
+
accountId: string;
|
|
7
|
+
amountDue: number | null;
|
|
8
|
+
amount: number;
|
|
9
|
+
quoteChanges: ({
|
|
10
|
+
id: string | null;
|
|
11
|
+
charges: {
|
|
12
|
+
kind: "COUPON" | "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
|
|
13
|
+
coupon: {
|
|
14
|
+
couponCode: string;
|
|
15
|
+
} | null;
|
|
16
|
+
}[];
|
|
17
|
+
}[] & {
|
|
18
|
+
currencyId: string;
|
|
19
|
+
id: string | null;
|
|
20
|
+
kind: "COUPON" | "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
|
|
21
|
+
charges: {
|
|
22
|
+
subtotal: number | null;
|
|
23
|
+
amountsByPeriod: {
|
|
24
|
+
amount: number | null;
|
|
25
|
+
startDate: unknown;
|
|
26
|
+
}[] | null;
|
|
27
|
+
amount: number | null;
|
|
28
|
+
billingPeriod: "ONCE" | "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "ANNUAL" | null;
|
|
29
|
+
currencyId: string;
|
|
30
|
+
feature: {
|
|
31
|
+
unitName: string | null;
|
|
32
|
+
} | null;
|
|
33
|
+
id: string | null;
|
|
34
|
+
name: string | null;
|
|
35
|
+
priceListCharge: {
|
|
36
|
+
id: string;
|
|
37
|
+
} | null;
|
|
38
|
+
priceList: {
|
|
39
|
+
id: string;
|
|
40
|
+
} | null;
|
|
41
|
+
coupon: {
|
|
42
|
+
couponCode: string;
|
|
43
|
+
} | null;
|
|
44
|
+
quantity: number | null;
|
|
45
|
+
kind: "COUPON" | "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
|
|
46
|
+
}[];
|
|
47
|
+
priceList: {
|
|
48
|
+
id: string;
|
|
49
|
+
plan: {
|
|
50
|
+
name: string;
|
|
51
|
+
} | null;
|
|
52
|
+
product: {
|
|
53
|
+
name: string;
|
|
54
|
+
} | null;
|
|
55
|
+
} | null;
|
|
56
|
+
}[]) | null;
|
|
57
|
+
smallUnitAmountDue: number | null;
|
|
58
|
+
currencyId: string;
|
|
59
|
+
payableId: string | null;
|
|
60
|
+
periodAmount: number | null;
|
|
61
|
+
subtotal: number;
|
|
62
|
+
taxAmount: number;
|
|
63
|
+
startDate: unknown;
|
|
64
|
+
formattedQuote: {
|
|
65
|
+
html: string | null;
|
|
66
|
+
} | null;
|
|
67
|
+
amountsByPeriod: {
|
|
68
|
+
amount: number | null;
|
|
69
|
+
startDate: unknown;
|
|
70
|
+
}[];
|
|
71
|
+
kind: "COUPON" | "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
|
|
72
|
+
}, {}, {
|
|
73
|
+
fragment: "QuoteCheckout_QuoteFragment";
|
|
74
|
+
on: "Quote";
|
|
75
|
+
masked: true;
|
|
76
|
+
}>;
|
|
3
77
|
interface QuoteCheckoutProps extends InvoiceQuoteParentProps {
|
|
4
78
|
account: Account;
|
|
5
|
-
quote:
|
|
79
|
+
quote: FragmentOf<typeof QuoteCheckout_QuoteFragment>;
|
|
6
80
|
taxationRequiredAccountFields?: TaxationRequiredAccountFields | null;
|
|
7
81
|
token?: string;
|
|
8
82
|
storedPaymentMethod?: PaymentMethod;
|
|
9
83
|
onRecalculateTaxes: () => void;
|
|
10
84
|
}
|
|
11
|
-
declare const QuoteCheckout: ({ account, onSuccess, onFail, quote, taxationRequiredAccountFields, onRecalculateTaxes, }: QuoteCheckoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
85
|
+
declare const QuoteCheckout: ({ account, onSuccess, onFail, quote: maskedQuote, taxationRequiredAccountFields, onRecalculateTaxes, }: QuoteCheckoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
86
|
export default QuoteCheckout;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { FeatureUsage, SubscriptionCharge } from
|
|
2
|
-
declare const FeatureUsageGraph: ({ charge, featureUsage, }: {
|
|
1
|
+
import { FeatureUsage, SubscriptionCharge } from '@bunnyapp/common';
|
|
2
|
+
declare const FeatureUsageGraph: ({ charge, featureUsage, useAreaChart, }: {
|
|
3
3
|
charge: SubscriptionCharge;
|
|
4
4
|
featureUsage: FeatureUsage;
|
|
5
|
-
|
|
5
|
+
useAreaChart?: boolean;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element | "no usage" | null;
|
|
6
7
|
export default FeatureUsageGraph;
|
package/dist/cjs/types/src/components/{QuoteProvider.d.ts → QuoteProvider/context/QuoteContext.d.ts}
RENAMED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { PriceList
|
|
1
|
+
import { PriceList } from '@bunnyapp/common';
|
|
2
|
+
import { ResultOf } from 'gql.tada';
|
|
3
|
+
import { QuoteContext_QuoteFragment } from '../fragments/quoteFragment';
|
|
2
4
|
export type QuoteContextValues = {
|
|
3
|
-
quote:
|
|
5
|
+
quote: ResultOf<typeof QuoteContext_QuoteFragment> | null | undefined;
|
|
4
6
|
selectedPriceList: PriceList | undefined;
|
|
5
7
|
isQuotePending: boolean;
|
|
6
8
|
isAddonPlanLoading: boolean;
|
|
@@ -15,7 +17,3 @@ export type QuoteContextValues = {
|
|
|
15
17
|
onChangeQuantity: (priceListChargeId: string, quantity: number) => void;
|
|
16
18
|
};
|
|
17
19
|
export declare const QuoteContext: import("react").Context<QuoteContextValues>;
|
|
18
|
-
declare function QuoteProvider({ children }: {
|
|
19
|
-
children: React.ReactNode;
|
|
20
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
export default QuoteProvider;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
export declare const QuoteFields_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
2
|
+
accountId: string;
|
|
3
|
+
amount: number;
|
|
4
|
+
amountDue: number | null;
|
|
5
|
+
smallUnitAmountDue: number | null;
|
|
6
|
+
currencyId: string;
|
|
7
|
+
id: string | null;
|
|
8
|
+
payableId: string | null;
|
|
9
|
+
periodAmount: number | null;
|
|
10
|
+
subtotal: number;
|
|
11
|
+
taxAmount: number;
|
|
12
|
+
startDate: unknown;
|
|
13
|
+
formattedQuote: {
|
|
14
|
+
html: string | null;
|
|
15
|
+
} | null;
|
|
16
|
+
amountsByPeriod: {
|
|
17
|
+
amount: number | null;
|
|
18
|
+
startDate: unknown;
|
|
19
|
+
}[];
|
|
20
|
+
kind: "COUPON" | "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
|
|
21
|
+
quoteChanges: {
|
|
22
|
+
currencyId: string;
|
|
23
|
+
id: string | null;
|
|
24
|
+
kind: "COUPON" | "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
|
|
25
|
+
charges: {
|
|
26
|
+
subtotal: number | null;
|
|
27
|
+
amountsByPeriod: {
|
|
28
|
+
amount: number | null;
|
|
29
|
+
startDate: unknown;
|
|
30
|
+
}[] | null;
|
|
31
|
+
amount: number | null;
|
|
32
|
+
billingPeriod: "ONCE" | "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "ANNUAL" | null;
|
|
33
|
+
currencyId: string;
|
|
34
|
+
feature: {
|
|
35
|
+
unitName: string | null;
|
|
36
|
+
} | null;
|
|
37
|
+
id: string | null;
|
|
38
|
+
name: string | null;
|
|
39
|
+
priceListCharge: {
|
|
40
|
+
id: string;
|
|
41
|
+
} | null;
|
|
42
|
+
priceList: {
|
|
43
|
+
id: string;
|
|
44
|
+
} | null;
|
|
45
|
+
coupon: {
|
|
46
|
+
couponCode: string;
|
|
47
|
+
} | null;
|
|
48
|
+
quantity: number | null;
|
|
49
|
+
kind: "COUPON" | "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
|
|
50
|
+
}[];
|
|
51
|
+
priceList: {
|
|
52
|
+
id: string;
|
|
53
|
+
plan: {
|
|
54
|
+
name: string;
|
|
55
|
+
} | null;
|
|
56
|
+
product: {
|
|
57
|
+
name: string;
|
|
58
|
+
} | null;
|
|
59
|
+
} | null;
|
|
60
|
+
}[] | null;
|
|
61
|
+
}, {}, {
|
|
62
|
+
fragment: "QuoteFields_QuoteFragment";
|
|
63
|
+
on: "Quote";
|
|
64
|
+
masked: false;
|
|
65
|
+
}>;
|
|
66
|
+
/**
|
|
67
|
+
* Central quote fragment for QuoteProvider context.
|
|
68
|
+
*
|
|
69
|
+
* This fragment aggregates all child component fragments to ensure the QuoteProvider
|
|
70
|
+
* fetches all required quote data upfront. When a component needs specific quote fields,
|
|
71
|
+
* add its fragment here to maintain type safety and avoid over-fetching.
|
|
72
|
+
*
|
|
73
|
+
* Pattern: Fragment Composition
|
|
74
|
+
* - Components define their data needs via fragments
|
|
75
|
+
* - Provider composes these fragments into a single query
|
|
76
|
+
* - Type safety ensures all required fields are fetched
|
|
77
|
+
*/
|
|
78
|
+
export declare const QuoteContext_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
79
|
+
accountId: string;
|
|
80
|
+
amount: number;
|
|
81
|
+
amountDue: number | null;
|
|
82
|
+
smallUnitAmountDue: number | null;
|
|
83
|
+
currencyId: string;
|
|
84
|
+
id: string | null;
|
|
85
|
+
payableId: string | null;
|
|
86
|
+
periodAmount: number | null;
|
|
87
|
+
subtotal: number;
|
|
88
|
+
taxAmount: number;
|
|
89
|
+
startDate: unknown;
|
|
90
|
+
formattedQuote: {
|
|
91
|
+
html: string | null;
|
|
92
|
+
} | null;
|
|
93
|
+
amountsByPeriod: {
|
|
94
|
+
amount: number | null;
|
|
95
|
+
startDate: unknown;
|
|
96
|
+
}[];
|
|
97
|
+
kind: "COUPON" | "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
|
|
98
|
+
quoteChanges: {
|
|
99
|
+
currencyId: string;
|
|
100
|
+
id: string | null;
|
|
101
|
+
kind: "COUPON" | "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
|
|
102
|
+
charges: {
|
|
103
|
+
subtotal: number | null;
|
|
104
|
+
amountsByPeriod: {
|
|
105
|
+
amount: number | null;
|
|
106
|
+
startDate: unknown;
|
|
107
|
+
}[] | null;
|
|
108
|
+
amount: number | null;
|
|
109
|
+
billingPeriod: "ONCE" | "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "ANNUAL" | null;
|
|
110
|
+
currencyId: string;
|
|
111
|
+
feature: {
|
|
112
|
+
unitName: string | null;
|
|
113
|
+
} | null;
|
|
114
|
+
id: string | null;
|
|
115
|
+
name: string | null;
|
|
116
|
+
priceListCharge: {
|
|
117
|
+
id: string;
|
|
118
|
+
} | null;
|
|
119
|
+
priceList: {
|
|
120
|
+
id: string;
|
|
121
|
+
} | null;
|
|
122
|
+
coupon: {
|
|
123
|
+
couponCode: string;
|
|
124
|
+
} | null;
|
|
125
|
+
quantity: number | null;
|
|
126
|
+
kind: "COUPON" | "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
|
|
127
|
+
}[];
|
|
128
|
+
priceList: {
|
|
129
|
+
id: string;
|
|
130
|
+
plan: {
|
|
131
|
+
name: string;
|
|
132
|
+
} | null;
|
|
133
|
+
product: {
|
|
134
|
+
name: string;
|
|
135
|
+
} | null;
|
|
136
|
+
} | null;
|
|
137
|
+
}[] | null;
|
|
138
|
+
}, {}, {
|
|
139
|
+
fragment: "QuoteContext_QuoteFragment";
|
|
140
|
+
on: "Quote";
|
|
141
|
+
masked: true;
|
|
142
|
+
}>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PriceList, Subscription } from '@bunnyapp/common';
|
|
2
|
+
export declare const useQuoteCreate: ({ upgradingSubscription, selectedPriceList, token, }: {
|
|
3
|
+
upgradingSubscription?: Subscription;
|
|
4
|
+
selectedPriceList?: PriceList;
|
|
5
|
+
token?: string;
|
|
6
|
+
}) => {
|
|
7
|
+
quote: {
|
|
8
|
+
[$tada.fragmentRefs]: {
|
|
9
|
+
QuoteContext_QuoteFragment: "Quote";
|
|
10
|
+
};
|
|
11
|
+
} | {
|
|
12
|
+
[$tada.fragmentRefs]: {
|
|
13
|
+
QuoteContext_QuoteFragment: "Quote";
|
|
14
|
+
} & {
|
|
15
|
+
FormattedQuoteFields_QuoteFragment: "Quote";
|
|
16
|
+
};
|
|
17
|
+
} | null | undefined;
|
|
18
|
+
isQuotePending: boolean;
|
|
19
|
+
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { PriceList
|
|
1
|
+
import { PriceList } from '@bunnyapp/common';
|
|
2
|
+
import { ResultOf } from 'gql.tada';
|
|
3
|
+
import { QuoteContext_QuoteFragment } from '../fragments/quoteFragment';
|
|
2
4
|
export declare const useQuoteQuantities: ({ selectedPriceList, quote, }: {
|
|
3
5
|
selectedPriceList: PriceList;
|
|
4
|
-
quote
|
|
6
|
+
quote: ResultOf<typeof QuoteContext_QuoteFragment> | null | undefined;
|
|
5
7
|
}) => {
|
|
6
8
|
onChangeQuantity: (priceListChargeId: string, quantity: number) => void;
|
|
7
9
|
getFeatureQuantity: (featureId: string) => number | undefined;
|
package/dist/cjs/types/src/{graphql → components/QuoteProvider}/mutations/quoteChargeUpdate.d.ts
RENAMED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { QuoteCharge } from '@bunnyapp/common';
|
|
2
1
|
declare const quoteChargeUpdate: ({ discount, name, price, quantity, quoteChargeId, startDate, subtotal, apiHost, token, }: {
|
|
3
2
|
discount?: number;
|
|
4
3
|
name?: string;
|
|
@@ -9,5 +8,16 @@ declare const quoteChargeUpdate: ({ discount, name, price, quantity, quoteCharge
|
|
|
9
8
|
subtotal?: number;
|
|
10
9
|
apiHost: string;
|
|
11
10
|
token: string;
|
|
12
|
-
}) => Promise<
|
|
11
|
+
}) => Promise<{
|
|
12
|
+
quoteChange: {
|
|
13
|
+
id: string | null;
|
|
14
|
+
quoteId: string;
|
|
15
|
+
quote: {
|
|
16
|
+
[$tada.fragmentRefs]: {
|
|
17
|
+
QuoteContext_QuoteFragment: "Quote";
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
id: string | null;
|
|
22
|
+
} | null | undefined>;
|
|
13
23
|
export default quoteChargeUpdate;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const getQuote: ({ id, token, apiHost, includeHtmlField, }: {
|
|
2
|
+
id: string;
|
|
3
|
+
token?: string;
|
|
4
|
+
apiHost: string;
|
|
5
|
+
includeHtmlField?: boolean;
|
|
6
|
+
}) => Promise<{
|
|
7
|
+
[$tada.fragmentRefs]: {
|
|
8
|
+
QuoteContext_QuoteFragment: "Quote";
|
|
9
|
+
};
|
|
10
|
+
} | {
|
|
11
|
+
[$tada.fragmentRefs]: {
|
|
12
|
+
QuoteContext_QuoteFragment: "Quote";
|
|
13
|
+
} & {
|
|
14
|
+
FormattedQuoteFields_QuoteFragment: "Quote";
|
|
15
|
+
};
|
|
16
|
+
} | null>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { BillingPeriod
|
|
1
|
+
import { BillingPeriod } from '@/graphql-codegen/exportedScalarTypes';
|
|
2
|
+
import { PriceList, PriceListChangeOptions, Product, Subscription } from '@bunnyapp/common';
|
|
2
3
|
import { Dispatch, SetStateAction } from 'react';
|
|
3
4
|
type PriceListGridProps = {
|
|
4
5
|
availablePriceLists: PriceList[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PriceListCharge } from '@bunnyapp/common';
|
|
2
|
-
declare const CheckoutBarInput: ({ disabled,
|
|
2
|
+
declare const CheckoutBarInput: ({ disabled, priceListCharge, quantity, onQuantityChanged, }: {
|
|
3
3
|
disabled?: boolean;
|
|
4
|
-
|
|
4
|
+
priceListCharge: PriceListCharge;
|
|
5
5
|
quantity: number;
|
|
6
6
|
onQuantityChanged: (quantity: number) => void;
|
|
7
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Product } from '@bunnyapp/common';
|
|
2
|
+
import { BillingPeriod } from '@/graphql-codegen/exportedScalarTypes';
|
|
3
|
+
type PeriodMonths = number;
|
|
3
4
|
declare const BillingPeriodSelector: ({ availableBillingPeriods, onChangeBillingPeriod, products, selectedBillingPeriod, selectedProduct, onChangeProduct, }: {
|
|
4
5
|
availableBillingPeriods?: PeriodMonths[];
|
|
5
6
|
onChangeBillingPeriod: (billingPeriod: BillingPeriod) => void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Plan, PriceList, Subscription } from '@bunnyapp/common';
|
|
2
|
+
import { BillingPeriod } from '@/graphql-codegen/exportedScalarTypes';
|
|
2
3
|
type PlanAddonsCardProps = {
|
|
3
4
|
selectedPriceList: PriceList;
|
|
4
5
|
subscriptions: Subscription[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PriceList, PriceListChangeOptions, Product, Subscription } from '@bunnyapp/common';
|
|
2
2
|
import { Dispatch, SetStateAction } from 'react';
|
|
3
|
+
import { BillingPeriod } from '@/graphql-codegen/exportedScalarTypes';
|
|
3
4
|
type PriceListGridDesktopProps = {
|
|
4
5
|
availablePriceLists: PriceList[];
|
|
5
6
|
priceListChangeOptions?: PriceListChangeOptions;
|
|
@@ -9,7 +10,7 @@ type PriceListGridDesktopProps = {
|
|
|
9
10
|
setPriceListStart: Dispatch<SetStateAction<number>>;
|
|
10
11
|
subscriptions: Subscription[];
|
|
11
12
|
trialRemainingDays: number;
|
|
12
|
-
selectedBillingPeriod?: BillingPeriod
|
|
13
|
+
selectedBillingPeriod?: BillingPeriod;
|
|
13
14
|
onClickPriceListCard: (priceList: PriceList) => void;
|
|
14
15
|
};
|
|
15
16
|
declare const PriceListGridDesktop: ({ availablePriceLists, priceListChangeOptions, priceListStart, selectedPriceList, selectedProduct, setPriceListStart, subscriptions, trialRemainingDays, selectedBillingPeriod, onClickPriceListCard, }: PriceListGridDesktopProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/util.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export declare const filterUniqueFeatures: ({ availablePriceLists, }: {
|
|
|
57
57
|
showPriceAsMonthly?: boolean;
|
|
58
58
|
sku?: string;
|
|
59
59
|
trialAllowed: boolean;
|
|
60
|
-
trialExpirationAction?: "
|
|
60
|
+
trialExpirationAction?: "ACTIVATE" | "CANCEL";
|
|
61
61
|
trialLengthDays?: number;
|
|
62
62
|
updatedAt: string;
|
|
63
63
|
addonPlans?: import("@bunnyapp/common").Plan[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Feature, PriceList } from '@bunnyapp/common';
|
|
2
|
+
declare const PriceListCardPriceDescription: ({ feature, priceList, }: {
|
|
3
|
+
feature?: Feature;
|
|
4
|
+
priceList: PriceList;
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
export default PriceListCardPriceDescription;
|
package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/QuantityChangeGridRow.d.ts
CHANGED
|
@@ -39,10 +39,9 @@ export declare const QuantityChangeGridRow_SubscriptionFragment: import("gql.tad
|
|
|
39
39
|
on: "Subscription";
|
|
40
40
|
masked: true;
|
|
41
41
|
}>;
|
|
42
|
-
declare const QuantityChangeGridRow: ({
|
|
43
|
-
chargeIndex: number;
|
|
42
|
+
declare const QuantityChangeGridRow: ({ editingQuote, editingQuoteId, setEditingQuoteData, subscription: maskedSubscription, subscriptionCharge: maskedSubscriptionCharge, setUpdatingChargeQuantityId, updatingChargeQuantityId, setErrorUpdatingQuantity, }: {
|
|
44
43
|
editingQuote?: Quote;
|
|
45
|
-
|
|
44
|
+
editingQuoteId?: string;
|
|
46
45
|
setEditingQuoteData: (value: any) => void;
|
|
47
46
|
subscription: FragmentOf<typeof QuantityChangeGridRow_SubscriptionFragment>;
|
|
48
47
|
subscriptionCharge: FragmentOf<typeof QuantityChangeGridRow_SubscriptionChargeFragment>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { FragmentOf } from 'gql.tada';
|
|
2
|
-
import { QuantityDrawerDesktop_SubscriptionFragment } from './
|
|
2
|
+
import { QuantityDrawerDesktop_SubscriptionFragment } from './quantityChangeDrawerDesktop/QuantityChangeDrawerDesktop';
|
|
3
3
|
export type EditingQuoteDataType = {
|
|
4
4
|
id: string;
|
|
5
5
|
isTrial: boolean;
|
|
6
6
|
};
|
|
7
|
-
interface
|
|
7
|
+
interface QuantityDrawerProps {
|
|
8
8
|
subscriptions: (FragmentOf<typeof QuantityDrawerDesktop_SubscriptionFragment> | null)[];
|
|
9
9
|
quantityDrawerOpen: boolean;
|
|
10
10
|
setQuantityDrawerOpen: (open: boolean) => void;
|
|
11
11
|
handlePortalErrors?: (errors: any) => void;
|
|
12
12
|
setShowInactive: (showInactive: boolean) => void;
|
|
13
13
|
}
|
|
14
|
-
declare const
|
|
15
|
-
export
|
|
14
|
+
export declare const QuantityDrawer: ({ subscriptions, quantityDrawerOpen, setQuantityDrawerOpen, handlePortalErrors, setShowInactive, }: QuantityDrawerProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Quote } from '@bunnyapp/common';
|
|
2
|
-
import { FragmentOf
|
|
2
|
+
import { FragmentOf } from 'gql.tada';
|
|
3
3
|
export declare const QuantityInput_SubscriptionChargeFragment: import("gql.tada").TadaDocumentNode<{
|
|
4
4
|
id: string | null;
|
|
5
5
|
quantity: number | null;
|
|
@@ -31,23 +31,15 @@ export declare const QuantityInput_SubscriptionFragment: import("gql.tada").Tada
|
|
|
31
31
|
on: "Subscription";
|
|
32
32
|
masked: true;
|
|
33
33
|
}>;
|
|
34
|
-
|
|
35
|
-
chargeId: string;
|
|
36
|
-
chargeIndex: number;
|
|
37
|
-
quantity: number | undefined;
|
|
38
|
-
subscription: ResultOf<typeof QuantityInput_SubscriptionFragment>;
|
|
39
|
-
subscriptionIndex: number;
|
|
40
|
-
};
|
|
41
|
-
declare const QuantityInput: ({ charge: maskedCharge, chargeIndex, editingQuote, setEditingQuoteData, subscription: maskedSubscription, subscriptionIndex, setUpdatingChargeQuantityId, updatingChargeQuantityId, setErrorUpdatingQuantity, }: {
|
|
34
|
+
declare const QuantityInput: ({ charge: maskedCharge, editingQuote, editingQuoteId, setEditingQuoteData, subscription: maskedSubscription, setUpdatingChargeQuantityId, updatingChargeQuantityId, setErrorUpdatingQuantity, }: {
|
|
42
35
|
charge: FragmentOf<typeof QuantityInput_SubscriptionChargeFragment>;
|
|
43
|
-
chargeIndex: number;
|
|
44
36
|
editingQuote?: Quote;
|
|
37
|
+
editingQuoteId?: string;
|
|
45
38
|
setEditingQuoteData: (editingQuoteData: {
|
|
46
39
|
id: string;
|
|
47
40
|
isTrial: boolean;
|
|
48
41
|
} | undefined) => void;
|
|
49
42
|
subscription: FragmentOf<typeof QuantityInput_SubscriptionFragment>;
|
|
50
|
-
subscriptionIndex: number;
|
|
51
43
|
setUpdatingChargeQuantityId: (updatingChargeQuantityId: string | undefined) => void;
|
|
52
44
|
updatingChargeQuantityId: string | undefined;
|
|
53
45
|
setErrorUpdatingQuantity: (errorUpdatingQuantity: boolean) => void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const QuantityDrawer_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
2
|
+
id: string | null;
|
|
3
|
+
[$tada.fragmentRefs]: {
|
|
4
|
+
Checkout_QuoteFragment: "Quote";
|
|
5
|
+
};
|
|
6
|
+
}, {}, {
|
|
7
|
+
fragment: "QuantityDrawer_QuoteFragment";
|
|
8
|
+
on: "Quote";
|
|
9
|
+
masked: true;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FragmentOf } from 'gql.tada';
|
|
2
|
+
import { QuantityDrawer_QuoteFragment } from '../fragments/QuantityDrawerQuoteFragment';
|
|
3
|
+
export declare const useSetQuoteQueryData: () => {
|
|
4
|
+
setQuoteQueryData: (quoteId: string, maskedQuote: FragmentOf<typeof QuantityDrawer_QuoteFragment> | null) => void;
|
|
5
|
+
};
|
|
@@ -2,10 +2,8 @@ import { Quote } from '@bunnyapp/common';
|
|
|
2
2
|
import { FragmentOf } from 'gql.tada';
|
|
3
3
|
import { EditingQuoteDataType } from '../../SubscriptionsListContainer';
|
|
4
4
|
export declare const QuantityDrawerDesktop_SubscriptionFragment: import("gql.tada").TadaDocumentNode<{
|
|
5
|
-
state: "ACTIVE" | "TRIAL" | "CANCELED" | "EXPIRED" | "TRIAL_EXPIRED" | "PENDING";
|
|
6
5
|
currentCharges: {
|
|
7
6
|
chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
|
|
8
|
-
trial: boolean;
|
|
9
7
|
[$tada.fragmentRefs]: {
|
|
10
8
|
QuantityChangeGridRow_SubscriptionChargeFragment: "SubscriptionCharge";
|
|
11
9
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type QuoteChangeCreateChargeProps = {
|
|
2
|
+
apiHost: string;
|
|
3
|
+
price?: number;
|
|
4
|
+
priceListChargeId?: string;
|
|
5
|
+
quantity?: number;
|
|
6
|
+
quoteChangeId: string;
|
|
7
|
+
startDate: string;
|
|
8
|
+
subscriptionChargeId?: string;
|
|
9
|
+
token?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const quoteChargeCreate: ({ price, priceListChargeId, quantity, quoteChangeId, startDate, subscriptionChargeId, token, apiHost, }: QuoteChangeCreateChargeProps) => Promise<{
|
|
12
|
+
quoteChange: {
|
|
13
|
+
id: string | null;
|
|
14
|
+
quoteId: string;
|
|
15
|
+
quote: {
|
|
16
|
+
[$tada.fragmentRefs]: {
|
|
17
|
+
QuantityDrawer_QuoteFragment: "Quote";
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
id: string | null;
|
|
22
|
+
} | null | undefined>;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const quoteChargeUpdate: (quoteChargeId: string, quantity: number, apiHost: string, token?: string) => Promise<{
|
|
2
|
+
quoteChange: {
|
|
3
|
+
id: string | null;
|
|
4
|
+
quoteId: string;
|
|
5
|
+
quote: {
|
|
6
|
+
[$tada.fragmentRefs]: {
|
|
7
|
+
QuantityDrawer_QuoteFragment: "Quote";
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
id: string | null;
|
|
12
|
+
} | null | undefined>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const quoteSubscriptionUpdate: (subscriptionIds: string[], apiHost: string, token?: string) => Promise<{
|
|
2
|
+
id: string | null;
|
|
3
|
+
quoteChanges: {
|
|
4
|
+
id: string | null;
|
|
5
|
+
priceList: {
|
|
6
|
+
id: string;
|
|
7
|
+
} | null;
|
|
8
|
+
subscription: {
|
|
9
|
+
charges: {
|
|
10
|
+
startDate: unknown;
|
|
11
|
+
endDate: unknown;
|
|
12
|
+
id: string | null;
|
|
13
|
+
priceListCharge: {
|
|
14
|
+
id: string;
|
|
15
|
+
} | null;
|
|
16
|
+
}[] | null;
|
|
17
|
+
} | null;
|
|
18
|
+
}[] | null;
|
|
19
|
+
[$tada.fragmentRefs]: {
|
|
20
|
+
QuantityDrawer_QuoteFragment: "Quote";
|
|
21
|
+
};
|
|
22
|
+
} | null | undefined>;
|