@bunnyapp/components 1.6.0-beta.9.2 → 1.6.0-beta.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/dist/cjs/index.js +120 -102
  2. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionChargeTotal.d.ts +3 -3
  3. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/utils/filterSubscriptionCharges.d.ts +2 -0
  4. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/utils/sortSubscriptionCharges.d.ts +2 -0
  5. package/dist/cjs/types/src/types/SubscriptionCharge.d.ts +39 -0
  6. package/dist/esm/index.js +120 -102
  7. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/SubscriptionChargeTotal.d.ts +3 -3
  8. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/utils/filterSubscriptionCharges.d.ts +2 -0
  9. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/utils/sortSubscriptionCharges.d.ts +2 -0
  10. package/dist/esm/types/src/types/SubscriptionCharge.d.ts +39 -0
  11. package/package.json +1 -1
  12. package/dist/cjs/types/src/components/Invoice/InvoiceQuoteContext.d.ts +0 -16
  13. package/dist/cjs/types/src/components/PaymentForm/hooks/useHandlePayment.d.ts +0 -25
  14. package/dist/cjs/types/src/components/QuoteProvider/QuoteProvider.d.ts +0 -4
  15. package/dist/cjs/types/src/components/QuoteProvider/context/QuoteContext.d.ts +0 -19
  16. package/dist/cjs/types/src/components/QuoteProvider/fragments/quoteFieldsFragment.d.ts +0 -65
  17. package/dist/cjs/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +0 -13
  18. package/dist/cjs/types/src/components/QuoteProvider/hooks/useFeatureQuantities.d.ts +0 -12
  19. package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuoteCreate.d.ts +0 -9
  20. package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuoteQuantities.d.ts +0 -11
  21. package/dist/cjs/types/src/components/QuoteProvider/mutations/quoteChangeUpdate.d.ts +0 -12
  22. package/dist/cjs/types/src/components/QuoteProvider/queries/getQuote.d.ts +0 -6
  23. package/dist/cjs/types/src/components/QuoteProvider/utils/getQuantityFromQuoteChange.d.ts +0 -11
  24. package/dist/cjs/types/src/components/QuoteProvider/utils/quoteChangeCanBeEdited.d.ts +0 -4
  25. package/dist/cjs/types/src/components/Subscriptions/SubscriptionsContext.d.ts +0 -18
  26. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/PriceListCardDesktop.d.ts +0 -15
  27. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/PriceListCardPriceDescription.d.ts +0 -6
  28. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/utils/hasMultipleRecurringCharges.d.ts +0 -2
  29. package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/QuantityDrawer.d.ts +0 -15
  30. package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/fragments/QuantityDrawerQuoteFragment.d.ts +0 -10
  31. package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/hooks/useQuoteQueryData.d.ts +0 -3
  32. package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/hooks/useSetQuoteQueryData.d.ts +0 -5
  33. package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/queries/quoteChargeCreate.d.ts +0 -12
  34. package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/queries/quoteChargeUpdate.d.ts +0 -1
  35. package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/queries/quoteSubscriptionUpdate.d.ts +0 -1
  36. package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/utils/formatDateForApi.d.ts +0 -2
  37. package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/utils/utils.d.ts +0 -35
  38. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/SubscriptionCardHeader.d.ts +0 -7
  39. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/components/SubscriptionCardActions.d.ts +0 -21
  40. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/queries/getPriceListChangeOptions.d.ts +0 -5
  41. package/dist/cjs/types/src/components/Subscriptions/tieredDisplayDropdown/TieredDisplayDropdown.d.ts +0 -9
  42. package/dist/cjs/types/src/components/Subscriptions/tieredDisplayDropdown/util.d.ts +0 -9
  43. package/dist/cjs/types/src/components/Transactions/TransactionsListContext.d.ts +0 -28
  44. package/dist/cjs/types/src/components/priceListPricing/PricingTooltip.d.ts +0 -41
  45. package/dist/cjs/types/src/components/priceListPricing/components/ChargePriceTiers.d.ts +0 -23
  46. package/dist/cjs/types/src/components/priceListPricing/components/PriceTierPrice.d.ts +0 -7
  47. package/dist/cjs/types/src/components/priceListPricing/components/PriceTierRow.d.ts +0 -13
  48. package/dist/cjs/types/src/components/priceListPricing/misc/consts.d.ts +0 -1
  49. package/dist/cjs/types/src/components/priceListPricing/types/PriceTier.d.ts +0 -4
  50. package/dist/cjs/types/src/components/priceListPricing/utils/getPricingModelDescription.d.ts +0 -2
  51. package/dist/cjs/types/src/components/priceListPricing/utils/getPricingModelTitle.d.ts +0 -2
  52. package/dist/cjs/types/src/components/priceListPricing/utils/hasPriceTiers.d.ts +0 -9
  53. package/dist/cjs/types/src/components/priceListPricing/utils/priceListChargeUtil.ts/getChargeBasePrice.d.ts +0 -8
  54. package/dist/cjs/types/src/components/priceListPricing/utils/priceListChargeUtil.ts/getFirstTierPrice.d.ts +0 -7
  55. package/dist/cjs/types/src/graphql/queries/getFeatureUsage.d.ts +0 -7
  56. package/dist/cjs/types/src/graphql/queries/getSubscriptions.d.ts +0 -6
  57. package/dist/cjs/types/src/graphql-codegen/exportedScalarTypes.d.ts +0 -6
  58. package/dist/esm/types/src/components/Invoice/InvoiceQuoteContext.d.ts +0 -16
  59. package/dist/esm/types/src/components/PaymentForm/hooks/useHandlePayment.d.ts +0 -25
  60. package/dist/esm/types/src/components/QuoteProvider/QuoteProvider.d.ts +0 -4
  61. package/dist/esm/types/src/components/QuoteProvider/context/QuoteContext.d.ts +0 -19
  62. package/dist/esm/types/src/components/QuoteProvider/fragments/quoteFieldsFragment.d.ts +0 -65
  63. package/dist/esm/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +0 -13
  64. package/dist/esm/types/src/components/QuoteProvider/hooks/useFeatureQuantities.d.ts +0 -12
  65. package/dist/esm/types/src/components/QuoteProvider/hooks/useQuoteCreate.d.ts +0 -9
  66. package/dist/esm/types/src/components/QuoteProvider/hooks/useQuoteQuantities.d.ts +0 -11
  67. package/dist/esm/types/src/components/QuoteProvider/mutations/quoteChangeUpdate.d.ts +0 -12
  68. package/dist/esm/types/src/components/QuoteProvider/queries/getQuote.d.ts +0 -6
  69. package/dist/esm/types/src/components/QuoteProvider/utils/getQuantityFromQuoteChange.d.ts +0 -11
  70. package/dist/esm/types/src/components/QuoteProvider/utils/quoteChangeCanBeEdited.d.ts +0 -4
  71. package/dist/esm/types/src/components/Subscriptions/SubscriptionsContext.d.ts +0 -18
  72. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/PriceListCardDesktop.d.ts +0 -15
  73. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/PriceListCardPriceDescription.d.ts +0 -6
  74. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/utils/hasMultipleRecurringCharges.d.ts +0 -2
  75. package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/QuantityDrawer.d.ts +0 -15
  76. package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/fragments/QuantityDrawerQuoteFragment.d.ts +0 -10
  77. package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/hooks/useQuoteQueryData.d.ts +0 -3
  78. package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/hooks/useSetQuoteQueryData.d.ts +0 -5
  79. package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/queries/quoteChargeCreate.d.ts +0 -12
  80. package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/queries/quoteChargeUpdate.d.ts +0 -1
  81. package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/queries/quoteSubscriptionUpdate.d.ts +0 -1
  82. package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/utils/formatDateForApi.d.ts +0 -2
  83. package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/utils/utils.d.ts +0 -35
  84. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/SubscriptionCardHeader.d.ts +0 -7
  85. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/components/SubscriptionCardActions.d.ts +0 -21
  86. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/queries/getPriceListChangeOptions.d.ts +0 -5
  87. package/dist/esm/types/src/components/Subscriptions/tieredDisplayDropdown/TieredDisplayDropdown.d.ts +0 -9
  88. package/dist/esm/types/src/components/Subscriptions/tieredDisplayDropdown/util.d.ts +0 -9
  89. package/dist/esm/types/src/components/Transactions/TransactionsListContext.d.ts +0 -28
  90. package/dist/esm/types/src/components/priceListPricing/PricingTooltip.d.ts +0 -41
  91. package/dist/esm/types/src/components/priceListPricing/components/ChargePriceTiers.d.ts +0 -23
  92. package/dist/esm/types/src/components/priceListPricing/components/PriceTierPrice.d.ts +0 -7
  93. package/dist/esm/types/src/components/priceListPricing/components/PriceTierRow.d.ts +0 -13
  94. package/dist/esm/types/src/components/priceListPricing/misc/consts.d.ts +0 -1
  95. package/dist/esm/types/src/components/priceListPricing/types/PriceTier.d.ts +0 -4
  96. package/dist/esm/types/src/components/priceListPricing/utils/getPricingModelDescription.d.ts +0 -2
  97. package/dist/esm/types/src/components/priceListPricing/utils/getPricingModelTitle.d.ts +0 -2
  98. package/dist/esm/types/src/components/priceListPricing/utils/hasPriceTiers.d.ts +0 -9
  99. package/dist/esm/types/src/components/priceListPricing/utils/priceListChargeUtil.ts/getChargeBasePrice.d.ts +0 -8
  100. package/dist/esm/types/src/components/priceListPricing/utils/priceListChargeUtil.ts/getFirstTierPrice.d.ts +0 -7
  101. package/dist/esm/types/src/graphql/queries/getFeatureUsage.d.ts +0 -7
  102. package/dist/esm/types/src/graphql/queries/getSubscriptions.d.ts +0 -6
  103. package/dist/esm/types/src/graphql-codegen/exportedScalarTypes.d.ts +0 -6
