@bunnyapp/components 1.8.0-beta.30 → 1.8.0-beta.32

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 (19) hide show
  1. package/dist/cjs/index.js +32 -32
  2. package/dist/cjs/types/src/components/Subscriptions/fragments/Subscriptions_SubscriptionFragment.d.ts +0 -2
  3. package/dist/cjs/types/src/components/Subscriptions/queries/getSubscriptionChargeHistograms.d.ts +16 -0
  4. package/dist/cjs/types/src/components/Subscriptions/queries/getSubscriptions.d.ts +0 -184
  5. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionListSkeleton.d.ts +4 -0
  6. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/SubscriptionCardDesktopRow.d.ts +2 -10
  7. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/UsageCell.d.ts +8 -0
  8. package/dist/cjs/types/src/hooks/useIsVisible.d.ts +4 -0
  9. package/dist/cjs/types/src/utils/QueryKeyFactory.d.ts +4 -0
  10. package/dist/esm/index.js +32 -32
  11. package/dist/esm/types/src/components/Subscriptions/fragments/Subscriptions_SubscriptionFragment.d.ts +0 -2
  12. package/dist/esm/types/src/components/Subscriptions/queries/getSubscriptionChargeHistograms.d.ts +16 -0
  13. package/dist/esm/types/src/components/Subscriptions/queries/getSubscriptions.d.ts +0 -184
  14. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/SubscriptionListSkeleton.d.ts +4 -0
  15. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/SubscriptionCardDesktopRow.d.ts +2 -10
  16. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/UsageCell.d.ts +8 -0
  17. package/dist/esm/types/src/hooks/useIsVisible.d.ts +4 -0
  18. package/dist/esm/types/src/utils/QueryKeyFactory.d.ts +4 -0
  19. package/package.json +1 -1
@@ -2,8 +2,6 @@ export declare const Subscriptions_SubscriptionFragment: import("gql.tada").Tada
2
2
  state: "ACTIVE" | "TRIAL" | "CANCELED" | "EXPIRED" | "TRIAL_EXPIRED" | "PENDING";
3
3
  id: string;
