@buildbase/sdk 0.0.21 → 0.0.23
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 +18 -2
- package/dist/index.d.ts +215 -5
- package/dist/index.esm.js +5 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/saas-os.css +1 -1
- package/dist/types/api/pricing-variant-utils.d.ts +13 -0
- package/dist/types/api/types.d.ts +56 -1
- package/dist/types/components/subscription/index.d.ts +65 -0
- package/dist/types/contexts/QuotaUsageContext/quotaUsageInvalidation.d.ts +2 -0
- package/dist/types/contexts/SubscriptionContext/subscriptionInvalidation.d.ts +2 -0
- package/dist/types/contexts/WorkspaceContext/actions.d.ts +3 -0
- package/dist/types/contexts/WorkspaceContext/types.d.ts +9 -0
- package/dist/types/contexts/shared/utils/storage.d.ts +4 -2
- package/dist/types/hooks/use-seat-status.d.ts +42 -0
- package/dist/types/hooks/use-trial-status.d.ts +28 -0
- package/dist/types/index.d.ts +7 -3
- package/dist/types/providers/workspace/api.d.ts +2 -2
- package/dist/types/providers/workspace/subscription-hooks.d.ts +2 -2
- package/dist/types/providers/workspace/types.d.ts +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,6 +36,7 @@ A React SDK for [BuildBase](https://www.buildbase.app/) that provides essential
|
|
|
36
36
|
- **🎯 Feature Flags** - Workspace-level and user-level feature toggles
|
|
37
37
|
- **📋 Subscription Gates** - Show or hide UI based on current workspace subscription (plan)
|
|
38
38
|
- **📊 Quota Usage Tracking** - Record and monitor metered usage (API calls, storage, etc.) with real-time status
|
|
39
|
+
- **📈 Usage Dashboard** - Built-in workspace settings page showing quota consumption, overage billing breakdowns, and billing period info
|
|
39
40
|
- **👤 User Management** - User attributes and feature flags management
|
|
40
41
|
- **📝 Beta Form** - Pre-built signup/waitlist form component
|
|
41
42
|
- **📡 Event System** - Subscribe to user and workspace events
|
|
@@ -224,10 +225,24 @@ const {
|
|
|
224
225
|
status, // AuthStatus: 'loading' | 'redirecting' | 'authenticating' | 'authenticated' | 'unauthenticated' (use AuthStatus enum for type-safe checks)
|
|
225
226
|
signIn, // Function: initiates sign-in flow
|
|
226
227
|
signOut, // Function: signs out the user
|
|
227
|
-
openWorkspaceSettings, // Function: opens workspace settings dialog
|
|
228
|
+
openWorkspaceSettings, // Function: opens workspace settings dialog to a specific section
|
|
228
229
|
} = useSaaSAuth();
|
|
229
230
|
```
|
|
230
231
|
|
|
232
|
+
#### Workspace Settings Sections
|
|
233
|
+
|
|
234
|
+
Open the workspace settings dialog to a specific section:
|
|
235
|
+
|
|
236
|
+
```tsx
|
|
237
|
+
openWorkspaceSettings('profile'); // Account profile
|
|
238
|
+
openWorkspaceSettings('general'); // Workspace name, icon
|
|
239
|
+
openWorkspaceSettings('users'); // Workspace members
|
|
240
|
+
openWorkspaceSettings('subscription'); // Plan & Billing
|
|
241
|
+
openWorkspaceSettings('usage'); // Quota usage dashboard
|
|
242
|
+
openWorkspaceSettings('features'); // Feature toggles
|
|
243
|
+
openWorkspaceSettings('danger'); // Delete workspace (owner only)
|
|
244
|
+
```
|
|
245
|
+
|
|
231
246
|
### Authentication Components
|
|
232
247
|
|
|
233
248
|
For declarative rendering, use the conditional components:
|
|
@@ -1188,9 +1203,10 @@ Prefer these SDK hooks for state and operations instead of `useAppSelector`:
|
|
|
1188
1203
|
| `useUserAttributes()` | User attributes and update/refresh |
|
|
1189
1204
|
| `useUserFeatures()` | User feature flags |
|
|
1190
1205
|
| `useSubscriptionContext()` | Subscription for current workspace (response, loading, refetch); use inside SubscriptionContextProvider |
|
|
1191
|
-
| Subscription hooks | `usePublicPlans`, `useSubscription`, `usePlanGroup`, `useCreateCheckoutSession`, `useUpdateSubscription`, `useCancelSubscription`, `useResumeSubscription`, `useInvoices`, `useInvoice` |
|
|
1206
|
+
| Subscription hooks | `usePublicPlans`, `useSubscription`, `useSubscriptionManagement`, `usePlanGroup`, `usePlanGroupVersions`, `usePublicPlanGroupVersion`, `useCreateCheckoutSession`, `useUpdateSubscription`, `useCancelSubscription`, `useResumeSubscription`, `useInvoices`, `useInvoice` |
|
|
1192
1207
|
| `useQuotaUsageContext()` | Quota usage for current workspace (quotas, loading, refetch); use inside QuotaUsageContextProvider |
|
|
1193
1208
|
| Quota usage hooks | `useRecordUsage`, `useQuotaUsageStatus`, `useAllQuotaUsage`, `useUsageLogs` |
|
|
1209
|
+
| Invalidation helpers | `invalidateSubscription()`, `invalidateQuotaUsage()` — trigger context refetch after server-side mutations |
|
|
1194
1210
|
|
|
1195
1211
|
Using hooks keeps your code stable if internal state shape changes and avoids direct Redux/context coupling.
|
|
1196
1212
|
|
package/dist/index.d.ts
CHANGED
|
@@ -30,11 +30,23 @@ interface IUser extends IDocument {
|
|
|
30
30
|
type BillingInterval = 'monthly' | 'yearly' | 'quarterly';
|
|
31
31
|
interface ISubscription {
|
|
32
32
|
_id: string;
|
|
33
|
-
subscriptionStatus: 'active' | 'trialing' | 'canceled' | 'past_due';
|
|
33
|
+
subscriptionStatus: 'active' | 'trialing' | 'canceled' | 'past_due' | 'paused' | 'incomplete' | 'unpaid';
|
|
34
34
|
stripePriceId?: string;
|
|
35
35
|
stripeCurrentPeriodEnd?: string;
|
|
36
36
|
cancelAtPeriodEnd: boolean;
|
|
37
37
|
billingInterval?: BillingInterval;
|
|
38
|
+
/** Trial start date (ISO string). Set when subscription is in trial. */
|
|
39
|
+
trialStart?: string;
|
|
40
|
+
/** Trial end date (ISO string). Set when subscription is in trial. */
|
|
41
|
+
trialEnd?: string;
|
|
42
|
+
/** When the subscription was canceled (ISO string). Soft-delete marker. */
|
|
43
|
+
canceledAt?: string;
|
|
44
|
+
/** Dunning state: 'none', 'notified', 'warning', 'final', 'suspended'. */
|
|
45
|
+
dunningState?: string;
|
|
46
|
+
/** Whether this subscription uses per-seat pricing. */
|
|
47
|
+
seatPricingEnabled?: boolean;
|
|
48
|
+
/** Current billable seat count. */
|
|
49
|
+
currentSeatCount?: number;
|
|
38
50
|
createdAt: string;
|
|
39
51
|
updatedAt: string;
|
|
40
52
|
plan?: {
|
|
@@ -105,6 +117,16 @@ interface IPricingVariant {
|
|
|
105
117
|
currency: string;
|
|
106
118
|
basePricing: IBasePricing;
|
|
107
119
|
stripePrices: IStripePricesByInterval;
|
|
120
|
+
/** Per-seat pricing config. When enabled, a second recurring item is on the subscription. */
|
|
121
|
+
seatPricing?: {
|
|
122
|
+
enabled: boolean;
|
|
123
|
+
includedSeats: number;
|
|
124
|
+
/** Maximum seats allowed. 0 or undefined = unlimited. */
|
|
125
|
+
maxSeats?: number;
|
|
126
|
+
perSeat: IBasePricing;
|
|
127
|
+
};
|
|
128
|
+
/** Stripe Price IDs for the per-seat recurring price. */
|
|
129
|
+
seatStripePrices?: IStripePricesByInterval;
|
|
108
130
|
/** Overage cents per quota slug per interval. */
|
|
109
131
|
quotaOverages?: IQuotaOveragesByInterval;
|
|
110
132
|
/** Stripe price IDs for overage per quota slug per interval. */
|
|
@@ -260,6 +282,8 @@ interface ICheckoutSessionRequest {
|
|
|
260
282
|
cancelUrl?: string;
|
|
261
283
|
}
|
|
262
284
|
interface ICheckoutSessionResponse {
|
|
285
|
+
/** Response type discriminator. Added for centralized checkout flow. */
|
|
286
|
+
type?: 'checkout' | 'trial_started' | 'existing';
|
|
263
287
|
success: boolean;
|
|
264
288
|
checkoutUrl: string;
|
|
265
289
|
sessionId: string;
|
|
@@ -270,6 +294,37 @@ interface ICheckoutSessionResponse {
|
|
|
270
294
|
name: string;
|
|
271
295
|
};
|
|
272
296
|
}
|
|
297
|
+
/** No-card trial started server-side; no redirect needed. */
|
|
298
|
+
interface ICheckoutTrialResult {
|
|
299
|
+
type: 'trial_started';
|
|
300
|
+
success: boolean;
|
|
301
|
+
checkoutUrl: null;
|
|
302
|
+
sessionId: null;
|
|
303
|
+
subscription: ISubscription;
|
|
304
|
+
message: string;
|
|
305
|
+
}
|
|
306
|
+
/** Workspace already has a matching active subscription. */
|
|
307
|
+
interface ICheckoutExistingResult {
|
|
308
|
+
type: 'existing';
|
|
309
|
+
success: boolean;
|
|
310
|
+
checkoutUrl: null;
|
|
311
|
+
sessionId: null;
|
|
312
|
+
message: string;
|
|
313
|
+
existingSubscription?: {
|
|
314
|
+
_id: string;
|
|
315
|
+
subscriptionStatus: string;
|
|
316
|
+
stripePriceId?: string;
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Discriminated union for POST /subscription/checkout responses.
|
|
321
|
+
* - `checkout`: Stripe checkout session created, redirect user to checkoutUrl
|
|
322
|
+
* - `trial_started`: No-card trial started server-side, no redirect needed
|
|
323
|
+
* - `existing`: Workspace already has a matching subscription
|
|
324
|
+
*/
|
|
325
|
+
type CheckoutResult = (ICheckoutSessionResponse & {
|
|
326
|
+
type: 'checkout';
|
|
327
|
+
}) | ICheckoutTrialResult | ICheckoutExistingResult;
|
|
273
328
|
/** Request body for PATCH .../workspaces/:id/subscription. Only these fields are allowed. */
|
|
274
329
|
interface ISubscriptionUpdateRequest {
|
|
275
330
|
planVersionId: string;
|
|
@@ -439,6 +494,11 @@ interface IWorkspace {
|
|
|
439
494
|
* When set, subscription UI only shows/uses this currency.
|
|
440
495
|
*/
|
|
441
496
|
billingCurrency?: string | null;
|
|
497
|
+
/** Workspace onboarding config. Set on creation based on org settings. SDK shows trial CTA. */
|
|
498
|
+
pendingOnboarding?: {
|
|
499
|
+
mode: 'trial';
|
|
500
|
+
planVersionId: string;
|
|
501
|
+
} | null;
|
|
442
502
|
}
|
|
443
503
|
interface IWorkspaceFeature {
|
|
444
504
|
_id: string;
|
|
@@ -1077,6 +1137,71 @@ declare const WhenSubscriptionToPlans: {
|
|
|
1077
1137
|
(props: IWhenSubscriptionToPlansProps): react.ReactNode;
|
|
1078
1138
|
displayName: string;
|
|
1079
1139
|
};
|
|
1140
|
+
interface IWhenTrialingProps {
|
|
1141
|
+
/** Content to render when the condition is met. */
|
|
1142
|
+
children: React.ReactNode;
|
|
1143
|
+
/** Optional component/element to show while subscription is loading. */
|
|
1144
|
+
loadingComponent?: React.ReactNode;
|
|
1145
|
+
/** Optional component/element to show when condition is not met. */
|
|
1146
|
+
fallbackComponent?: React.ReactNode;
|
|
1147
|
+
}
|
|
1148
|
+
/**
|
|
1149
|
+
* Renders children only when the current workspace subscription is in trial (status === 'trialing').
|
|
1150
|
+
* Must be used within SubscriptionContextProvider.
|
|
1151
|
+
*
|
|
1152
|
+
* @example
|
|
1153
|
+
* ```tsx
|
|
1154
|
+
* <WhenTrialing fallbackComponent={<NormalContent />}>
|
|
1155
|
+
* <TrialBanner />
|
|
1156
|
+
* </WhenTrialing>
|
|
1157
|
+
* ```
|
|
1158
|
+
*/
|
|
1159
|
+
declare const WhenTrialing: {
|
|
1160
|
+
(props: IWhenTrialingProps): react.ReactNode;
|
|
1161
|
+
displayName: string;
|
|
1162
|
+
};
|
|
1163
|
+
/**
|
|
1164
|
+
* Renders children only when the current workspace subscription is NOT in trial.
|
|
1165
|
+
* This includes: no subscription, active, canceled, past_due, etc.
|
|
1166
|
+
* Must be used within SubscriptionContextProvider.
|
|
1167
|
+
*
|
|
1168
|
+
* @example
|
|
1169
|
+
* ```tsx
|
|
1170
|
+
* <WhenNotTrialing>
|
|
1171
|
+
* <RegularPricingPage />
|
|
1172
|
+
* </WhenNotTrialing>
|
|
1173
|
+
* ```
|
|
1174
|
+
*/
|
|
1175
|
+
declare const WhenNotTrialing: {
|
|
1176
|
+
(props: IWhenTrialingProps): react.ReactNode;
|
|
1177
|
+
displayName: string;
|
|
1178
|
+
};
|
|
1179
|
+
interface IWhenTrialEndingProps {
|
|
1180
|
+
/** Content to render when trial is ending soon. */
|
|
1181
|
+
children: React.ReactNode;
|
|
1182
|
+
/** Optional component/element to show while subscription is loading. */
|
|
1183
|
+
loadingComponent?: React.ReactNode;
|
|
1184
|
+
/** Optional component/element to show when trial is not ending soon. */
|
|
1185
|
+
fallbackComponent?: React.ReactNode;
|
|
1186
|
+
/** Number of days threshold to consider "ending soon". Defaults to 3. */
|
|
1187
|
+
daysThreshold?: number;
|
|
1188
|
+
}
|
|
1189
|
+
/**
|
|
1190
|
+
* Renders children only when the subscription is trialing AND the trial ends within
|
|
1191
|
+
* the given threshold (default 3 days). Useful for showing urgent upgrade prompts.
|
|
1192
|
+
* Must be used within SubscriptionContextProvider.
|
|
1193
|
+
*
|
|
1194
|
+
* @example
|
|
1195
|
+
* ```tsx
|
|
1196
|
+
* <WhenTrialEnding daysThreshold={5}>
|
|
1197
|
+
* <UpgradeBanner />
|
|
1198
|
+
* </WhenTrialEnding>
|
|
1199
|
+
* ```
|
|
1200
|
+
*/
|
|
1201
|
+
declare const WhenTrialEnding: {
|
|
1202
|
+
(props: IWhenTrialEndingProps): react.ReactNode;
|
|
1203
|
+
displayName: string;
|
|
1204
|
+
};
|
|
1080
1205
|
|
|
1081
1206
|
interface IWhenQuotaProps {
|
|
1082
1207
|
/** Quota slug to check (e.g. 'api_calls', 'emails', 'storage'). */
|
|
@@ -1584,7 +1709,7 @@ declare class WorkspaceApi extends BaseApi {
|
|
|
1584
1709
|
* @param request - Checkout session request with planVersionId and optional billing interval/URLs
|
|
1585
1710
|
* @returns Checkout session response with checkoutUrl to redirect user
|
|
1586
1711
|
*/
|
|
1587
|
-
createCheckoutSession(workspaceId: string, request: ICheckoutSessionRequest): Promise<
|
|
1712
|
+
createCheckoutSession(workspaceId: string, request: ICheckoutSessionRequest): Promise<CheckoutResult>;
|
|
1588
1713
|
/**
|
|
1589
1714
|
* Update subscription (upgrade/downgrade)
|
|
1590
1715
|
* Only allows plan changes within the same plan group
|
|
@@ -1945,7 +2070,7 @@ declare const usePlanGroupVersions: (workspaceId: string | null | undefined) =>
|
|
|
1945
2070
|
* ```
|
|
1946
2071
|
*/
|
|
1947
2072
|
declare const useCreateCheckoutSession: (workspaceId: string | null | undefined) => {
|
|
1948
|
-
createCheckoutSession: (request: ICheckoutSessionRequest) => Promise<
|
|
2073
|
+
createCheckoutSession: (request: ICheckoutSessionRequest) => Promise<CheckoutResult>;
|
|
1949
2074
|
loading: boolean;
|
|
1950
2075
|
error: string | null;
|
|
1951
2076
|
};
|
|
@@ -2440,6 +2565,78 @@ declare const useUsageLogs: (workspaceId: string | null | undefined, quotaSlug?:
|
|
|
2440
2565
|
refetch: () => Promise<void>;
|
|
2441
2566
|
};
|
|
2442
2567
|
|
|
2568
|
+
interface TrialStatus {
|
|
2569
|
+
/** Whether the current subscription is in trial. */
|
|
2570
|
+
isTrialing: boolean;
|
|
2571
|
+
/** Number of days remaining in the trial. 0 if not trialing or expired. */
|
|
2572
|
+
daysRemaining: number;
|
|
2573
|
+
/** Trial end date as a Date object. null if not trialing. */
|
|
2574
|
+
trialEndsAt: Date | null;
|
|
2575
|
+
/** Trial start date as a Date object. null if not trialing. */
|
|
2576
|
+
trialStartedAt: Date | null;
|
|
2577
|
+
/** Whether the trial is ending soon (<= 3 days remaining). */
|
|
2578
|
+
isTrialEnding: boolean;
|
|
2579
|
+
}
|
|
2580
|
+
/**
|
|
2581
|
+
* Hook that computes trial status from the current subscription context.
|
|
2582
|
+
* Must be used within SubscriptionContextProvider.
|
|
2583
|
+
*
|
|
2584
|
+
* @returns TrialStatus — computed trial information
|
|
2585
|
+
*
|
|
2586
|
+
* @example
|
|
2587
|
+
* ```tsx
|
|
2588
|
+
* const { isTrialing, daysRemaining, isTrialEnding } = useTrialStatus();
|
|
2589
|
+
*
|
|
2590
|
+
* if (isTrialEnding) {
|
|
2591
|
+
* return <UpgradeBanner daysLeft={daysRemaining} />;
|
|
2592
|
+
* }
|
|
2593
|
+
* ```
|
|
2594
|
+
*/
|
|
2595
|
+
declare function useTrialStatus(): TrialStatus;
|
|
2596
|
+
|
|
2597
|
+
interface SeatStatus {
|
|
2598
|
+
/** Whether the current plan uses seat-based pricing. */
|
|
2599
|
+
hasSeatPricing: boolean;
|
|
2600
|
+
/** Total workspace members. */
|
|
2601
|
+
memberCount: number;
|
|
2602
|
+
/** Seats included in the base price (free). */
|
|
2603
|
+
includedSeats: number;
|
|
2604
|
+
/** Maximum seats allowed. 0 = unlimited. */
|
|
2605
|
+
maxSeats: number;
|
|
2606
|
+
/** Seats beyond included that are being billed. */
|
|
2607
|
+
billableSeats: number;
|
|
2608
|
+
/** Remaining seats before hitting max. Infinity if unlimited. */
|
|
2609
|
+
availableSeats: number;
|
|
2610
|
+
/** Whether workspace is at max seat capacity. */
|
|
2611
|
+
isAtMax: boolean;
|
|
2612
|
+
/** Whether workspace is near max (>= 80% used). */
|
|
2613
|
+
isNearMax: boolean;
|
|
2614
|
+
/** Per-seat price in cents for the current billing interval. Null if not applicable. */
|
|
2615
|
+
perSeatPriceCents: number | null;
|
|
2616
|
+
/** Billing currency. */
|
|
2617
|
+
currency: string;
|
|
2618
|
+
}
|
|
2619
|
+
/**
|
|
2620
|
+
* Hook that computes seat status from subscription context and workspace data.
|
|
2621
|
+
* Must be used within SubscriptionContextProvider.
|
|
2622
|
+
*
|
|
2623
|
+
* @param workspace - The current workspace (needs users array)
|
|
2624
|
+
* @returns SeatStatus — computed seat information
|
|
2625
|
+
*
|
|
2626
|
+
* @example
|
|
2627
|
+
* ```tsx
|
|
2628
|
+
* const { isAtMax, availableSeats, billableSeats } = useSeatStatus(workspace);
|
|
2629
|
+
*
|
|
2630
|
+
* if (isAtMax) {
|
|
2631
|
+
* return <UpgradeBanner />;
|
|
2632
|
+
* }
|
|
2633
|
+
* ```
|
|
2634
|
+
*/
|
|
2635
|
+
declare function useSeatStatus(workspace: {
|
|
2636
|
+
users?: any[];
|
|
2637
|
+
billingCurrency?: string | null;
|
|
2638
|
+
} | null): SeatStatus;
|
|
2639
|
+
|
|
2443
2640
|
/**
|
|
2444
2641
|
* EventEmitter class to handle and trigger event callbacks
|
|
2445
2642
|
* This class manages all event listeners and provides methods to trigger events
|
|
@@ -2627,6 +2824,19 @@ declare function getBillingIntervalAndCurrencyFromPriceId(priceId: string | null
|
|
|
2627
2824
|
interval: BillingInterval;
|
|
2628
2825
|
currency: string;
|
|
2629
2826
|
} | null;
|
|
2827
|
+
/** Get per-seat pricing config for a plan version and currency. Null if not enabled. */
|
|
2828
|
+
declare function getSeatPricing(planVersion: IPlanVersion, currency: string): IPricingVariant['seatPricing'] | null;
|
|
2829
|
+
/** Get per-seat price in cents for a billing interval. Null if seat pricing not enabled. */
|
|
2830
|
+
declare function getPerSeatPriceCents(planVersion: IPlanVersion, currency: string, interval: BillingInterval): number | null;
|
|
2831
|
+
/** Calculate billable seats: max(0, currentSeats - includedSeats). */
|
|
2832
|
+
declare function calculateBillableSeats(currentSeatCount: number, includedSeats: number): number;
|
|
2833
|
+
/** Calculate total seat overage cost in cents. Null if seat pricing not enabled. */
|
|
2834
|
+
declare function calculateSeatOverageCents(planVersion: IPlanVersion, currency: string, interval: BillingInterval, currentSeatCount: number): number | null;
|
|
2835
|
+
/**
|
|
2836
|
+
* Calculate total subscription price in cents: base + seat overage (if enabled).
|
|
2837
|
+
* Does not include metered usage (billed at period end).
|
|
2838
|
+
*/
|
|
2839
|
+
declare function calculateTotalSubscriptionCents(planVersion: IPlanVersion, currency: string, interval: BillingInterval, currentSeatCount?: number): number | null;
|
|
2630
2840
|
|
|
2631
2841
|
type QuotaDisplayValue = {
|
|
2632
2842
|
included: number;
|
|
@@ -2652,5 +2862,5 @@ interface FormatQuotaWithPriceOptions {
|
|
|
2652
2862
|
*/
|
|
2653
2863
|
declare function formatQuotaWithPrice(value: QuotaDisplayValue, unitName: string, options?: FormatQuotaWithPriceOptions): string;
|
|
2654
2864
|
|
|
2655
|
-
export { ApiVersion, AuthStatus, BaseApi, BetaForm, CURRENCY_DISPLAY, CURRENCY_FLAG, PLAN_CURRENCY_CODES, PLAN_CURRENCY_OPTIONS, PricingPage, QuotaUsageContextProvider, SaaSOSProvider, SettingsApi, SubscriptionContextProvider, UserApi, WhenAuthenticated, WhenNoSubscription, WhenQuotaAvailable, WhenQuotaExhausted, WhenQuotaOverage, WhenQuotaThreshold, WhenRoles, WhenSubscription, WhenSubscriptionToPlans, WhenUnauthenticated, WhenUserFeatureDisabled, WhenUserFeatureEnabled, WhenWorkspaceFeatureDisabled, WhenWorkspaceFeatureEnabled, WhenWorkspaceRoles, WorkspaceApi, WorkspaceSwitcher, eventEmitter, formatCents, formatOverageRate, formatOverageRateWithLabel, formatQuotaIncludedOverage, formatQuotaWithPrice, getAvailableCurrenciesFromPlans, getBasePriceCents, getBillingIntervalAndCurrencyFromPriceId, getCurrencyFlag, getCurrencySymbol, getDisplayCurrency, getPricingVariant, getQuotaDisplayValue, getQuotaDisplayWithVariant, getQuotaOverageCents, getQuotaUnitLabelFromName, getStripePriceIdForInterval, invalidateQuotaUsage, invalidateSubscription, useAllQuotaUsage, useCancelSubscription, useCreateCheckoutSession, useInvoice, useInvoices, usePlanGroup, usePlanGroupVersions, usePublicPlanGroupVersion, usePublicPlans, useQuotaUsageContext, useQuotaUsageStatus, useRecordUsage, useResumeSubscription, useSaaSAuth, useSaaSOs, useSaaSSettings, useSaaSWorkspaces, useSubscription, useSubscriptionContext, useSubscriptionManagement, useUpdateSubscription, useUsageLogs, useUserAttributes, useUserFeatures };
|
|
2656
|
-
export type { BillingInterval, EventData, EventType, FormatQuotaWithPriceOptions, IAllQuotaUsageResponse, IBaseApiConfig, IBasePricing, ICheckoutSessionRequest, ICheckoutSessionResponse, IEventCallbacks, IInvoice, IInvoiceListResponse, IInvoiceResponse, IPlan, IPlanGroup, IPlanGroupInfo, IPlanGroupLatestVersion, IPlanGroupResponse, IPlanGroupVersion, IPlanGroupVersionWithPlans, IPlanGroupVersionsResponse, IPlanVersion, IPlanVersionSummary, IPlanVersionWithPlan, IPricingVariant, IPublicPlanItem, IPublicPlanItemCategory, IPublicPlanVersion, IPublicPlansResponse, IQuotaByInterval, IQuotaIntervalValue, IQuotaOveragePriceIdsByInterval, IQuotaOveragesByInterval, IQuotaUsageStatus, IQuotaUsageStatusResponse, IRecordUsageRequest, IRecordUsageResponse, IStripePricesByInterval, ISubscription, ISubscriptionItem, ISubscriptionResponse, ISubscriptionUpdateRequest, ISubscriptionUpdateResponse, IUsageLogEntry, IUsageLogsQuery, IUsageLogsResponse, InvoiceStatus, OnWorkspaceChangeParams, PlanVersionWithPricingVariants, PricingPageDetails, PricingPageProps, QuotaDisplayValue, QuotaDisplayWithOverage, QuotaUsageContextValue, SubscriptionContextValue, UserCreatedEventData, UserUpdatedEventData, WorkspaceChangedEventData, WorkspaceCreatedEventData, WorkspaceDeletedEventData, WorkspaceUpdatedEventData, WorkspaceUserAddedEventData, WorkspaceUserRemovedEventData, WorkspaceUserRoleChangedEventData };
|
|
2865
|
+
export { ApiVersion, AuthStatus, BaseApi, BetaForm, CURRENCY_DISPLAY, CURRENCY_FLAG, PLAN_CURRENCY_CODES, PLAN_CURRENCY_OPTIONS, PricingPage, QuotaUsageContextProvider, SaaSOSProvider, SettingsApi, SubscriptionContextProvider, UserApi, WhenAuthenticated, WhenNoSubscription, WhenNotTrialing, WhenQuotaAvailable, WhenQuotaExhausted, WhenQuotaOverage, WhenQuotaThreshold, WhenRoles, WhenSubscription, WhenSubscriptionToPlans, WhenTrialEnding, WhenTrialing, WhenUnauthenticated, WhenUserFeatureDisabled, WhenUserFeatureEnabled, WhenWorkspaceFeatureDisabled, WhenWorkspaceFeatureEnabled, WhenWorkspaceRoles, WorkspaceApi, WorkspaceSwitcher, calculateBillableSeats, calculateSeatOverageCents, calculateTotalSubscriptionCents, eventEmitter, formatCents, formatOverageRate, formatOverageRateWithLabel, formatQuotaIncludedOverage, formatQuotaWithPrice, getAvailableCurrenciesFromPlans, getBasePriceCents, getBillingIntervalAndCurrencyFromPriceId, getCurrencyFlag, getCurrencySymbol, getDisplayCurrency, getPerSeatPriceCents, getPricingVariant, getQuotaDisplayValue, getQuotaDisplayWithVariant, getQuotaOverageCents, getQuotaUnitLabelFromName, getSeatPricing, getStripePriceIdForInterval, invalidateQuotaUsage, invalidateSubscription, useAllQuotaUsage, useCancelSubscription, useCreateCheckoutSession, useInvoice, useInvoices, usePlanGroup, usePlanGroupVersions, usePublicPlanGroupVersion, usePublicPlans, useQuotaUsageContext, useQuotaUsageStatus, useRecordUsage, useResumeSubscription, useSaaSAuth, useSaaSOs, useSaaSSettings, useSaaSWorkspaces, useSeatStatus, useSubscription, useSubscriptionContext, useSubscriptionManagement, useTrialStatus, useUpdateSubscription, useUsageLogs, useUserAttributes, useUserFeatures };
|
|
2866
|
+
export type { BillingInterval, CheckoutResult, EventData, EventType, FormatQuotaWithPriceOptions, IAllQuotaUsageResponse, IBaseApiConfig, IBasePricing, ICheckoutSessionRequest, ICheckoutSessionResponse, IEventCallbacks, IInvoice, IInvoiceListResponse, IInvoiceResponse, IPlan, IPlanGroup, IPlanGroupInfo, IPlanGroupLatestVersion, IPlanGroupResponse, IPlanGroupVersion, IPlanGroupVersionWithPlans, IPlanGroupVersionsResponse, IPlanVersion, IPlanVersionSummary, IPlanVersionWithPlan, IPricingVariant, IPublicPlanItem, IPublicPlanItemCategory, IPublicPlanVersion, IPublicPlansResponse, IQuotaByInterval, IQuotaIntervalValue, IQuotaOveragePriceIdsByInterval, IQuotaOveragesByInterval, IQuotaUsageStatus, IQuotaUsageStatusResponse, IRecordUsageRequest, IRecordUsageResponse, IStripePricesByInterval, ISubscription, ISubscriptionItem, ISubscriptionResponse, ISubscriptionUpdateRequest, ISubscriptionUpdateResponse, IUsageLogEntry, IUsageLogsQuery, IUsageLogsResponse, InvoiceStatus, OnWorkspaceChangeParams, PlanVersionWithPricingVariants, PricingPageDetails, PricingPageProps, QuotaDisplayValue, QuotaDisplayWithOverage, QuotaUsageContextValue, SeatStatus, SubscriptionContextValue, TrialStatus, UserCreatedEventData, UserUpdatedEventData, WorkspaceChangedEventData, WorkspaceCreatedEventData, WorkspaceDeletedEventData, WorkspaceUpdatedEventData, WorkspaceUserAddedEventData, WorkspaceUserRemovedEventData, WorkspaceUserRoleChangedEventData };
|