@@ -1,6 +1,6 @@
1
- import { Subscription, SubscriptionCharge } from '@bunnyapp/common';
2
- declare const SubscriptionChargeTotal: ({ charge, subscription, }: {
1
+ import { SubscriptionCharge } from '@bunnyapp/common';
2
+ declare const SubscriptionChargeTotal: ({ charge, currencyId, }: {
3
3
  charge: SubscriptionCharge;
4
- subscription: Subscription;
4
+ currencyId: string;
5
5
  }) => import("react/jsx-runtime").JSX.Element;
6
6
  export default SubscriptionChargeTotal;
@@ -0,0 +1,2 @@
1
+ import { SubscriptionCharge } from '../../../../types/SubscriptionCharge';
2
+ export declare const filterSubscriptionCharges: (charges: SubscriptionCharge[]) => SubscriptionCharge[];
@@ -0,0 +1,2 @@
1
+ import { SubscriptionCharge } from '../../../../types/SubscriptionCharge';
2
+ export declare const sortSubscriptionCharges: (charges: SubscriptionCharge[]) => SubscriptionCharge[];
@@ -0,0 +1,39 @@
1
+ import { Account, BillingPeriod, ChargeType, Currency, Feature, FeatureUsage, PriceList, PriceListCharge, PriceTier, PricingModel, QuoteChangeKind } from '@bunnyapp/common';
2
+ export type SubscriptionCharge = {
3
+ account: Account;
4
+ amount: number;
5
+ billingPeriod: BillingPeriod;
6
+ chargeType: ChargeType;
7
+ createdAt: string;
8
+ currency: Currency;
9
+ discount?: number;
10
+ discountedPrice: string;
11
+ endDate: string;
12
+ expired: boolean;
13
+ feature?: Feature;
14
+ id: string;
15
+ invoiceLineText: string;
16
+ isAmendment: boolean;
17
+ isRamp?: boolean;
18
+ kind: QuoteChangeKind;
19
+ name: string;
20
+ periodPrice: number;
21
+ price: string;
22
+ priceDecimals: number;
23
+ priceList: PriceList;
24
+ priceListCharge?: PriceListCharge;
25
+ priceListChargeId: string;
26
+ priceListId: string;
27
+ priceTiers: PriceTier[];
28
+ pricingModel: PricingModel;
29
+ prorationRate?: number;
30
+ quantity: number;
31
+ quantityMax?: number;
32
+ quantityMin?: number;
33
+ selfServiceQuantity?: boolean;
34
+ startDate: string;
35
+ tieredAveragePrice?: number;
36
+ trial: boolean;
37
+ updatedAt: string;
38
+ histogram?: FeatureUsage;
39
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bunnyapp/components",
3
- "version": "1.6.0-beta.9.2",
3
+ "version": "1.6.0-beta.9.4",
4
4
  "description": "Components from the Bunny portal to embed Bunny UI functionality into your application.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -1,16 +0,0 @@
1
- import { ShadowType } from "../../types/shadowType";
2
- import { FormattedInvoice, FormattedQuote } from "@bunnyapp/common";
3
- export type InvoiceQuoteContextProps = {
4
- id?: string;
5
- invoiceQuoteViewComponent?: React.ReactNode;
6
- backButtonName?: string;
7
- onBackButtonClick?: () => void;
8
- onInvoiceDownloadError?: () => void;
9
- onPaymentSuccess?: (savePaymentMethod?: boolean) => void;
10
- shadow?: ShadowType;
11
- className?: string;
12
- hideDownloadButton?: boolean;
13
- onInvoiceLoaded?: (formattedInvoice: FormattedInvoice) => void;
14
- onQuoteLoaded?: (formattedQuote: FormattedQuote) => void;
15
- };
16
- export declare const InvoiceQuoteContext: import("react").Context<InvoiceQuoteContextProps>;
@@ -1,25 +0,0 @@
1
- import { FormattedInvoice, Invoice, PluginData, Quote } from '@bunnyapp/common';
2
- export declare enum PaymentType {
3
- PAY = "PAY",
4
- APPROVE_HOLD = "APPROVE_HOLD"
5
- }
6
- declare const useHandlePayment: ({ quote, invoice, onPaymentSuccess, onPaymentHoldSuccess, plugin, paymentHoldOptions, }: {
7
- quote?: Quote;
8
- invoice?: FormattedInvoice | Invoice;
9
- onPaymentSuccess?: (response: any) => void;
10
- onPaymentHoldSuccess?: (response: any) => void;
11
- plugin: PluginData | undefined;
12
- paymentHoldOptions: {
13
- payToAccept?: boolean;
14
- amountToHold?: number;
15
- };
16
- }) => {
17
- handlePayment: ({ overridePaymentMethodId, }: {
18
- overridePaymentMethodId?: string;
19
- }) => Promise<void>;
20
- payableAvailable: boolean;
21
- isPaying: boolean;
22
- paymentType: PaymentType;
23
- formattedAmountDue: string | number;
24
- };
25
- export default useHandlePayment;
@@ -1,4 +0,0 @@
1
- declare function QuoteProvider({ children }: {
2
- children: React.ReactNode;
3
- }): import("react/jsx-runtime").JSX.Element;
4
- export default QuoteProvider;
@@ -1,19 +0,0 @@
1
- import { PriceList } from '@bunnyapp/common';
2
- import { ResultOf } from 'gql.tada';
3
- import { QuoteContext_QuoteFragment } from '../fragments/quoteFragment';
4
- export type QuoteContextValues = {
5
- quote: ResultOf<typeof QuoteContext_QuoteFragment> | null | undefined;
6
- selectedPriceList: PriceList | undefined;
7
- isQuotePending: boolean;
8
- isAddonPlanLoading: boolean;
9
- isFeatureAddonsLoading: boolean;
10
- isUpdatingQuote: boolean;
11
- setIsAddonPlanLoading: React.Dispatch<React.SetStateAction<boolean>>;
12
- addFeatureAddonLoading: (featureAddonId: string) => void;
13
- removeFeatureAddonLoading: (featureAddonId: string) => void;
14
- getFeatureQuantity: (featureId: string, chargeId: string) => number | undefined;
15
- onClearQuote: () => void;
16
- onChangeSelectedPriceList: (priceList: PriceList) => void;
17
- onChangeQuantity: (priceListChargeId: string, quantity: number) => void;
18
- };
19
- export declare const QuoteContext: import("react").Context<QuoteContextValues>;
@@ -1,65 +0,0 @@
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: "ACTIVATE" | "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT";
21
- quoteChanges: {
22
- currencyId: string;
23
- id: string | null;
24
- kind: "ACTIVATE" | "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT";
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: "ACTIVATE" | "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | 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,13 +0,0 @@
1
- /**
2
- * Central quote fragment for QuoteProvider context.
3
- *
4
- * This fragment aggregates all child component fragments to ensure the QuoteProvider
5
- * fetches all required quote data upfront. When a component needs specific quote fields,
6
- * add its fragment here to maintain type safety and avoid over-fetching.
7
- *
8
- * Pattern: Fragment Composition
9
- * - Components define their data needs via fragments
10
- * - Provider composes these fragments into a single query
11
- * - Type safety ensures all required fields are fetched
12
- */
13
- export declare const QuoteContext_QuoteFragment: any;
@@ -1,12 +0,0 @@
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
- };
@@ -1,9 +0,0 @@
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: any;
8
- isQuotePending: boolean;
9
- };
@@ -1,11 +0,0 @@
1
- import { PriceList } from '@bunnyapp/common';
2
- import { ResultOf } from 'gql.tada';
3
- import { QuoteContext_QuoteFragment } from '../fragments/quoteFragment';
4
- export declare const useQuoteQuantities: ({ selectedPriceList, quote, }: {
5
- selectedPriceList: PriceList;
6
- quote: ResultOf<typeof QuoteContext_QuoteFragment> | null | undefined;
7
- }) => {
8
- onChangeQuantity: (priceListChargeId: string, quantity: number) => void;
9
- getFeatureQuantity: (featureId: string) => number | undefined;
10
- isUpdatingCharges: boolean;
11
- };
@@ -1,12 +0,0 @@
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: any;
11
- } | null | undefined>;
12
- export default quoteChangeUpdate;
@@ -1,6 +0,0 @@
1
- export declare const getQuote: ({ id, token, apiHost, includeHtmlField, }: {
2
- id: string;
3
- token?: string;
4
- apiHost: string;
5
- includeHtmlField?: boolean;
6
- }) => Promise<any>;
@@ -1,11 +0,0 @@
1
- export declare function getQuantityFromQuoteChange(quoteChange: {
2
- priceList: {
3
- id: string;
4
- } | null;
5
- charges: {
6
- feature: {
7
- id: string;
8
- } | null;
9
- quantity: number | null;
10
- }[];
11
- } | null, featureId: string): number | null | undefined;
@@ -1,4 +0,0 @@
1
- import { QuoteChangeKind } from '@/graphql-codegen/exportedScalarTypes';
2
- export declare function isQuoteChangeEditable(quoteChange: {
3
- kind: QuoteChangeKind;
4
- }): boolean;
@@ -1,18 +0,0 @@
1
- import { Subscription } from '@bunnyapp/common';
2
- export type SubscriptionsContextValues = {
3
- gap?: number;
4
- shadow?: 'none' | 'sm' | 'md' | 'lg';
5
- showTitle?: boolean;
6
- className?: string;
7
- subscriptionProductNameStyle?: React.CSSProperties;
8
- productId?: string;
9
- isInPreviewMode: boolean;
10
- hideExpired?: boolean;
11
- upgradingSubscription?: Subscription;
12
- setUpgradingSubscription: React.Dispatch<React.SetStateAction<Subscription | undefined>>;
13
- updatingChargeQuantityId?: string;
14
- setUpdatingChargeQuantityId: React.Dispatch<React.SetStateAction<string | undefined>>;
15
- subscriptionUpgradeId: string | null;
16
- setSubscriptionUpgradeId: React.Dispatch<React.SetStateAction<string | null>>;
17
- };
18
- export declare const SubscriptionsContext: import("react").Context<SubscriptionsContextValues>;
@@ -1,15 +0,0 @@
1
- import { Feature, PriceList, Subscription } from '@bunnyapp/common';
2
- declare const PriceListCardDesktop: ({ hideButton, description, disableSelectCurrentPlan, feature, isPriceListCurrentSubscription, isSelected, priceList, subscriptionPlan, trialRemainingDays, noBorder, onClickPriceListCard, }: {
3
- hideButton?: boolean;
4
- description: string;
5
- disableSelectCurrentPlan: boolean;
6
- feature?: Feature;
7
- isPriceListCurrentSubscription: boolean;
8
- isSelected: boolean;
9
- priceList: PriceList;
10
- subscriptionPlan?: Subscription;
11
- trialRemainingDays?: number;
12
- noBorder?: boolean;
13
- onClickPriceListCard?: (priceList: PriceList) => void;
14
- }) => import("react/jsx-runtime").JSX.Element;
15
- export default PriceListCardDesktop;
@@ -1,6 +0,0 @@
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;
@@ -1,2 +0,0 @@
1
- import { PriceList } from '@bunnyapp/common';
2
- export declare const hasMultipleRecurringCharges: (priceList: PriceList) => number;
@@ -1,15 +0,0 @@
1
- import { FragmentOf } from 'gql.tada';
2
- import { QuantityDrawerDesktop_SubscriptionFragment } from './quantityChangeDrawerDesktop/QuantityChangeDrawerDesktop';
3
- export type EditingQuoteDataType = {
4
- id: string;
5
- isTrial: boolean;
6
- };
7
- interface QuantityDrawerProps {
8
- subscriptions: (FragmentOf<typeof QuantityDrawerDesktop_SubscriptionFragment> | null)[];
9
- quantityDrawerOpen: boolean;
10
- setQuantityDrawerOpen: (open: boolean) => void;
11
- handlePortalErrors?: (errors: any) => void;
12
- setShowInactive: (showInactive: boolean) => void;
13
- }
14
- export declare const QuantityDrawer: ({ subscriptions, quantityDrawerOpen, setQuantityDrawerOpen, handlePortalErrors, setShowInactive, }: QuantityDrawerProps) => import("react/jsx-runtime").JSX.Element;
15
- export {};
@@ -1,10 +0,0 @@
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
- }>;
@@ -1,3 +0,0 @@
1
- import { FragmentOf } from 'gql.tada';
2
- import { QuantityDrawer_QuoteFragment } from '../fragments/QuantityDrawerQuoteFragment';
3
- export declare const useQuoteQueryData: (quoteId: string | undefined) => FragmentOf<typeof QuantityDrawer_QuoteFragment> | undefined;
@@ -1,5 +0,0 @@
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
- };
@@ -1,12 +0,0 @@
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<any>;
12
- export {};
@@ -1 +0,0 @@
1
- export declare const quoteChargeUpdate: (quoteChargeId: string, quantity: number, apiHost: string, token?: string) => Promise<any>;
@@ -1 +0,0 @@
1
- export declare const quoteSubscriptionUpdate: (subscriptionIds: string[], apiHost: string, token?: string) => Promise<any>;
@@ -1,2 +0,0 @@
1
- import { Dayjs } from 'dayjs';
2
- export declare const formatDateForApi: (date: Dayjs | string) => string;
@@ -1,35 +0,0 @@
1
- import { FragmentOf } from 'gql.tada';
2
- export declare const CanShowQuantitiesInput_SubscriptionChargeFragment: import("gql.tada").TadaDocumentNode<{
3
- id: string | null;
4
- pricingModel: "FLAT" | "TIERED" | "VOLUME" | "BANDS" | null;
5
- expired: boolean;
6
- selfServiceQuantity: boolean | null;
7
- }, {}, {
8
- fragment: "CanShowQuantitiesInput_SubscriptionChargeFragment";
9
- on: "SubscriptionCharge";
10
- masked: true;
11
- }>;
12
- export declare const CanShowQuantitiesInput_SubscriptionFragment: import("gql.tada").TadaDocumentNode<{
13
- id: string;
14
- state: "ACTIVE" | "TRIAL" | "CANCELED" | "EXPIRED" | "TRIAL_EXPIRED" | "PENDING";
15
- priceList: {
16
- id: string;
17
- } | null;
18
- chargeReport: {
19
- [$tada.fragmentRefs]: {
20
- CanShowQuantitiesInput_SubscriptionChargeFragment: "SubscriptionCharge";
21
- };
22
- }[] | null;
23
- }, {}, {
24
- fragment: "CanShowQuantitiesInput_SubscriptionFragment";
25
- on: "Subscription";
26
- masked: true;
27
- }>;
28
- export declare const getUpdatingChargeQuantityId: (priceListChargeId: string, subscriptionId: string) => string;
29
- export declare const canShowQuantitiesInput: ({ charge: maskedCharge, subscription: maskedSubscription, }: {
30
- charge: FragmentOf<typeof CanShowQuantitiesInput_SubscriptionChargeFragment>;
31
- subscription: FragmentOf<typeof CanShowQuantitiesInput_SubscriptionFragment>;
32
- }) => boolean | null;
33
- export declare const canShowChangeQuantities: ({ subscriptions, }: {
34
- subscriptions: (FragmentOf<typeof CanShowQuantitiesInput_SubscriptionFragment> | null)[];
35
- }) => boolean;
@@ -1,7 +0,0 @@
1
- import { Subscription } from '@bunnyapp/common';
2
- declare const SubscriptionCardHeader: ({ onChangePlanClick, onCancelSubscriptionClick, subscription, }: {
3
- onChangePlanClick?: (subscription: Subscription) => void;
4
- onCancelSubscriptionClick?: (subscription: Subscription) => void;
5
- subscription: Subscription;
6
- }) => import("react/jsx-runtime").JSX.Element;
7
- export default SubscriptionCardHeader;
@@ -1,21 +0,0 @@
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;
@@ -1,5 +0,0 @@
1
- export declare const getPriceListChangeOptions: ({ apiHost, productId, token, }: {
2
- apiHost: string;
3
- productId: string;
4
- token?: string;
5
- }) => Promise<any>;
@@ -1,9 +0,0 @@
1
- import { PriceTier } from '@bunnyapp/common';
2
- import { ReactNode } from 'react';
3
- declare const TieredDisplayDropdown: ({ priceTiers, currencyId, priceDecimals, truncatedText, }: {
4
- priceTiers: PriceTier[];
5
- currencyId: string;
6
- priceDecimals: number;
7
- truncatedText: ReactNode;
8
- }) => import("react/jsx-runtime").JSX.Element;
9
- export default TieredDisplayDropdown;
@@ -1,9 +0,0 @@
1
- import { PricingModel } from '../../../graphql-codegen/exportedScalarTypes';
2
- export declare const getApplicablePriceTier: (charge: {
3
- priceTiers: {
4
- starts: number | null;
5
- price: number | null;
6
- }[] | null;
7
- pricingModel: PricingModel | null;
8
- quantity: number | null;
9
- }, currencyId: string, priceDecimals: number) => string;
@@ -1,28 +0,0 @@
1
- import { Transaction, TransactionKind } from '@bunnyapp/common';
2
- import { ShadowType } from '../../types/shadowType';
3
- import { TransactionListColumnType } from './transactionsList/TransactionsListDesktop';
4
- export type TransactionsContextValues = {
5
- showSearchBar?: boolean;
6
- showTitle?: boolean;
7
- title?: string;
8
- transactionComponent?: React.ReactNode;
9
- transactionStateRenderer?: (state: string) => React.ReactNode;
10
- columns: TransactionListColumnType[];
11
- className?: string;
12
- shadow?: ShadowType;
13
- searchBarClassName?: string;
14
- useModal?: boolean;
15
- onTransactionClick?: (transaction: Transaction) => void;
16
- onTransactionDisplayClose?: (transaction: Transaction | null) => void;
17
- suppressTransactionDisplay?: boolean;
18
- kindsToShow?: TransactionKind[];
19
- style?: React.CSSProperties;
20
- filter?: string;
21
- noTransactionsMessage?: string;
22
- downloadTransactionLink?: (id: string) => string;
23
- filterTransactions?: (transaction: Transaction) => boolean;
24
- sortTransactions?: (transactionA: Transaction, transactionB: Transaction) => number;
25
- transactionDateType: TransactionDateType;
26
- };
27
- export type TransactionDateType = 'createdAt' | 'issuedAt' | 'dueAt';
28
- export declare const TransactionsListContext: import("react").Context<TransactionsContextValues>;
@@ -1,41 +0,0 @@
1
- import { PlanPricingStyles, PricingModel } from '@/graphql-codegen/exportedScalarTypes';
2
- import { FragmentOf } from 'gql.tada';
3
- export declare const PricingTooltip_PriceListChargeFragment: import("gql.tada").TadaDocumentNode<{
4
- priceListChargeTiers: {
5
- starts: number | null;
6
- price: number | null;
7
- }[] | null;
8
- pricingModel: "FLAT" | "TIERED" | "VOLUME" | "BANDS" | null;
9
- feature: {
10
- unitName: string | null;
11
- } | null;
12
- priceDecimals: number | null;
13
- basePrice: number;
14
- name: string;
15
- [$tada.fragmentRefs]: {
16
- ChargePriceTiers_PriceListChargeFragment: "PriceListCharge";
17
- };
18
- }, {}, {
19
- fragment: "PricingTooltip_PriceListChargeFragment";
20
- on: "PriceListCharge";
21
- masked: true;
22
- }>;
23
- export declare const PricingTooltip: ({ className, priceListCharges: maskedPriceListCharges, currencyId, priceList, }: {
24
- className?: string;
25
- priceListCharges: FragmentOf<typeof PricingTooltip_PriceListChargeFragment>[];
26
- currencyId: string;
27
- priceList: {
28
- showPriceAsMonthly?: boolean;
29
- periodMonths?: number;
30
- charges: {
31
- pricingModel?: PricingModel;
32
- basePrice?: number;
33
- }[];
34
- plan: {
35
- pricingStyle?: PlanPricingStyles;
36
- };
37
- currencyId?: string;
38
- monthlyBasePrice?: number;
39
- basePrice?: number;
40
- };
41
- }) => import("react/jsx-runtime").JSX.Element;
@@ -1,23 +0,0 @@
1
- import { FragmentOf } from 'gql.tada';
2
- export declare const ChargePriceTiers_PriceListChargeFragment: import("gql.tada").TadaDocumentNode<{
3
- id: string;
4
- name: string;
5
- pricingModel: "FLAT" | "TIERED" | "VOLUME" | "BANDS" | null;
6
- priceDecimals: number | null;
7
- priceListChargeTiers: {
8
- starts: number | null;
9
- price: number | null;
10
- [$tada.fragmentRefs]: {
11
- PriceTierRow_PriceTierFragment: "PriceListChargeTier";
12
- };
13
- }[] | null;
14
- }, {}, {
15
- fragment: "ChargePriceTiers_PriceListChargeFragment";
16
- on: "PriceListCharge";
17
- masked: true;
18
- }>;
19
- declare const ChargePriceTiers: ({ charge: maskedCharge, currencyId, }: {
20
- charge: FragmentOf<typeof ChargePriceTiers_PriceListChargeFragment>;
21
- currencyId: string;
22
- }) => import("react/jsx-runtime").JSX.Element;
23
- export default ChargePriceTiers;
@@ -1,7 +0,0 @@
1
- import { PriceTier } from '../types/PriceTier';
2
- declare const PriceTierPrice: ({ currencyId, priceDecimals, tier, }: {
3
- currencyId: string;
4
- priceDecimals: number;
5
- tier: PriceTier;
6
- }) => import("react/jsx-runtime").JSX.Element;
7
- export default PriceTierPrice;
@@ -1,13 +0,0 @@
1
- import { FragmentOf } from 'gql.tada';
2
- export declare const PriceTierRow_PriceTierFragment: import("gql.tada").TadaDocumentNode<{
3
- starts: number | null;
4
- }, {}, {
5
- fragment: "PriceTierRow_PriceTierFragment";
6
- on: "PriceListChargeTier";
7
- masked: true;
8
- }>;
9
- declare const PriceTierRow: ({ tier: maskedTier, nextTier: maskedNextTier, }: {
10
- tier: FragmentOf<typeof PriceTierRow_PriceTierFragment> | null;
11
- nextTier: FragmentOf<typeof PriceTierRow_PriceTierFragment> | null;
12
- }) => import("react/jsx-runtime").JSX.Element;
13
- export default PriceTierRow;
@@ -1 +0,0 @@
1
- export declare const TOOLTIP_BG_COLOR = "#2F353B";
@@ -1,4 +0,0 @@
1
- export type PriceTier = {
2
- starts: number | null;
3
- price: number | null;
4
- };