4
4
  [$tada.fragmentRefs]: {
5
- UpgradingSubscriptionContext_SubscriptionFragment: "Subscription";
6
- } & {
7
5
  SubscriptionsListContainer_SubscriptionFragment: "Subscription";
8
6
  } & {
9
7
  CanShowQuantitiesInput_SubscriptionFragment: "Subscription";
@@ -0,0 +1,16 @@
1
+ export declare const getSubscriptionChargeHistograms: ({ id, apiHost, token, }: {
2
+ id: string;
3
+ apiHost: string;
4
+ token?: string;
5
+ }) => Promise<{
6
+ subscription: {
7
+ chargeReport: {
8
+ priceListChargeId: string | null;
9
+ histogram: {
10
+ [$tada.fragmentRefs]: {
11
+ FeatureUsageGraph_HistogramFragment: "Histogram";
12
+ };
13
+ } | null;
14
+ }[] | null;
15
+ } | null;
16
+ }>;
@@ -5,190 +5,6 @@ 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
- id: string;
22
- period: string;
23
- account: {
24
- id: string;
25
- };
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
- trialEndDate: unknown;
53
- trialPeriod: string;
54
- trialStartDate: unknown;
55
- trialExpirationAction: "ACTIVATE" | "CANCEL" | null;
56
- charges: {
57
- priceListCharge: {
58
- priceListChargeTiers: {
59
- price: number | null;
60
- starts: number | null;
61
- }[] | null;
62
- featureAddon: boolean | null;
63
- id: string;
64
- } | null;
65
- amount: number | null;
66
- billingPeriod: "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "ANNUAL" | "ONCE" | null;
67
- chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
68
- discount: number | null;
69
- discountedPrice: string | null;
70
- endDate: unknown;
71
- expired: boolean;
72
- feature: {
73
- name: string;
74
- } | null;
75
- id: string | null;
76
- isAmendment: boolean;
77
- isRamp: boolean;
78
- kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "PERCENTAGE_DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
79
- name: string | null;
80
- periodPrice: number | null;
81
- price: string | null;
82
- priceDecimals: number | null;
83
- priceListChargeId: string | null;
84
- priceTiers: {
85
- starts: number | null;
86
- price: number | null;
87
- }[] | null;
88
- pricingModel: "FLAT" | "TIERED" | "VOLUME" | "BANDS" | null;
89
- quantity: number | null;
90
- selfServiceQuantity: boolean | null;
91
- startDate: unknown;
92
- trial: boolean;
93
- }[] | null;
94
- chargeReport: {
95
- [$tada.fragmentRefs]: {
96
- CanShowQuantitiesInput_SubscriptionChargeFragment: "Undefined Fragment";
97
- };
98
- priceListCharge: {
99
- priceListChargeTiers: {
100
- price: number | null;
101
- starts: number | null;
102
- }[] | null;
103
- featureAddon: boolean | null;
104
- id: string;
105
- code: string | null;
106
- } | null;
107
- histogram: {
108
- feature: {
109
- id: string;
110
- name: string;
111
- };
112
- periodRange: string;
113
- dataInterval: "MONTHLY" | "QUARTERLY" | "DAILY" | "SEMIANNUALLY" | "YEARLY";
114
- data: {
115
- periodStart: unknown;
116
- periodEnd: unknown;
117
- intervals: {
118
- intervalStart: unknown;
119
- intervalUsage: number;
120
- }[];
121
- intervalsTotal: number;
122
- }[] | null;
123
- } | null;
124
- amount: number | null;
125
- billingPeriod: "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "ANNUAL" | "ONCE" | null;
126
- chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
127
- discount: number | null;
128
- discountedPrice: string | null;
129
- endDate: unknown;
130
- expired: boolean;
131
- feature: {
132
- name: string;
133
- } | null;
134
- id: string | null;
135
- isAmendment: boolean;
136
- isRamp: boolean;
137
- kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "PERCENTAGE_DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
138
- name: string | null;
139
- periodPrice: number | null;
140
- price: string | null;
141
- priceDecimals: number | null;
142
- priceListChargeId: string | null;
143
- priceTiers: {
144
- starts: number | null;
145
- price: number | null;
146
- }[] | null;
147
- pricingModel: "FLAT" | "TIERED" | "VOLUME" | "BANDS" | null;
148
- quantity: number | null;
149
- selfServiceQuantity: boolean | null;
150
- startDate: unknown;
151
- trial: boolean;
152
- }[] | null;
153
- currentCharges: {
154
- priceListCharge: {
155
- priceListChargeTiers: {
156
- price: number | null;
157
- starts: number | null;
158
- }[] | null;
159
- featureAddon: boolean | null;
160
- id: string;
161
- code: string | null;
162
- } | null;
163
- amount: number | null;
164
- billingPeriod: "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "ANNUAL" | "ONCE" | null;
165
- chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
166
- discount: number | null;
167
- discountedPrice: string | null;
168
- endDate: unknown;
169
- expired: boolean;
170
- feature: {
171
- name: string;
172
- } | null;
173
- id: string | null;
174
- isAmendment: boolean;
175
- isRamp: boolean;
176
- kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "PERCENTAGE_DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
177
- name: string | null;
178
- periodPrice: number | null;
179
- price: string | null;
180
- priceDecimals: number | null;
181
- priceListChargeId: string | null;
182
- priceTiers: {
183
- starts: number | null;
184
- price: number | null;
185
- }[] | null;
186
- pricingModel: "FLAT" | "TIERED" | "VOLUME" | "BANDS" | null;
187
- quantity: number | null;
188
- selfServiceQuantity: boolean | null;
189
- startDate: unknown;
190
- trial: boolean;
191
- }[] | null;
192
8
  [$tada.fragmentRefs]: {
193
9
  Subscriptions_SubscriptionFragment: "Subscription";
194
10
  };
@@ -0,0 +1,4 @@
1
+ declare const SubscriptionListSkeleton: ({ className }: {
2
+ className?: string;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ export default SubscriptionListSkeleton;
@@ -10,15 +10,6 @@ export declare const SubscriptionCardDesktopRow_SubscriptionChargeFragment: impo
10
10
  quantity: number | null;
11
11
  name: string | null;
12
12
  isAmendment: boolean;
13
- histogram: {
14
- feature: {
15
- id: string;
16
- name: string;
17
- };
18
- [$tada.fragmentRefs]: {
19
- FeatureUsageGraph_HistogramFragment: "Histogram";
20
- };
21
- } | null;
22
13
  [$tada.fragmentRefs]: {
23
14
  SubscriptionChargeTotal_SubscriptionChargeFragment: "SubscriptionCharge";
24
15
  } & {
@@ -31,9 +22,10 @@ export declare const SubscriptionCardDesktopRow_SubscriptionChargeFragment: impo
31
22
  on: "SubscriptionCharge";
32
23
  masked: true;
33
24
  }>;
34
- export declare const SubscriptionCardDesktopRow: ({ charge: maskedCharge, chargeIndex, charges: maskedCharges, currencyId, }: {
25
+ export declare const SubscriptionCardDesktopRow: ({ charge: maskedCharge, chargeIndex, charges: maskedCharges, currencyId, subscriptionId, }: {
35
26
  charge: FragmentOf<typeof SubscriptionCardDesktopRow_SubscriptionChargeFragment>;
36
27
  chargeIndex: number;
37
28
  charges: FragmentOf<typeof SubscriptionCardDesktopRow_SubscriptionChargeFragment>[];
38
29
  currencyId: string;
30
+ subscriptionId: string;
39
31
  }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { FeatureUsageGraph_SubscriptionChargeFragment } from '@/components/FeatureUsageGraph';
2
+ import { FragmentOf } from 'gql.tada';
3
+ declare const UsageCell: ({ subscriptionId, priceListChargeId, charge, }: {
4
+ subscriptionId: string;
5
+ priceListChargeId: string;
6
+ charge: FragmentOf<typeof FeatureUsageGraph_SubscriptionChargeFragment>;
7
+ }) => import("react/jsx-runtime").JSX.Element | null;
8
+ export default UsageCell;
@@ -0,0 +1,4 @@
1
+ import { RefObject } from 'react';
2
+ export declare const useIsVisible: <T extends Element = HTMLDivElement>(options?: IntersectionObserverInit & {
3
+ once?: boolean;
4
+ }) => [RefObject<T>, boolean];
@@ -106,6 +106,10 @@ declare const QueryKeyFactory: {
106
106
  token?: string;
107
107
  }) => string[];
108
108
  paymentPluginsKey: (token?: string) => string[];
109
+ subscriptionChargeHistogramsKey: ({ subscriptionId, token, }: {
110
+ subscriptionId: string;
111
+ token?: string;
112
+ }) => string[];
109
113
  signupAccount: (token?: string) => string[];
110
114
  signupPriceList: (code?: string, token?: string) => string[];
111
115
  };