@bunnyapp/components 1.6.0-beta.14 → 1.6.0-beta.16
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 +42 -0
- package/dist/cjs/index.js +2521 -2191
- package/dist/cjs/types/src/components/BunnyProvider.d.ts +0 -2
- package/dist/cjs/types/src/components/Checkout/Checkout.d.ts +1 -1
- package/dist/cjs/types/src/components/Checkout/QuoteCheckout.d.ts +4 -4
- package/dist/cjs/types/src/components/QuoteProvider/fragments/quoteFieldsFragment.d.ts +65 -0
- package/dist/cjs/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +16 -112
- package/dist/cjs/types/src/components/QuoteProvider/hooks/useFeatureQuantities.d.ts +12 -0
- package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuoteQuantities.d.ts +0 -5
- package/dist/cjs/types/src/components/QuoteProvider/mutations/quoteChangeUpdate.d.ts +16 -0
- package/dist/cjs/types/src/components/QuoteProvider/utils/getQuantityFromQuoteChange.d.ts +11 -0
- package/dist/cjs/types/src/components/QuoteProvider/utils/quoteChangeCanBeEdited.d.ts +4 -0
- package/dist/cjs/types/src/components/Subscriptions/Subscriptions.d.ts +1 -5
- package/dist/cjs/types/src/components/Subscriptions/SubscriptionsListContainer.d.ts +0 -4
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/PlanPicker.d.ts +1 -2
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +19 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/planManagerUtils.d.ts +5 -2
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/QuantityChangeGridRow.d.ts +1 -5
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/QuantityDrawer.d.ts +1 -4
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/QuoteChangeSummarySection.d.ts +11 -6
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/context/quoteIdContext.d.ts +5 -0
- package/dist/{esm/types/src/components/Subscriptions/quantityChangeDrawer/fragments/QuantityDrawerQuoteFragment.d.ts → cjs/types/src/components/Subscriptions/quantityChangeDrawer/fragments/QuantityDrawer_QuoteFragment.d.ts} +4 -0
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/hooks/useQuoteQueryData.d.ts +3 -3
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/hooks/useSetQuoteQueryData.d.ts +2 -2
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/quantityChangeDrawerDesktop/QuantityChangeDrawerDesktop.d.ts +1 -6
- package/dist/{esm/types/src/components/Subscriptions/quantityChangeDrawer → cjs/types/src/components/Subscriptions/quantityChangeDrawer/quantityInput}/QuantityInput.d.ts +2 -9
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/quantityInput/fragments/QuantityInput_QuoteFragment.d.ts +27 -0
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/utils/utils.d.ts +3 -2
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionChargeTotal.d.ts +3 -3
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/components/SubscriptionCardActions.d.ts +21 -0
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/queries/getPriceListChangeOptions.d.ts +9 -0
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/utils/filterSubscriptionCharges.d.ts +2 -0
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/utils/sortSubscriptionCharges.d.ts +2 -0
- package/dist/cjs/types/src/graphql/queries/getPriceListChangeOptions.d.ts +3 -4
- package/dist/cjs/types/src/hooks/useAllErrorFormats.d.ts +1 -0
- package/dist/cjs/types/src/hooks/useCreateQueryClient.d.ts +2 -0
- package/dist/cjs/types/src/types/SubscriptionCharge.d.ts +39 -0
- package/dist/cjs/types/src/utils/QueryKeyFactory.d.ts +91 -0
- package/dist/cjs/types/src/utils/chargeUtils.d.ts +5 -2
- package/dist/cjs/types/src/utils/createStateContext.d.ts +11 -0
- package/dist/cjs/types/src/utils/pricePickerUtils.d.ts +1 -1
- package/dist/esm/index.js +2564 -2234
- package/dist/esm/types/src/components/BunnyProvider.d.ts +0 -2
- package/dist/esm/types/src/components/Checkout/Checkout.d.ts +1 -1
- package/dist/esm/types/src/components/Checkout/QuoteCheckout.d.ts +4 -4
- package/dist/esm/types/src/components/QuoteProvider/fragments/quoteFieldsFragment.d.ts +65 -0
- package/dist/esm/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +16 -112
- package/dist/esm/types/src/components/QuoteProvider/hooks/useFeatureQuantities.d.ts +12 -0
- package/dist/esm/types/src/components/QuoteProvider/hooks/useQuoteQuantities.d.ts +0 -5
- package/dist/esm/types/src/components/QuoteProvider/mutations/quoteChangeUpdate.d.ts +16 -0
- package/dist/esm/types/src/components/QuoteProvider/utils/getQuantityFromQuoteChange.d.ts +11 -0
- package/dist/esm/types/src/components/QuoteProvider/utils/quoteChangeCanBeEdited.d.ts +4 -0
- package/dist/esm/types/src/components/Subscriptions/Subscriptions.d.ts +1 -5
- package/dist/esm/types/src/components/Subscriptions/SubscriptionsListContainer.d.ts +0 -4
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/PlanPicker.d.ts +1 -2
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +19 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/planManagerUtils.d.ts +5 -2
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/QuantityChangeGridRow.d.ts +1 -5
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/QuantityDrawer.d.ts +1 -4
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/QuoteChangeSummarySection.d.ts +11 -6
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/context/quoteIdContext.d.ts +5 -0
- package/dist/{cjs/types/src/components/Subscriptions/quantityChangeDrawer/fragments/QuantityDrawerQuoteFragment.d.ts → esm/types/src/components/Subscriptions/quantityChangeDrawer/fragments/QuantityDrawer_QuoteFragment.d.ts} +4 -0
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/hooks/useQuoteQueryData.d.ts +3 -3
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/hooks/useSetQuoteQueryData.d.ts +2 -2
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/quantityChangeDrawerDesktop/QuantityChangeDrawerDesktop.d.ts +1 -6
- package/dist/{cjs/types/src/components/Subscriptions/quantityChangeDrawer → esm/types/src/components/Subscriptions/quantityChangeDrawer/quantityInput}/QuantityInput.d.ts +2 -9
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/quantityInput/fragments/QuantityInput_QuoteFragment.d.ts +27 -0
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/utils/utils.d.ts +3 -2
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/SubscriptionChargeTotal.d.ts +3 -3
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/components/SubscriptionCardActions.d.ts +21 -0
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/queries/getPriceListChangeOptions.d.ts +9 -0
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/utils/filterSubscriptionCharges.d.ts +2 -0
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/utils/sortSubscriptionCharges.d.ts +2 -0
- package/dist/esm/types/src/graphql/queries/getPriceListChangeOptions.d.ts +3 -4
- package/dist/esm/types/src/hooks/useAllErrorFormats.d.ts +1 -0
- package/dist/esm/types/src/hooks/useCreateQueryClient.d.ts +2 -0
- package/dist/esm/types/src/types/SubscriptionCharge.d.ts +39 -0
- package/dist/esm/types/src/utils/QueryKeyFactory.d.ts +91 -0
- package/dist/esm/types/src/utils/chargeUtils.d.ts +5 -2
- package/dist/esm/types/src/utils/createStateContext.d.ts +11 -0
- package/dist/esm/types/src/utils/pricePickerUtils.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cjs/types/src/components/QuoteProvider/mutations/quoteChargeUpdate.d.ts +0 -23
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionCardActions.d.ts +0 -9
- package/dist/cjs/types/src/graphql/queries/getFeatureUsage.d.ts +0 -7
- package/dist/cjs/types/src/hooks/usePriceListChangeOptions.d.ts +0 -9
- package/dist/cjs/types/src/utils/GraphQLClient.d.ts +0 -2
- package/dist/esm/types/src/components/QuoteProvider/mutations/quoteChargeUpdate.d.ts +0 -23
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/SubscriptionCardActions.d.ts +0 -9
- package/dist/esm/types/src/graphql/queries/getFeatureUsage.d.ts +0 -7
- package/dist/esm/types/src/hooks/usePriceListChangeOptions.d.ts +0 -9
- package/dist/esm/types/src/utils/GraphQLClient.d.ts +0 -2
- /package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/{queries → mutations}/quoteChargeCreate.d.ts +0 -0
- /package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/{queries → mutations}/quoteChargeUpdate.d.ts +0 -0
- /package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/{queries → mutations}/quoteSubscriptionUpdate.d.ts +0 -0
- /package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/{SubscriptionCardHeader.d.ts → subscriptionCardHeader/SubscriptionCardHeader.d.ts} +0 -0
- /package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/{queries → mutations}/quoteChargeCreate.d.ts +0 -0
- /package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/{queries → mutations}/quoteChargeUpdate.d.ts +0 -0
- /package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/{queries → mutations}/quoteSubscriptionUpdate.d.ts +0 -0
- /package/dist/esm/types/src/components/Subscriptions/subscriptionsList/{SubscriptionCardHeader.d.ts → subscriptionCardHeader/SubscriptionCardHeader.d.ts} +0 -0
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { QueryClient } from '@tanstack/react-query';
|
|
2
2
|
import { ThemeConfig } from 'antd';
|
|
3
|
-
import { GraphQLClient } from 'graphql-request';
|
|
4
3
|
export type BunnyContextValues = {
|
|
5
4
|
apiHost: string;
|
|
6
|
-
graphQLClient: GraphQLClient;
|
|
7
5
|
token?: string;
|
|
8
6
|
darkMode?: boolean;
|
|
9
7
|
onTokenExpired?: () => void;
|
|
@@ -20,7 +20,7 @@ type CheckoutProps = {
|
|
|
20
20
|
onFail: (error: any) => void;
|
|
21
21
|
onSuccess: () => void;
|
|
22
22
|
open: boolean;
|
|
23
|
-
quote?: FragmentOf<typeof Checkout_QuoteFragment
|
|
23
|
+
quote?: FragmentOf<typeof Checkout_QuoteFragment> | null;
|
|
24
24
|
token?: string;
|
|
25
25
|
isUpdatingQuote: boolean;
|
|
26
26
|
};
|
|
@@ -9,7 +9,7 @@ export declare const QuoteCheckout_QuoteFragment: import("gql.tada").TadaDocumen
|
|
|
9
9
|
quoteChanges: ({
|
|
10
10
|
id: string | null;
|
|
11
11
|
charges: {
|
|
12
|
-
kind: "
|
|
12
|
+
kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
|
|
13
13
|
coupon: {
|
|
14
14
|
couponCode: string;
|
|
15
15
|
} | null;
|
|
@@ -17,7 +17,7 @@ export declare const QuoteCheckout_QuoteFragment: import("gql.tada").TadaDocumen
|
|
|
17
17
|
}[] & {
|
|
18
18
|
currencyId: string;
|
|
19
19
|
id: string | null;
|
|
20
|
-
kind: "
|
|
20
|
+
kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
|
|
21
21
|
charges: {
|
|
22
22
|
subtotal: number | null;
|
|
23
23
|
amountsByPeriod: {
|
|
@@ -42,7 +42,7 @@ export declare const QuoteCheckout_QuoteFragment: import("gql.tada").TadaDocumen
|
|
|
42
42
|
couponCode: string;
|
|
43
43
|
} | null;
|
|
44
44
|
quantity: number | null;
|
|
45
|
-
kind: "
|
|
45
|
+
kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
|
|
46
46
|
}[];
|
|
47
47
|
priceList: {
|
|
48
48
|
id: string;
|
|
@@ -68,7 +68,7 @@ export declare const QuoteCheckout_QuoteFragment: import("gql.tada").TadaDocumen
|
|
|
68
68
|
amount: number | null;
|
|
69
69
|
startDate: unknown;
|
|
70
70
|
}[];
|
|
71
|
-
kind: "
|
|
71
|
+
kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
|
|
72
72
|
}, {}, {
|
|
73
73
|
fragment: "QuoteCheckout_QuoteFragment";
|
|
74
74
|
on: "Quote";
|
|
@@ -0,0 +1,65 @@
|
|
|
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: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
|
|
21
|
+
quoteChanges: {
|
|
22
|
+
currencyId: string;
|
|
23
|
+
id: string | null;
|
|
24
|
+
kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "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: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "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
|
+
}>;
|
|
@@ -1,68 +1,3 @@
|
|
|
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
1
|
/**
|
|
67
2
|
* Central quote fragment for QuoteProvider context.
|
|
68
3
|
*
|
|
@@ -76,65 +11,34 @@ export declare const QuoteFields_QuoteFragment: import("gql.tada").TadaDocumentN
|
|
|
76
11
|
* - Type safety ensures all required fields are fetched
|
|
77
12
|
*/
|
|
78
13
|
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
14
|
id: string | null;
|
|
85
|
-
|
|
86
|
-
|
|
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";
|
|
15
|
+
currencyId: string;
|
|
16
|
+
amountDue: number | null;
|
|
98
17
|
quoteChanges: {
|
|
99
|
-
currencyId: string;
|
|
100
18
|
id: string | null;
|
|
101
|
-
kind: "
|
|
19
|
+
kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
|
|
20
|
+
priceList: {
|
|
21
|
+
id: string;
|
|
22
|
+
} | null;
|
|
102
23
|
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
24
|
priceListCharge: {
|
|
117
25
|
id: string;
|
|
26
|
+
chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
|
|
27
|
+
pricingModel: "FLAT" | "TIERED" | "VOLUME" | "BANDS" | null;
|
|
28
|
+
quantityMin: number | null;
|
|
29
|
+
quantityMax: number | null;
|
|
30
|
+
selfServiceQuantity: boolean | null;
|
|
118
31
|
} | null;
|
|
119
|
-
|
|
32
|
+
feature: {
|
|
120
33
|
id: string;
|
|
121
34
|
} | null;
|
|
122
|
-
coupon: {
|
|
123
|
-
couponCode: string;
|
|
124
|
-
} | null;
|
|
125
35
|
quantity: number | null;
|
|
126
|
-
|
|
36
|
+
id: string | null;
|
|
127
37
|
}[];
|
|
128
|
-
priceList: {
|
|
129
|
-
id: string;
|
|
130
|
-
plan: {
|
|
131
|
-
name: string;
|
|
132
|
-
} | null;
|
|
133
|
-
product: {
|
|
134
|
-
name: string;
|
|
135
|
-
} | null;
|
|
136
|
-
} | null;
|
|
137
38
|
}[] | null;
|
|
39
|
+
[$tada.fragmentRefs]: {
|
|
40
|
+
PlanPickerCheckoutBar_QuoteFragment: "Quote";
|
|
41
|
+
};
|
|
138
42
|
}, {}, {
|
|
139
43
|
fragment: "QuoteContext_QuoteFragment";
|
|
140
44
|
on: "Quote";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type FeatureQuantitiesDict = Record<string, number | undefined>;
|
|
2
|
+
/**
|
|
3
|
+
* Hook to manage feature quantities using a dictionary keyed by feature ID
|
|
4
|
+
* This tracks quantities for each unique feature.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useFeatureQuantities({ onFeatureQuantitiesChanged, }: {
|
|
7
|
+
onFeatureQuantitiesChanged?: (featureQuantities: FeatureQuantitiesDict) => void;
|
|
8
|
+
}): {
|
|
9
|
+
featureQuantities: FeatureQuantitiesDict;
|
|
10
|
+
getFeatureQuantity: (featureId: string, featureQuantities: FeatureQuantitiesDict) => number | undefined;
|
|
11
|
+
onUpdateFeatureQuantity: (featureId: string, quantity: number) => void;
|
|
12
|
+
};
|
|
@@ -9,8 +9,3 @@ export declare const useQuoteQuantities: ({ selectedPriceList, quote, }: {
|
|
|
9
9
|
getFeatureQuantity: (featureId: string) => number | undefined;
|
|
10
10
|
isUpdatingCharges: boolean;
|
|
11
11
|
};
|
|
12
|
-
/**
|
|
13
|
-
* Hook to manage feature quantities using a dictionary keyed by feature ID
|
|
14
|
-
* This tracks quantities for each unique feature.
|
|
15
|
-
*/
|
|
16
|
-
export type FeatureQuantitiesDict = Record<string, number | undefined>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const quoteChangeUpdate: ({ quoteChangeId, charges, apiHost, token, }: {
|
|
2
|
+
quoteChangeId: string;
|
|
3
|
+
charges: {
|
|
4
|
+
id: string;
|
|
5
|
+
quantity: number;
|
|
6
|
+
}[];
|
|
7
|
+
apiHost: string;
|
|
8
|
+
token: string;
|
|
9
|
+
}) => Promise<{
|
|
10
|
+
quote: {
|
|
11
|
+
[$tada.fragmentRefs]: {
|
|
12
|
+
QuoteContext_QuoteFragment: "Quote";
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
} | null | undefined>;
|
|
16
|
+
export default quoteChangeUpdate;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
export declare const Subscriptions_SubscriptionFragment: import("gql.tada").TadaDocumentNode<{
|
|
2
|
-
state: "ACTIVE" | "TRIAL" | "
|
|
2
|
+
state: "ACTIVE" | "TRIAL" | "PENDING" | "EXPIRED" | "CANCELED" | "TRIAL_EXPIRED";
|
|
3
3
|
}, {}, {
|
|
4
4
|
fragment: "Subscriptions_SubscriptionFragment";
|
|
5
5
|
on: "Subscription";
|
|
6
6
|
masked: true;
|
|
7
7
|
}>;
|
|
8
|
-
export type EditingQuoteDataType = {
|
|
9
|
-
id: string;
|
|
10
|
-
isTrial: boolean;
|
|
11
|
-
};
|
|
12
8
|
declare const SubscriptionsWrapper: ({ handlePortalErrors, companyName, isInPreviewMode, productId, className, styles: userStyles, noSubscriptionsComponent, showInactiveSubscriptions, showInactiveSubscriptionsToggle, }: {
|
|
13
9
|
handlePortalErrors?: (errors: any) => void;
|
|
14
10
|
companyName: string;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { Subscription } from '@bunnyapp/common';
|
|
2
2
|
import '../../styles/index.less';
|
|
3
|
-
export type EditingQuoteDataType = {
|
|
4
|
-
id: string;
|
|
5
|
-
isTrial: boolean;
|
|
6
|
-
};
|
|
7
3
|
declare const SubscriptionsListContainer: ({ companyName, showInactive, onCancelSubscriptionClick, onChangePlanClick, noSubscriptionsComponent, subscriptions, subscriptionsAreLoading, }: {
|
|
8
4
|
companyName: string;
|
|
9
5
|
showInactive?: boolean;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Subscription } from '@bunnyapp/common';
|
|
2
|
-
declare const PlanPicker: ({
|
|
3
|
-
upgradingSubscription?: Subscription;
|
|
2
|
+
declare const PlanPicker: ({ onGoBack, areSubscriptionsLoading, subscriptions, }: {
|
|
4
3
|
onGoBack?: () => void;
|
|
5
4
|
areSubscriptionsLoading: boolean;
|
|
6
5
|
subscriptions: Subscription[];
|
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
import { PriceList } from '@bunnyapp/common';
|
|
2
|
+
export declare const PlanPickerCheckoutBar_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
3
|
+
[$tada.fragmentRefs]: {
|
|
4
|
+
Checkout_QuoteFragment: "Quote";
|
|
5
|
+
};
|
|
6
|
+
quoteChanges: {
|
|
7
|
+
priceList: {
|
|
8
|
+
id: string;
|
|
9
|
+
} | null;
|
|
10
|
+
charges: {
|
|
11
|
+
priceListCharge: {
|
|
12
|
+
id: string;
|
|
13
|
+
} | null;
|
|
14
|
+
}[];
|
|
15
|
+
}[] | null;
|
|
16
|
+
}, {}, {
|
|
17
|
+
fragment: "PlanPickerCheckoutBar_QuoteFragment";
|
|
18
|
+
on: "Quote";
|
|
19
|
+
masked: true;
|
|
20
|
+
}>;
|
|
2
21
|
declare const PlanPickerCheckoutBar: ({ selectedPriceList, handlePortalErrors, onCheckoutSuccess, }: {
|
|
3
22
|
selectedPriceList: PriceList;
|
|
4
23
|
handlePortalErrors?: (errors: any) => void;
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export declare const calculateNewQuantity: (priceListCharge: {
|
|
2
|
+
quantityMax: number | null;
|
|
3
|
+
quantityMin: number | null;
|
|
4
|
+
selfServiceQuantity: boolean | null;
|
|
5
|
+
}, currentQuantity?: number) => number;
|
package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/QuantityChangeGridRow.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Quote } from '@bunnyapp/common';
|
|
2
1
|
import { FragmentOf } from 'gql.tada';
|
|
3
2
|
export declare const QuantityChangeGridRow_SubscriptionChargeFragment: import("gql.tada").TadaDocumentNode<{
|
|
4
3
|
id: string | null;
|
|
@@ -39,10 +38,7 @@ export declare const QuantityChangeGridRow_SubscriptionFragment: import("gql.tad
|
|
|
39
38
|
on: "Subscription";
|
|
40
39
|
masked: true;
|
|
41
40
|
}>;
|
|
42
|
-
declare const QuantityChangeGridRow: ({
|
|
43
|
-
editingQuote?: Quote;
|
|
44
|
-
editingQuoteId?: string;
|
|
45
|
-
setEditingQuoteData: (value: any) => void;
|
|
41
|
+
declare const QuantityChangeGridRow: ({ subscription: maskedSubscription, subscriptionCharge: maskedSubscriptionCharge, setUpdatingChargeQuantityId, updatingChargeQuantityId, setErrorUpdatingQuantity, }: {
|
|
46
42
|
subscription: FragmentOf<typeof QuantityChangeGridRow_SubscriptionFragment>;
|
|
47
43
|
subscriptionCharge: FragmentOf<typeof QuantityChangeGridRow_SubscriptionChargeFragment>;
|
|
48
44
|
setUpdatingChargeQuantityId: (updatingChargeQuantityId: string | undefined) => void;
|
package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/QuantityDrawer.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { FragmentOf } from 'gql.tada';
|
|
2
2
|
import { QuantityDrawerDesktop_SubscriptionFragment } from './quantityChangeDrawerDesktop/QuantityChangeDrawerDesktop';
|
|
3
|
-
export type EditingQuoteDataType = {
|
|
4
|
-
id: string;
|
|
5
|
-
isTrial: boolean;
|
|
6
|
-
};
|
|
7
3
|
interface QuantityDrawerProps {
|
|
8
4
|
subscriptions: (FragmentOf<typeof QuantityDrawerDesktop_SubscriptionFragment> | null)[];
|
|
9
5
|
quantityDrawerOpen: boolean;
|
|
@@ -11,5 +7,6 @@ interface QuantityDrawerProps {
|
|
|
11
7
|
handlePortalErrors?: (errors: any) => void;
|
|
12
8
|
setShowInactive: (showInactive: boolean) => void;
|
|
13
9
|
}
|
|
10
|
+
export declare const QuantityDrawerContent: ({ subscriptions, quantityDrawerOpen, setQuantityDrawerOpen, handlePortalErrors, setShowInactive, }: QuantityDrawerProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
11
|
export declare const QuantityDrawer: ({ subscriptions, quantityDrawerOpen, setQuantityDrawerOpen, handlePortalErrors, setShowInactive, }: QuantityDrawerProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
12
|
export {};
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export declare const QuoteChangeSummarySection_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
2
|
+
id: string | null;
|
|
3
|
+
amountDue: number | null;
|
|
4
|
+
amount: number;
|
|
5
|
+
currencyId: string;
|
|
6
|
+
}, {}, {
|
|
7
|
+
fragment: "QuoteChangeSummarySection_QuoteFragment";
|
|
8
|
+
on: "Quote";
|
|
9
|
+
masked: true;
|
|
10
|
+
}>;
|
|
11
|
+
declare const QuoteChangeSummarySection: ({ openCheckout, errorUpdatingQuantity, }: {
|
|
6
12
|
openCheckout: () => void;
|
|
7
|
-
setEditingQuoteData: (editingQuoteData: EditingQuoteDataType | undefined) => void;
|
|
8
13
|
errorUpdatingQuantity: boolean;
|
|
9
14
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
15
|
export default QuoteChangeSummarySection;
|
package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/context/quoteIdContext.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
declare const QuoteIdProvider: ({ initialValue, children, }: {
|
|
2
|
+
initialValue?: string | undefined;
|
|
3
|
+
children?: import("react").ReactNode;
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element, useQuoteId: () => [string | undefined, import("react").Dispatch<import("react").SetStateAction<string | undefined>>];
|
|
5
|
+
export { QuoteIdProvider, useQuoteId };
|
|
@@ -2,6 +2,10 @@ export declare const QuantityDrawer_QuoteFragment: import("gql.tada").TadaDocume
|
|
|
2
2
|
id: string | null;
|
|
3
3
|
[$tada.fragmentRefs]: {
|
|
4
4
|
Checkout_QuoteFragment: "Quote";
|
|
5
|
+
} & {
|
|
6
|
+
QuantityInput_QuoteFragment: "Quote";
|
|
7
|
+
} & {
|
|
8
|
+
QuoteChangeSummarySection_QuoteFragment: "Quote";
|
|
5
9
|
};
|
|
6
10
|
}, {}, {
|
|
7
11
|
fragment: "QuantityDrawer_QuoteFragment";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { QuantityDrawer_QuoteFragment } from '../fragments/
|
|
3
|
-
export declare const useQuoteQueryData: (quoteId: string | undefined) =>
|
|
1
|
+
import { ResultOf } from 'gql.tada';
|
|
2
|
+
import { QuantityDrawer_QuoteFragment } from '../fragments/QuantityDrawer_QuoteFragment';
|
|
3
|
+
export declare const useQuoteQueryData: (quoteId: string | undefined) => ResultOf<typeof QuantityDrawer_QuoteFragment> | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FragmentOf } from 'gql.tada';
|
|
2
|
-
import { QuantityDrawer_QuoteFragment } from '../fragments/
|
|
2
|
+
import { QuantityDrawer_QuoteFragment } from '../fragments/QuantityDrawer_QuoteFragment';
|
|
3
3
|
export declare const useSetQuoteQueryData: () => {
|
|
4
|
-
setQuoteQueryData: (quoteId: string,
|
|
4
|
+
setQuoteQueryData: (quoteId: string, quote: FragmentOf<typeof QuantityDrawer_QuoteFragment> | null) => void;
|
|
5
5
|
};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { Quote } from '@bunnyapp/common';
|
|
2
1
|
import { FragmentOf } from 'gql.tada';
|
|
3
|
-
import { EditingQuoteDataType } from '../../SubscriptionsListContainer';
|
|
4
2
|
export declare const QuantityDrawerDesktop_SubscriptionFragment: import("gql.tada").TadaDocumentNode<{
|
|
5
3
|
currentCharges: {
|
|
6
4
|
chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
|
|
@@ -16,13 +14,10 @@ export declare const QuantityDrawerDesktop_SubscriptionFragment: import("gql.tad
|
|
|
16
14
|
on: "Subscription";
|
|
17
15
|
masked: true;
|
|
18
16
|
}>;
|
|
19
|
-
declare const QuantityChangeDrawerDesktop: ({
|
|
20
|
-
editingQuote?: Quote;
|
|
21
|
-
editingQuoteData?: EditingQuoteDataType;
|
|
17
|
+
declare const QuantityChangeDrawerDesktop: ({ onClose, open, openCheckout, subscriptions, setUpdatingChargeQuantityId, updatingChargeQuantityId, }: {
|
|
22
18
|
onClose: () => void;
|
|
23
19
|
open: boolean;
|
|
24
20
|
openCheckout: () => void;
|
|
25
|
-
setEditingQuoteData: (value: EditingQuoteDataType | undefined) => void;
|
|
26
21
|
subscriptions: (FragmentOf<typeof QuantityDrawerDesktop_SubscriptionFragment> | null)[];
|
|
27
22
|
setUpdatingChargeQuantityId: (updatingChargeQuantityId: string | undefined) => void;
|
|
28
23
|
updatingChargeQuantityId: string | undefined;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Quote } from '@bunnyapp/common';
|
|
2
1
|
import { FragmentOf } from 'gql.tada';
|
|
3
2
|
export declare const QuantityInput_SubscriptionChargeFragment: import("gql.tada").TadaDocumentNode<{
|
|
4
3
|
id: string | null;
|
|
@@ -12,7 +11,7 @@ export declare const QuantityInput_SubscriptionChargeFragment: import("gql.tada"
|
|
|
12
11
|
}>;
|
|
13
12
|
export declare const QuantityInput_SubscriptionFragment: import("gql.tada").TadaDocumentNode<{
|
|
14
13
|
id: string;
|
|
15
|
-
state: "ACTIVE" | "TRIAL" | "
|
|
14
|
+
state: "ACTIVE" | "TRIAL" | "PENDING" | "EXPIRED" | "CANCELED" | "TRIAL_EXPIRED";
|
|
16
15
|
priceList: {
|
|
17
16
|
id: string;
|
|
18
17
|
} | null;
|
|
@@ -31,14 +30,8 @@ export declare const QuantityInput_SubscriptionFragment: import("gql.tada").Tada
|
|
|
31
30
|
on: "Subscription";
|
|
32
31
|
masked: true;
|
|
33
32
|
}>;
|
|
34
|
-
declare const QuantityInput: ({ charge: maskedCharge,
|
|
33
|
+
declare const QuantityInput: ({ charge: maskedCharge, subscription: maskedSubscription, setUpdatingChargeQuantityId, updatingChargeQuantityId, setErrorUpdatingQuantity, }: {
|
|
35
34
|
charge: FragmentOf<typeof QuantityInput_SubscriptionChargeFragment>;
|
|
36
|
-
editingQuote?: Quote;
|
|
37
|
-
editingQuoteId?: string;
|
|
38
|
-
setEditingQuoteData: (editingQuoteData: {
|
|
39
|
-
id: string;
|
|
40
|
-
isTrial: boolean;
|
|
41
|
-
} | undefined) => void;
|
|
42
35
|
subscription: FragmentOf<typeof QuantityInput_SubscriptionFragment>;
|
|
43
36
|
setUpdatingChargeQuantityId: (updatingChargeQuantityId: string | undefined) => void;
|
|
44
37
|
updatingChargeQuantityId: string | undefined;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare const QuantityInput_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
2
|
+
id: string | null;
|
|
3
|
+
quoteChanges: {
|
|
4
|
+
id: string | null;
|
|
5
|
+
priceList: {
|
|
6
|
+
id: string;
|
|
7
|
+
} | null;
|
|
8
|
+
charges: {
|
|
9
|
+
id: string | null;
|
|
10
|
+
priceListCharge: {
|
|
11
|
+
id: string;
|
|
12
|
+
} | null;
|
|
13
|
+
}[];
|
|
14
|
+
subscription: {
|
|
15
|
+
charges: {
|
|
16
|
+
id: string | null;
|
|
17
|
+
priceListCharge: {
|
|
18
|
+
id: string;
|
|
19
|
+
} | null;
|
|
20
|
+
}[] | null;
|
|
21
|
+
} | null;
|
|
22
|
+
}[] | null;
|
|
23
|
+
}, {}, {
|
|
24
|
+
fragment: "QuantityInput_QuoteFragment";
|
|
25
|
+
on: "Quote";
|
|
26
|
+
masked: true;
|
|
27
|
+
}>;
|
|
@@ -4,6 +4,7 @@ export declare const CanShowQuantitiesInput_SubscriptionChargeFragment: import("
|
|
|
4
4
|
pricingModel: "FLAT" | "TIERED" | "VOLUME" | "BANDS" | null;
|
|
5
5
|
expired: boolean;
|
|
6
6
|
selfServiceQuantity: boolean | null;
|
|
7
|
+
kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
|
|
7
8
|
}, {}, {
|
|
8
9
|
fragment: "CanShowQuantitiesInput_SubscriptionChargeFragment";
|
|
9
10
|
on: "SubscriptionCharge";
|
|
@@ -11,11 +12,11 @@ export declare const CanShowQuantitiesInput_SubscriptionChargeFragment: import("
|
|
|
11
12
|
}>;
|
|
12
13
|
export declare const CanShowQuantitiesInput_SubscriptionFragment: import("gql.tada").TadaDocumentNode<{
|
|
13
14
|
id: string;
|
|
14
|
-
state: "ACTIVE" | "TRIAL" | "
|
|
15
|
+
state: "ACTIVE" | "TRIAL" | "PENDING" | "EXPIRED" | "CANCELED" | "TRIAL_EXPIRED";
|
|
15
16
|
priceList: {
|
|
16
17
|
id: string;
|
|
17
18
|
} | null;
|
|
18
|
-
|
|
19
|
+
currentCharges: {
|
|
19
20
|
[$tada.fragmentRefs]: {
|
|
20
21
|
CanShowQuantitiesInput_SubscriptionChargeFragment: "SubscriptionCharge";
|
|
21
22
|
};
|
package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionChargeTotal.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const SubscriptionChargeTotal: ({ charge,
|
|
1
|
+
import { SubscriptionCharge } from '@bunnyapp/common';
|
|
2
|
+
declare const SubscriptionChargeTotal: ({ charge, currencyId, }: {
|
|
3
3
|
charge: SubscriptionCharge;
|
|
4
|
-
|
|
4
|
+
currencyId: string;
|
|
5
5
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export default SubscriptionChargeTotal;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Subscription } from '@bunnyapp/common';
|
|
2
|
+
import { FragmentOf } from 'gql.tada';
|
|
3
|
+
export declare const SubscriptionCardActions_PriceListChangeOptionsFragment: import("gql.tada").TadaDocumentNode<{
|
|
4
|
+
priceLists: {
|
|
5
|
+
id: string;
|
|
6
|
+
product: {
|
|
7
|
+
id: string;
|
|
8
|
+
} | null;
|
|
9
|
+
}[] | null;
|
|
10
|
+
}, {}, {
|
|
11
|
+
fragment: "SubscriptionCardActions_PriceListChangeOptionsFragment";
|
|
12
|
+
on: "PriceListChangeOptions";
|
|
13
|
+
masked: true;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const SubscriptionCardActions: ({ onChangePlanClick, onCancelSubscriptionClick, priceListChangeOptions: maskedPriceListChangeOptions, subscription, isPaymentMethodLoading, }: {
|
|
16
|
+
onChangePlanClick?: (subscription: Subscription) => void;
|
|
17
|
+
onCancelSubscriptionClick?: (subscription: Subscription) => void;
|
|
18
|
+
priceListChangeOptions?: FragmentOf<typeof SubscriptionCardActions_PriceListChangeOptionsFragment>;
|
|
19
|
+
subscription: Subscription;
|
|
20
|
+
isPaymentMethodLoading: boolean;
|
|
21
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|