@bunnyapp/components 1.8.0-beta.6 → 1.8.0-beta.8
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 +3757 -3838
- package/dist/cjs/types/src/components/QuoteProvider/context/quantityEditableChargesContext.d.ts +2 -8
- package/dist/cjs/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +5 -3
- package/dist/cjs/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_PriceListChargeFragment.d.ts +16 -0
- package/dist/cjs/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_QuoteFragment.d.ts +26 -0
- package/dist/cjs/types/src/components/QuoteProvider/fragments/useQuoteQuantities_PriceListChargeFragment.d.ts +13 -0
- package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuantityEditableCharges.d.ts +41 -36
- package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuoteCreate.d.ts +14 -3
- package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuoteQuantities.d.ts +3 -19
- package/dist/cjs/types/src/components/QuoteProvider/hooks/useSelectedPriceListQuoteChange.d.ts +18 -30
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/CheckoutBarInput.d.ts +1 -13
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/CheckoutBarInput_PriceListChargeFragment.d.ts +13 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/useChargeCRUD_QuoteFragment.d.ts +22 -0
- 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 +0 -14
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/fragments/PlanPickerCheckoutBar_PriceListChargeFragment.d.ts +14 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListSelector/PriceListSelector.d.ts +3 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/queries/getSubscriptions.d.ts +2 -163
- package/dist/cjs/types/src/components/Subscriptions/context/upgradingSubscriptionContext.d.ts +9 -1
- package/dist/cjs/types/src/components/Subscriptions/fragments/UpgradingSubscriptionContext_SubscriptionFragment.d.ts +4 -0
- package/dist/cjs/types/src/utils/chargeUtils.d.ts +1 -0
- package/dist/cjs/types/src/utils/featureAddonUtils/isAddonPurchased.d.ts +1 -1
- package/dist/esm/index.js +3758 -3839
- package/dist/esm/types/src/components/QuoteProvider/context/quantityEditableChargesContext.d.ts +2 -8
- package/dist/esm/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +5 -3
- package/dist/esm/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_PriceListChargeFragment.d.ts +16 -0
- package/dist/esm/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_QuoteFragment.d.ts +26 -0
- package/dist/esm/types/src/components/QuoteProvider/fragments/useQuoteQuantities_PriceListChargeFragment.d.ts +13 -0
- package/dist/esm/types/src/components/QuoteProvider/hooks/useQuantityEditableCharges.d.ts +41 -36
- package/dist/esm/types/src/components/QuoteProvider/hooks/useQuoteCreate.d.ts +14 -3
- package/dist/esm/types/src/components/QuoteProvider/hooks/useQuoteQuantities.d.ts +3 -19
- package/dist/esm/types/src/components/QuoteProvider/hooks/useSelectedPriceListQuoteChange.d.ts +18 -30
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/CheckoutBarInput.d.ts +1 -13
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/CheckoutBarInput_PriceListChargeFragment.d.ts +13 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/useChargeCRUD_QuoteFragment.d.ts +22 -0
- 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 +0 -14
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/fragments/PlanPickerCheckoutBar_PriceListChargeFragment.d.ts +14 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListSelector/PriceListSelector.d.ts +3 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/queries/getSubscriptions.d.ts +2 -163
- package/dist/esm/types/src/components/Subscriptions/context/upgradingSubscriptionContext.d.ts +9 -1
- package/dist/esm/types/src/components/Subscriptions/fragments/UpgradingSubscriptionContext_SubscriptionFragment.d.ts +4 -0
- package/dist/esm/types/src/utils/chargeUtils.d.ts +1 -0
- package/dist/esm/types/src/utils/featureAddonUtils/isAddonPurchased.d.ts +1 -1
- package/package.json +1 -1
package/dist/cjs/types/src/components/QuoteProvider/context/quantityEditableChargesContext.d.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
export declare const QuantityEditableChargesProvider: ({ value, children }: {
|
|
2
2
|
value: {
|
|
3
|
-
feature: {
|
|
4
|
-
id: string;
|
|
5
|
-
} | null;
|
|
6
3
|
deprecated: boolean | null;
|
|
7
4
|
id: string;
|
|
8
5
|
featureAddon: boolean | null;
|
|
@@ -13,12 +10,9 @@ export declare const QuantityEditableChargesProvider: ({ value, children }: {
|
|
|
13
10
|
} & {
|
|
14
11
|
useQuoteQuantities_PriceListChargeFragment: "PriceListCharge";
|
|
15
12
|
};
|
|
16
|
-
}[]
|
|
13
|
+
}[];
|
|
17
14
|
children?: import("react").ReactNode;
|
|
18
15
|
}) => import("react/jsx-runtime").JSX.Element, useQuantityEditableChargesContext: () => {
|
|
19
|
-
feature: {
|
|
20
|
-
id: string;
|
|
21
|
-
} | null;
|
|
22
16
|
deprecated: boolean | null;
|
|
23
17
|
id: string;
|
|
24
18
|
featureAddon: boolean | null;
|
|
@@ -29,4 +23,4 @@ export declare const QuantityEditableChargesProvider: ({ value, children }: {
|
|
|
29
23
|
} & {
|
|
30
24
|
useQuoteQuantities_PriceListChargeFragment: "PriceListCharge";
|
|
31
25
|
};
|
|
32
|
-
}[]
|
|
26
|
+
}[];
|
|
@@ -29,9 +29,7 @@ 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
|
-
|
|
33
|
-
CanEditChargeQuantity_PriceListChargeFragment: "PriceListCharge";
|
|
34
|
-
};
|
|
32
|
+
name: string;
|
|
35
33
|
} | null;
|
|
36
34
|
feature: {
|
|
37
35
|
id: string;
|
|
@@ -50,6 +48,10 @@ export declare const QuoteContext_QuoteFragment: import("gql.tada").TadaDocument
|
|
|
50
48
|
FeatureAddonRow_QuoteFragment: "Quote";
|
|
51
49
|
} & {
|
|
52
50
|
PaymentForms_QuoteFragment: "Quote";
|
|
51
|
+
} & {
|
|
52
|
+
useQuantityEditableCharges_QuoteFragment: "Quote";
|
|
53
|
+
} & {
|
|
54
|
+
useChargeCRUD_QuoteFragment: "Quote";
|
|
53
55
|
};
|
|
54
56
|
}, {}, {
|
|
55
57
|
fragment: "QuoteContext_QuoteFragment";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const useQuantityEditableCharges_PriceListChargeFragment: import("gql.tada").TadaDocumentNode<{
|
|
2
|
+
deprecated: boolean | null;
|
|
3
|
+
id: string;
|
|
4
|
+
featureAddon: boolean | null;
|
|
5
|
+
[$tada.fragmentRefs]: {
|
|
6
|
+
CanEditChargeQuantity_PriceListChargeFragment: "PriceListCharge";
|
|
7
|
+
} & {
|
|
8
|
+
PlanPickerCheckoutBar_PriceListChargeFragment: "PriceListCharge";
|
|
9
|
+
} & {
|
|
10
|
+
useQuoteQuantities_PriceListChargeFragment: "PriceListCharge";
|
|
11
|
+
};
|
|
12
|
+
}, {}, {
|
|
13
|
+
fragment: "useQuantityEditableCharges_PriceListChargeFragment";
|
|
14
|
+
on: "PriceListCharge";
|
|
15
|
+
masked: false;
|
|
16
|
+
}>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const useQuantityEditableCharges_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
2
|
+
quoteChanges: {
|
|
3
|
+
kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
|
|
4
|
+
charges: {
|
|
5
|
+
priceListCharge: {
|
|
6
|
+
deprecated: boolean | null;
|
|
7
|
+
id: string;
|
|
8
|
+
featureAddon: boolean | null;
|
|
9
|
+
[$tada.fragmentRefs]: {
|
|
10
|
+
CanEditChargeQuantity_PriceListChargeFragment: "PriceListCharge";
|
|
11
|
+
} & {
|
|
12
|
+
PlanPickerCheckoutBar_PriceListChargeFragment: "PriceListCharge";
|
|
13
|
+
} & {
|
|
14
|
+
useQuoteQuantities_PriceListChargeFragment: "PriceListCharge";
|
|
15
|
+
};
|
|
16
|
+
} | null;
|
|
17
|
+
}[];
|
|
18
|
+
[$tada.fragmentRefs]: {
|
|
19
|
+
useSelectedPriceListQuoteChange_QuoteChangeFragment: "QuoteChange";
|
|
20
|
+
};
|
|
21
|
+
}[] | null;
|
|
22
|
+
}, {}, {
|
|
23
|
+
fragment: "useQuantityEditableCharges_QuoteFragment";
|
|
24
|
+
on: "Quote";
|
|
25
|
+
masked: true;
|
|
26
|
+
}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const useQuoteQuantities_PriceListChargeFragment: import("gql.tada").TadaDocumentNode<{
|
|
2
|
+
feature: {
|
|
3
|
+
id: string;
|
|
4
|
+
} | null;
|
|
5
|
+
id: string;
|
|
6
|
+
quantityMax: number | null;
|
|
7
|
+
quantityMin: number | null;
|
|
8
|
+
selfServiceQuantity: boolean | null;
|
|
9
|
+
}, {}, {
|
|
10
|
+
fragment: "useQuoteQuantities_PriceListChargeFragment";
|
|
11
|
+
on: "PriceListCharge";
|
|
12
|
+
masked: true;
|
|
13
|
+
}>;
|
|
@@ -1,55 +1,52 @@
|
|
|
1
|
-
import { FragmentOf
|
|
2
|
-
import {
|
|
1
|
+
import { FragmentOf } from 'gql.tada';
|
|
2
|
+
import { useQuantityEditableCharges_QuoteFragment } from '../fragments/useQuantityEditableCharges_QuoteFragment';
|
|
3
3
|
export declare const useQuantityEditableCharges_SubscriptionFragment: import("gql.tada").TadaDocumentNode<{
|
|
4
4
|
id: string;
|
|
5
|
+
priceListId: string;
|
|
5
6
|
currentCharges: {
|
|
6
|
-
quantity: number | null;
|
|
7
7
|
priceListCharge: {
|
|
8
|
+
deprecated: boolean | null;
|
|
8
9
|
id: string;
|
|
10
|
+
featureAddon: boolean | null;
|
|
11
|
+
[$tada.fragmentRefs]: {
|
|
12
|
+
CanEditChargeQuantity_PriceListChargeFragment: "PriceListCharge";
|
|
13
|
+
} & {
|
|
14
|
+
PlanPickerCheckoutBar_PriceListChargeFragment: "PriceListCharge";
|
|
15
|
+
} & {
|
|
16
|
+
useQuoteQuantities_PriceListChargeFragment: "PriceListCharge";
|
|
17
|
+
};
|
|
9
18
|
} | null;
|
|
10
19
|
}[] | 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;
|
|
11
36
|
}, {}, {
|
|
12
37
|
fragment: "useQuantityEditableCharges_SubscriptionFragment";
|
|
13
38
|
on: "Subscription";
|
|
14
39
|
masked: true;
|
|
15
40
|
}>;
|
|
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, pricelistId, quote: maskedQuote, }: {
|
|
45
45
|
upgradingSubscription: FragmentOf<typeof useQuantityEditableCharges_SubscriptionFragment> | undefined;
|
|
46
|
-
|
|
47
|
-
quote:
|
|
46
|
+
pricelistId: string | undefined;
|
|
47
|
+
quote: FragmentOf<typeof useQuantityEditableCharges_QuoteFragment> | null | undefined;
|
|
48
48
|
}): {
|
|
49
49
|
quantityEditableCharges: {
|
|
50
|
-
feature: {
|
|
51
|
-
id: string;
|
|
52
|
-
} | null;
|
|
53
50
|
deprecated: boolean | null;
|
|
54
51
|
id: string;
|
|
55
52
|
featureAddon: boolean | null;
|
|
@@ -60,11 +57,19 @@ export declare function useQuantityEditableCharges({ upgradingSubscription: mask
|
|
|
60
57
|
} & {
|
|
61
58
|
useQuoteQuantities_PriceListChargeFragment: "PriceListCharge";
|
|
62
59
|
};
|
|
63
|
-
}[]
|
|
60
|
+
}[];
|
|
64
61
|
findSubscriptionCharge: (priceListChargeId: string) => {
|
|
65
|
-
quantity: number | null;
|
|
66
62
|
priceListCharge: {
|
|
63
|
+
deprecated: boolean | null;
|
|
67
64
|
id: string;
|
|
65
|
+
featureAddon: boolean | null;
|
|
66
|
+
[$tada.fragmentRefs]: {
|
|
67
|
+
CanEditChargeQuantity_PriceListChargeFragment: "PriceListCharge";
|
|
68
|
+
} & {
|
|
69
|
+
PlanPickerCheckoutBar_PriceListChargeFragment: "PriceListCharge";
|
|
70
|
+
} & {
|
|
71
|
+
useQuoteQuantities_PriceListChargeFragment: "PriceListCharge";
|
|
72
|
+
};
|
|
68
73
|
} | null;
|
|
69
74
|
} | undefined;
|
|
70
75
|
};
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import PriceList from '@/types/PriceList';
|
|
2
|
-
import
|
|
3
|
-
export declare const
|
|
4
|
-
|
|
2
|
+
import { FragmentOf } from 'gql.tada';
|
|
3
|
+
export declare const useQuoteCreate_SubscriptionFragment: import("gql.tada").TadaDocumentNode<{
|
|
4
|
+
id: string;
|
|
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>;
|
|
5
16
|
selectedPriceList?: PriceList;
|
|
6
17
|
token?: string;
|
|
7
18
|
}) => {
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
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
|
-
}>;
|
|
1
|
+
import { FragmentOf } from 'gql.tada';
|
|
2
|
+
import { useQuoteQuantities_PriceListChargeFragment } from '../fragments/useQuoteQuantities_PriceListChargeFragment';
|
|
17
3
|
export declare const useQuoteQuantities_SubscriptionFragment: import("gql.tada").TadaDocumentNode<{
|
|
18
4
|
currentCharges: {
|
|
19
5
|
id: string | null;
|
|
@@ -24,9 +10,7 @@ export declare const useQuoteQuantities_SubscriptionFragment: import("gql.tada")
|
|
|
24
10
|
on: "Subscription";
|
|
25
11
|
masked: true;
|
|
26
12
|
}>;
|
|
27
|
-
export declare const useQuoteQuantities: ({
|
|
28
|
-
selectedPriceList: PriceList;
|
|
29
|
-
quote: ResultOf<typeof QuoteContext_QuoteFragment> | null | undefined;
|
|
13
|
+
export declare const useQuoteQuantities: ({ quantityEditableCharges: maskedQuantityEditableCharges, }: {
|
|
30
14
|
quantityEditableCharges: FragmentOf<typeof useQuoteQuantities_PriceListChargeFragment>[] | undefined;
|
|
31
15
|
}) => {
|
|
32
16
|
onChangeQuantity: (priceListChargeId: string, quantity: number) => void;
|
package/dist/cjs/types/src/components/QuoteProvider/hooks/useSelectedPriceListQuoteChange.d.ts
CHANGED
|
@@ -1,37 +1,25 @@
|
|
|
1
|
-
import { FragmentOf
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { FragmentOf } from 'gql.tada';
|
|
2
|
+
export declare const useSelectedPriceListQuoteChange_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
3
|
+
quoteChanges: {
|
|
4
|
+
id: string | null;
|
|
5
|
+
}[] | null;
|
|
5
6
|
}, {}, {
|
|
6
|
-
fragment: "
|
|
7
|
-
on: "
|
|
7
|
+
fragment: "useSelectedPriceListQuoteChange_QuoteFragment";
|
|
8
|
+
on: "Quote";
|
|
8
9
|
masked: true;
|
|
9
10
|
}>;
|
|
10
|
-
export declare
|
|
11
|
-
quote: ResultOf<typeof QuoteContext_QuoteFragment> | null | undefined;
|
|
12
|
-
selectedPriceList: FragmentOf<typeof useSelectedPriceListQuoteChange_PriceListFragment> | null;
|
|
13
|
-
}): {
|
|
11
|
+
export declare const useSelectedPriceListQuoteChange_QuoteChangeFragment: import("gql.tada").TadaDocumentNode<{
|
|
14
12
|
id: string | null;
|
|
15
|
-
kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
|
|
16
13
|
priceList: {
|
|
17
14
|
id: string;
|
|
18
15
|
} | null;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
30
|
-
} | null;
|
|
31
|
-
feature: {
|
|
32
|
-
id: string;
|
|
33
|
-
} | null;
|
|
34
|
-
quantity: number | null;
|
|
35
|
-
id: string | null;
|
|
36
|
-
}[];
|
|
37
|
-
} | undefined;
|
|
16
|
+
kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
|
|
17
|
+
}, {}, {
|
|
18
|
+
fragment: "useSelectedPriceListQuoteChange_QuoteChangeFragment";
|
|
19
|
+
on: "QuoteChange";
|
|
20
|
+
masked: true;
|
|
21
|
+
}>;
|
|
22
|
+
export declare function useSelectedPriceListQuoteChange<T extends FragmentOf<typeof useSelectedPriceListQuoteChange_QuoteChangeFragment>>({ quoteChanges: maskedQuoteChanges, selectedPriceListId, }: {
|
|
23
|
+
quoteChanges: T[] | undefined | null;
|
|
24
|
+
selectedPriceListId: string | undefined;
|
|
25
|
+
}): T | undefined;
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
import { FragmentOf } from 'gql.tada';
|
|
2
|
-
|
|
3
|
-
name: string;
|
|
4
|
-
quantityMin: number | null;
|
|
5
|
-
quantityMax: number | null;
|
|
6
|
-
id: string;
|
|
7
|
-
feature: {
|
|
8
|
-
id: string;
|
|
9
|
-
} | null;
|
|
10
|
-
}, {}, {
|
|
11
|
-
fragment: "CheckoutBarInput_PriceListChargeFragment";
|
|
12
|
-
on: "PriceListCharge";
|
|
13
|
-
masked: true;
|
|
14
|
-
}>;
|
|
2
|
+
import { CheckoutBarInput_PriceListChargeFragment } from './fragments/CheckoutBarInput_PriceListChargeFragment';
|
|
15
3
|
declare const CheckoutBarInput: ({ disabled, priceListCharge: maskedPriceListCharge, quantity, onQuantityChanged, }: {
|
|
16
4
|
disabled?: boolean;
|
|
17
5
|
priceListCharge: FragmentOf<typeof CheckoutBarInput_PriceListChargeFragment>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const CheckoutBarInput_PriceListChargeFragment: import("gql.tada").TadaDocumentNode<{
|
|
2
|
+
name: string;
|
|
3
|
+
quantityMin: number | null;
|
|
4
|
+
quantityMax: number | null;
|
|
5
|
+
id: string;
|
|
6
|
+
feature: {
|
|
7
|
+
id: string;
|
|
8
|
+
} | null;
|
|
9
|
+
}, {}, {
|
|
10
|
+
fragment: "CheckoutBarInput_PriceListChargeFragment";
|
|
11
|
+
on: "PriceListCharge";
|
|
12
|
+
masked: true;
|
|
13
|
+
}>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const useChargeCRUD_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
2
|
+
id: string | null;
|
|
3
|
+
startDate: unknown;
|
|
4
|
+
quoteChanges: {
|
|
5
|
+
subscriptionId: string | null;
|
|
6
|
+
charges: {
|
|
7
|
+
id: string | null;
|
|
8
|
+
quantity: number | null;
|
|
9
|
+
priceListCharge: {
|
|
10
|
+
id: string;
|
|
11
|
+
} | null;
|
|
12
|
+
}[];
|
|
13
|
+
id: string | null;
|
|
14
|
+
[$tada.fragmentRefs]: {
|
|
15
|
+
useSelectedPriceListQuoteChange_QuoteChangeFragment: "QuoteChange";
|
|
16
|
+
};
|
|
17
|
+
}[] | null;
|
|
18
|
+
}, {}, {
|
|
19
|
+
fragment: "useChargeCRUD_QuoteFragment";
|
|
20
|
+
on: "Quote";
|
|
21
|
+
masked: true;
|
|
22
|
+
}>;
|
|
@@ -23,7 +23,7 @@ export declare const useChargeCRUD_SubscriptionFragment: import("gql.tada").Tada
|
|
|
23
23
|
*
|
|
24
24
|
* All network operations are debounced.
|
|
25
25
|
*/
|
|
26
|
-
export declare const useChargeCRUD: ({ priceListChargeId, featureId }: {
|
|
26
|
+
export declare const useChargeCRUD: ({ priceListChargeId, featureId, }: {
|
|
27
27
|
priceListChargeId: string;
|
|
28
28
|
featureId: string | undefined;
|
|
29
29
|
}) => {
|
|
@@ -1,18 +1,4 @@
|
|
|
1
1
|
import PriceList from '@/types/PriceList';
|
|
2
|
-
export declare const PlanPickerCheckoutBar_PriceListChargeFragment: import("gql.tada").TadaDocumentNode<{
|
|
3
|
-
[$tada.fragmentRefs]: {
|
|
4
|
-
CheckoutBarInput_PriceListChargeFragment: "PriceListCharge";
|
|
5
|
-
};
|
|
6
|
-
feature: {
|
|
7
|
-
id: string;
|
|
8
|
-
} | null;
|
|
9
|
-
featureAddon: boolean | null;
|
|
10
|
-
id: string;
|
|
11
|
-
}, {}, {
|
|
12
|
-
fragment: "PlanPickerCheckoutBar_PriceListChargeFragment";
|
|
13
|
-
on: "PriceListCharge";
|
|
14
|
-
masked: true;
|
|
15
|
-
}>;
|
|
16
2
|
declare const PlanPickerCheckoutBar: ({ selectedPriceList, handlePortalErrors, onCheckoutSuccess, }: {
|
|
17
3
|
selectedPriceList: PriceList;
|
|
18
4
|
handlePortalErrors?: (errors: any) => void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const PlanPickerCheckoutBar_PriceListChargeFragment: import("gql.tada").TadaDocumentNode<{
|
|
2
|
+
[$tada.fragmentRefs]: {
|
|
3
|
+
CheckoutBarInput_PriceListChargeFragment: "PriceListCharge";
|
|
4
|
+
};
|
|
5
|
+
feature: {
|
|
6
|
+
id: string;
|
|
7
|
+
} | null;
|
|
8
|
+
featureAddon: boolean | null;
|
|
9
|
+
id: string;
|
|
10
|
+
}, {}, {
|
|
11
|
+
fragment: "PlanPickerCheckoutBar_PriceListChargeFragment";
|
|
12
|
+
on: "PriceListCharge";
|
|
13
|
+
masked: true;
|
|
14
|
+
}>;
|
|
@@ -9,6 +9,9 @@ export declare const PriceListSelectorUpgradingSubscription_SubscriptionFragment
|
|
|
9
9
|
addon: boolean | null;
|
|
10
10
|
} | null;
|
|
11
11
|
} | null;
|
|
12
|
+
[$tada.fragmentRefs]: {
|
|
13
|
+
createAvailableBillingPeriods_SubscriptionFragment: "Subscription";
|
|
14
|
+
};
|
|
12
15
|
}, {}, {
|
|
13
16
|
fragment: "PriceListSelectorUpgradingSubscription_SubscriptionFragment";
|
|
14
17
|
on: "Subscription";
|
|
@@ -5,171 +5,10 @@ export declare const getSubscriptions: ({ apiHost, isInPreviewMode, token, }: {
|
|
|
5
5
|
}) => Promise<{
|
|
6
6
|
subscriptions: {
|
|
7
7
|
nodes: ({
|
|
8
|
-
addonSubscriptions: {
|
|
9
|
-
id: string;
|
|
10
|
-
priceList: {
|
|
11
|
-
id: string;
|
|
12
|
-
} | null;
|
|
13
|
-
plan: {
|
|
14
|
-
id: string;
|
|
15
|
-
} | null;
|
|
16
|
-
}[] | null;
|
|
17
|
-
cancellationDate: unknown;
|
|
18
|
-
currencyId: string;
|
|
19
|
-
endDate: unknown;
|
|
20
|
-
evergreen: boolean;
|
|
21
8
|
id: string;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
id: string;
|
|
9
|
+
[$tada.fragmentRefs]: {
|
|
10
|
+
UpgradingSubscriptionContext_SubscriptionFragment: "Subscription";
|
|
25
11
|
};
|
|
26
|
-
daysLeftInTrial: number | null;
|
|
27
|
-
plan: {
|
|
28
|
-
id: string;
|
|
29
|
-
name: string;
|
|
30
|
-
selfServiceBuy: boolean | null;
|
|
31
|
-
selfServiceCancel: boolean | null;
|
|
32
|
-
selfServiceRenew: boolean | null;
|
|
33
|
-
} | null;
|
|
34
|
-
priceList: {
|
|
35
|
-
id: string;
|
|
36
|
-
periodMonths: number | null;
|
|
37
|
-
name: string;
|
|
38
|
-
plan: {
|
|
39
|
-
id: string;
|
|
40
|
-
addon: boolean | null;
|
|
41
|
-
addonPlans: {
|
|
42
|
-
id: string;
|
|
43
|
-
}[] | null;
|
|
44
|
-
} | null;
|
|
45
|
-
} | null;
|
|
46
|
-
product: {
|
|
47
|
-
id: string;
|
|
48
|
-
name: string;
|
|
49
|
-
showProductNameOnLineItem: boolean | null;
|
|
50
|
-
} | null;
|
|
51
|
-
startDate: unknown;
|
|
52
|
-
state: "ACTIVE" | "TRIAL" | "CANCELED" | "EXPIRED" | "TRIAL_EXPIRED" | "PENDING";
|
|
53
|
-
trialEndDate: unknown;
|
|
54
|
-
trialPeriod: string;
|
|
55
|
-
trialStartDate: unknown;
|
|
56
|
-
trialExpirationAction: "ACTIVATE" | "CANCEL" | null;
|
|
57
|
-
charges: {
|
|
58
|
-
priceListCharge: {
|
|
59
|
-
priceListChargeTiers: {
|
|
60
|
-
price: number | null;
|
|
61
|
-
starts: number | null;
|
|
62
|
-
}[] | null;
|
|
63
|
-
featureAddon: boolean | null;
|
|
64
|
-
id: string;
|
|
65
|
-
} | null;
|
|
66
|
-
amount: number | null;
|
|
67
|
-
billingPeriod: "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "ANNUAL" | "ONCE" | null;
|
|
68
|
-
chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
|
|
69
|
-
discount: number | null;
|
|
70
|
-
discountedPrice: string | null;
|
|
71
|
-
endDate: unknown;
|
|
72
|
-
expired: boolean;
|
|
73
|
-
feature: {
|
|
74
|
-
name: string;
|
|
75
|
-
} | null;
|
|
76
|
-
id: string | null;
|
|
77
|
-
isAmendment: boolean;
|
|
78
|
-
isRamp: boolean;
|
|
79
|
-
kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
|
|
80
|
-
name: string | null;
|
|
81
|
-
periodPrice: number | null;
|
|
82
|
-
price: string | null;
|
|
83
|
-
priceDecimals: number | null;
|
|
84
|
-
priceListChargeId: string | null;
|
|
85
|
-
priceTiers: {
|
|
86
|
-
starts: number | null;
|
|
87
|
-
price: number | null;
|
|
88
|
-
}[] | null;
|
|
89
|
-
pricingModel: "FLAT" | "TIERED" | "VOLUME" | "BANDS" | null;
|
|
90
|
-
quantity: number | null;
|
|
91
|
-
selfServiceQuantity: boolean | null;
|
|
92
|
-
startDate: unknown;
|
|
93
|
-
trial: boolean;
|
|
94
|
-
}[] | null;
|
|
95
|
-
chargeReport: {
|
|
96
|
-
priceListCharge: {
|
|
97
|
-
priceListChargeTiers: {
|
|
98
|
-
price: number | null;
|
|
99
|
-
starts: number | null;
|
|
100
|
-
}[] | null;
|
|
101
|
-
featureAddon: boolean | null;
|
|
102
|
-
id: string;
|
|
103
|
-
code: string | null;
|
|
104
|
-
} | null;
|
|
105
|
-
amount: number | null;
|
|
106
|
-
billingPeriod: "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "ANNUAL" | "ONCE" | null;
|
|
107
|
-
chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
|
|
108
|
-
discount: number | null;
|
|
109
|
-
discountedPrice: string | null;
|
|
110
|
-
endDate: unknown;
|
|
111
|
-
expired: boolean;
|
|
112
|
-
feature: {
|
|
113
|
-
name: string;
|
|
114
|
-
} | null;
|
|
115
|
-
id: string | null;
|
|
116
|
-
isAmendment: boolean;
|
|
117
|
-
isRamp: boolean;
|
|
118
|
-
kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
|
|
119
|
-
name: string | null;
|
|
120
|
-
periodPrice: number | null;
|
|
121
|
-
price: string | null;
|
|
122
|
-
priceDecimals: number | null;
|
|
123
|
-
priceListChargeId: string | null;
|
|
124
|
-
priceTiers: {
|
|
125
|
-
starts: number | null;
|
|
126
|
-
price: number | null;
|
|
127
|
-
}[] | null;
|
|
128
|
-
pricingModel: "FLAT" | "TIERED" | "VOLUME" | "BANDS" | null;
|
|
129
|
-
quantity: number | null;
|
|
130
|
-
selfServiceQuantity: boolean | null;
|
|
131
|
-
startDate: unknown;
|
|
132
|
-
trial: boolean;
|
|
133
|
-
}[] | null;
|
|
134
|
-
currentCharges: {
|
|
135
|
-
priceListCharge: {
|
|
136
|
-
priceListChargeTiers: {
|
|
137
|
-
price: number | null;
|
|
138
|
-
starts: number | null;
|
|
139
|
-
}[] | null;
|
|
140
|
-
featureAddon: boolean | null;
|
|
141
|
-
id: string;
|
|
142
|
-
code: string | null;
|
|
143
|
-
} | null;
|
|
144
|
-
amount: number | null;
|
|
145
|
-
billingPeriod: "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "ANNUAL" | "ONCE" | null;
|
|
146
|
-
chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
|
|
147
|
-
discount: number | null;
|
|
148
|
-
discountedPrice: string | null;
|
|
149
|
-
endDate: unknown;
|
|
150
|
-
expired: boolean;
|
|
151
|
-
feature: {
|
|
152
|
-
name: string;
|
|
153
|
-
} | null;
|
|
154
|
-
id: string | null;
|
|
155
|
-
isAmendment: boolean;
|
|
156
|
-
isRamp: boolean;
|
|
157
|
-
kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
|
|
158
|
-
name: string | null;
|
|
159
|
-
periodPrice: number | null;
|
|
160
|
-
price: string | null;
|
|
161
|
-
priceDecimals: number | null;
|
|
162
|
-
priceListChargeId: string | null;
|
|
163
|
-
priceTiers: {
|
|
164
|
-
starts: number | null;
|
|
165
|
-
price: number | null;
|
|
166
|
-
}[] | null;
|
|
167
|
-
pricingModel: "FLAT" | "TIERED" | "VOLUME" | "BANDS" | null;
|
|
168
|
-
quantity: number | null;
|
|
169
|
-
selfServiceQuantity: boolean | null;
|
|
170
|
-
startDate: unknown;
|
|
171
|
-
trial: boolean;
|
|
172
|
-
}[] | null;
|
|
173
12
|
} | null)[] | null;
|
|
174
13
|
} | null;
|
|
175
14
|
}>;
|
package/dist/cjs/types/src/components/Subscriptions/context/upgradingSubscriptionContext.d.ts
CHANGED
|
@@ -25,8 +25,12 @@ export declare const UpgradingSubscriptionProvider: ({ value, children }: {
|
|
|
25
25
|
useChargeCRUD_SubscriptionFragment: "Subscription";
|
|
26
26
|
} & {
|
|
27
27
|
useQuoteQuantities_SubscriptionFragment: "Subscription";
|
|
28
|
+
} & {
|
|
29
|
+
isAddonPurchased_SubscriptionChargeFragment: "Subscription";
|
|
30
|
+
} & {
|
|
31
|
+
useQuoteCreate_SubscriptionFragment: "Subscription";
|
|
28
32
|
};
|
|
29
|
-
} | undefined;
|
|
33
|
+
} | null | undefined;
|
|
30
34
|
children?: import("react").ReactNode;
|
|
31
35
|
}) => import("react/jsx-runtime").JSX.Element, useUpgradingSubscription: () => {
|
|
32
36
|
id: string;
|
|
@@ -54,5 +58,9 @@ export declare const UpgradingSubscriptionProvider: ({ value, children }: {
|
|
|
54
58
|
useChargeCRUD_SubscriptionFragment: "Subscription";
|
|
55
59
|
} & {
|
|
56
60
|
useQuoteQuantities_SubscriptionFragment: "Subscription";
|
|
61
|
+
} & {
|
|
62
|
+
isAddonPurchased_SubscriptionChargeFragment: "Subscription";
|
|
63
|
+
} & {
|
|
64
|
+
useQuoteCreate_SubscriptionFragment: "Subscription";
|
|
57
65
|
};
|
|
58
66
|
} | undefined;
|
|
@@ -24,6 +24,10 @@ export declare const UpgradingSubscriptionContext_SubscriptionFragment: import("
|
|
|
24
24
|
useChargeCRUD_SubscriptionFragment: "Subscription";
|
|
25
25
|
} & {
|
|
26
26
|
useQuoteQuantities_SubscriptionFragment: "Subscription";
|
|
27
|
+
} & {
|
|
28
|
+
isAddonPurchased_SubscriptionChargeFragment: "Subscription";
|
|
29
|
+
} & {
|
|
30
|
+
useQuoteCreate_SubscriptionFragment: "Subscription";
|
|
27
31
|
};
|
|
28
32
|
}, {}, {
|
|
29
33
|
fragment: "UpgradingSubscriptionContext_SubscriptionFragment";
|