@carlonicora/nextjs-jsonapi 6.4.0 → 6.6.0
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/{BlockNoteEditor-CT4XUXPC.js → BlockNoteEditor-E4V7AEG2.js} +19 -19
- package/dist/{BlockNoteEditor-CT4XUXPC.js.map → BlockNoteEditor-E4V7AEG2.js.map} +1 -1
- package/dist/{BlockNoteEditor-M6UQRVRK.mjs → BlockNoteEditor-MWGVWNSE.mjs} +4 -4
- package/dist/{BlockNoteViewer-MFLWF3Y2.js → BlockNoteViewer-LGRKM7OA.js} +3 -3
- package/dist/{BlockNoteViewer-MFLWF3Y2.js.map → BlockNoteViewer-LGRKM7OA.js.map} +1 -1
- package/dist/{BlockNoteViewer-XZJ5Y7WN.mjs → BlockNoteViewer-VNU7WVN5.mjs} +2 -2
- package/dist/billing/index.d.mts +174 -157
- package/dist/billing/index.d.ts +174 -157
- package/dist/billing/index.js +523 -501
- package/dist/billing/index.js.map +1 -1
- package/dist/billing/index.mjs +34 -12
- package/dist/billing/index.mjs.map +1 -1
- package/dist/{chunk-3FD6Y734.mjs → chunk-7GB5MR77.mjs} +78 -1
- package/dist/chunk-7GB5MR77.mjs.map +1 -0
- package/dist/{chunk-ELQHE2DK.js → chunk-AEVLFZRK.js} +3 -3
- package/dist/{chunk-ELQHE2DK.js.map → chunk-AEVLFZRK.js.map} +1 -1
- package/dist/{chunk-DSGP6GC3.js → chunk-AMN2XDN5.js} +8 -8
- package/dist/{chunk-DSGP6GC3.js.map → chunk-AMN2XDN5.js.map} +1 -1
- package/dist/{chunk-QJIDORHM.js → chunk-F2MZ7GY6.js} +4 -4
- package/dist/{chunk-QJIDORHM.js.map → chunk-F2MZ7GY6.js.map} +1 -1
- package/dist/{chunk-TIT4CJYQ.mjs → chunk-IDV534SJ.mjs} +5 -5
- package/dist/{chunk-DYOSXIEL.mjs → chunk-IQ2XYAB5.mjs} +2 -2
- package/dist/{chunk-XZCCIKX3.js → chunk-OJAIKQR2.js} +79 -2
- package/dist/chunk-OJAIKQR2.js.map +1 -0
- package/dist/{chunk-O2TEUH5S.mjs → chunk-PDS57QPD.mjs} +2 -2
- package/dist/{chunk-Y7JIQNM6.js → chunk-R2XBVIO5.js} +870 -870
- package/dist/{chunk-Y7JIQNM6.js.map → chunk-R2XBVIO5.js.map} +1 -1
- package/dist/{chunk-RUJCWOJE.mjs → chunk-RSMBRI3E.mjs} +2 -2
- package/dist/client/index.js +4 -4
- package/dist/client/index.mjs +3 -3
- package/dist/components/index.js +4 -4
- package/dist/components/index.mjs +3 -3
- package/dist/contexts/index.js +4 -4
- package/dist/contexts/index.mjs +3 -3
- package/dist/core/index.d.mts +32 -3
- package/dist/core/index.d.ts +32 -3
- package/dist/core/index.js +6 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +5 -1
- package/dist/email-automations/index.js +92 -92
- package/dist/email-automations/index.mjs +3 -3
- package/dist/features/analytics/index.js +121 -121
- package/dist/features/analytics/index.mjs +4 -4
- package/dist/features/analytics/server.js +4 -4
- package/dist/features/analytics/server.mjs +2 -2
- package/dist/features/blog/index.js +150 -150
- package/dist/features/blog/index.mjs +3 -3
- package/dist/features/blog/server.js +16 -16
- package/dist/features/blog/server.mjs +1 -1
- package/dist/features/help/index.js +37 -37
- package/dist/features/help/index.mjs +3 -3
- package/dist/features/tokenusage/index.js +127 -127
- package/dist/features/tokenusage/index.mjs +4 -4
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -2
- package/dist/{s3.service-CzFBDEuQ.d.mts → s3.service-BNBD9YTg.d.mts} +17 -1
- package/dist/{s3.service-BTCpmp5g.d.ts → s3.service-Da7C2gtt.d.ts} +17 -1
- package/dist/server/index.d.mts +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +2 -2
- package/package.json +1 -1
- package/src/core/index.ts +1 -0
- package/src/core/registry/ModuleRegistry.ts +2 -0
- package/src/features/auth/data/__tests__/pending-registration.spec.ts +37 -0
- package/src/features/auth/data/auth.service.ts +19 -0
- package/src/features/auth/data/index.ts +2 -0
- package/src/features/auth/data/pending-registration.interface.ts +10 -0
- package/src/features/auth/data/pending-registration.ts +57 -0
- package/src/features/auth/pending-registration.module.ts +9 -0
- package/src/features/billing/components/containers/BillingDashboardContainer.tsx +3 -2
- package/src/features/billing/stripe-subscription/components/containers/SubscriptionsContainer.tsx +5 -0
- package/src/features/billing/stripe-subscription/components/details/SubscriptionDetails.tsx +44 -12
- package/src/features/billing/stripe-subscription/components/details/__tests__/SubscriptionDetails.spec.tsx +79 -0
- package/src/features/billing/stripe-subscription/components/lists/SubscriptionsList.tsx +9 -2
- package/dist/chunk-3FD6Y734.mjs.map +0 -1
- package/dist/chunk-XZCCIKX3.js.map +0 -1
- /package/dist/{BlockNoteEditor-M6UQRVRK.mjs.map → BlockNoteEditor-MWGVWNSE.mjs.map} +0 -0
- /package/dist/{BlockNoteViewer-XZJ5Y7WN.mjs.map → BlockNoteViewer-VNU7WVN5.mjs.map} +0 -0
- /package/dist/{chunk-TIT4CJYQ.mjs.map → chunk-IDV534SJ.mjs.map} +0 -0
- /package/dist/{chunk-DYOSXIEL.mjs.map → chunk-IQ2XYAB5.mjs.map} +0 -0
- /package/dist/{chunk-O2TEUH5S.mjs.map → chunk-PDS57QPD.mjs.map} +0 -0
- /package/dist/{chunk-RUJCWOJE.mjs.map → chunk-RSMBRI3E.mjs.map} +0 -0
package/dist/billing/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { S as StripeSubscriptionInterface, a as StripePriceInterface,
|
|
4
|
-
import { P as PaymentMethodInterface, S as StripeCustomerInterface, a as StripeInvoiceInterface, M as MeterInterface, e as MeterSummaryInterface,
|
|
3
|
+
import { S as StripeSubscriptionInterface, a as StripePriceInterface, c as StripeProductInterface, e as SubscriptionStatus, b as StripePriceInput, d as StripeProductInput } from '../stripe-price.interface-DGqcklFJ.js';
|
|
4
|
+
import { P as PaymentMethodInterface, S as StripeCustomerInterface, a as StripeInvoiceInterface, M as MeterInterface, e as MeterSummaryInterface, b as ProrationPreviewInterface, g as PromotionCodeValidationResult, B as BillingFormatOptions, j as StripeCouponInterface, m as StripeCouponInput, n as StripeCouponRenameInput, p as StripeCouponCodeInput, o as StripeCouponCodeInterface, q as StripeCouponCodeFlagsInput, I as InvoiceStatus, d as StripeUsageInterface } from '../currency-CBgZkS0u.js';
|
|
5
5
|
export { u as BillingTranslator, s as formatCurrency, t as formatFixed, r as formatInterval } from '../currency-CBgZkS0u.js';
|
|
6
6
|
import { J as JsonApiHydratedDataInterface } from '../ApiDataInterface-BcZeXy5X.js';
|
|
7
7
|
import { FieldValues, UseFormReturn } from 'react-hook-form';
|
|
@@ -48,7 +48,177 @@ type BillingUsageSummaryCardProps = {
|
|
|
48
48
|
};
|
|
49
49
|
declare function BillingUsageSummaryCard({ meters, summaries, loading, error, onViewDetailsClick, }: BillingUsageSummaryCardProps): React.JSX.Element;
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
/** Props an app receives when it replaces the library cancel dialog. */
|
|
52
|
+
type CancelDialogRenderProps = {
|
|
53
|
+
subscription: StripeSubscriptionInterface;
|
|
54
|
+
open: boolean;
|
|
55
|
+
onOpenChange: (open: boolean) => void;
|
|
56
|
+
onSuccess: () => void;
|
|
57
|
+
/** Opens the plan-change wizard for this subscription and closes the details. Undefined when the host gave no onChangePlan. */
|
|
58
|
+
openChangePlan?: () => void;
|
|
59
|
+
};
|
|
60
|
+
/** Optional replacement for the library cancel dialog. Absent, the library renders CancelSubscriptionDialog. */
|
|
61
|
+
type RenderCancelDialog = (props: CancelDialogRenderProps) => ReactNode;
|
|
62
|
+
type SubscriptionDetailsProps = {
|
|
63
|
+
subscription: StripeSubscriptionInterface;
|
|
64
|
+
open: boolean;
|
|
65
|
+
onOpenChange: (open: boolean) => void;
|
|
66
|
+
onSubscriptionChange: () => void;
|
|
67
|
+
onChangePlan?: (subscription: StripeSubscriptionInterface) => void;
|
|
68
|
+
renderCancelDialog?: RenderCancelDialog;
|
|
69
|
+
};
|
|
70
|
+
declare function SubscriptionDetails({ subscription, open, onOpenChange, onSubscriptionChange, onChangePlan, renderCancelDialog, }: SubscriptionDetailsProps): React.JSX.Element;
|
|
71
|
+
|
|
72
|
+
type SubscriptionsContainerProps = {
|
|
73
|
+
onOpenWizard?: (subscription?: StripeSubscriptionInterface) => void;
|
|
74
|
+
hasActiveRecurringSubscription?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* The list a parent already holds (the billing dashboard). When given, the container
|
|
77
|
+
* shows it instead of loading its own, and a change asks the parent to refresh through
|
|
78
|
+
* `onSubscriptionsChange`, so the dialog and the cards behind it never disagree.
|
|
79
|
+
*/
|
|
80
|
+
subscriptions?: StripeSubscriptionInterface[];
|
|
81
|
+
onSubscriptionsChange?: () => void;
|
|
82
|
+
/** Replaces the library cancel dialog; absent, the library dialog renders. */
|
|
83
|
+
renderCancelDialog?: RenderCancelDialog;
|
|
84
|
+
};
|
|
85
|
+
declare function SubscriptionsContainer({ onOpenWizard, hasActiveRecurringSubscription, subscriptions: parentSubscriptions, onSubscriptionsChange, renderCancelDialog, }: SubscriptionsContainerProps): React.JSX.Element;
|
|
86
|
+
|
|
87
|
+
type CancelSubscriptionDialogProps = {
|
|
88
|
+
subscription: StripeSubscriptionInterface;
|
|
89
|
+
open: boolean;
|
|
90
|
+
onOpenChange: (open: boolean) => void;
|
|
91
|
+
onSuccess: () => void;
|
|
92
|
+
};
|
|
93
|
+
declare function CancelSubscriptionDialog({ subscription, open, onOpenChange, onSuccess, }: CancelSubscriptionDialogProps): React.JSX.Element;
|
|
94
|
+
|
|
95
|
+
type SubscriptionsListProps = {
|
|
96
|
+
subscriptions: StripeSubscriptionInterface[];
|
|
97
|
+
onSubscriptionsChange: () => void;
|
|
98
|
+
onChangePlan?: (subscription: StripeSubscriptionInterface) => void;
|
|
99
|
+
renderCancelDialog?: RenderCancelDialog;
|
|
100
|
+
};
|
|
101
|
+
declare function SubscriptionsList({ subscriptions, onSubscriptionsChange, onChangePlan, renderCancelDialog, }: SubscriptionsListProps): React.JSX.Element;
|
|
102
|
+
|
|
103
|
+
type BillingInterval = "month" | "year";
|
|
104
|
+
type IntervalToggleProps = {
|
|
105
|
+
value: BillingInterval;
|
|
106
|
+
onChange: (interval: BillingInterval) => void;
|
|
107
|
+
hasMonthly: boolean;
|
|
108
|
+
hasYearly: boolean;
|
|
109
|
+
};
|
|
110
|
+
declare function IntervalToggle({ value, onChange, hasMonthly, hasYearly }: IntervalToggleProps): React.JSX.Element | null;
|
|
111
|
+
|
|
112
|
+
type PricingCardProps = {
|
|
113
|
+
price: StripePriceInterface;
|
|
114
|
+
isCurrentPlan?: boolean;
|
|
115
|
+
isSelected?: boolean;
|
|
116
|
+
isDisabled?: boolean;
|
|
117
|
+
isLoading?: boolean;
|
|
118
|
+
onSelect: (price: StripePriceInterface) => void;
|
|
119
|
+
};
|
|
120
|
+
declare function PricingCard({ price, isCurrentPlan, isSelected, isDisabled, isLoading, onSelect, }: PricingCardProps): React.JSX.Element;
|
|
121
|
+
|
|
122
|
+
type ProductPricingListProps = {
|
|
123
|
+
products: StripeProductInterface[];
|
|
124
|
+
selectedInterval: BillingInterval;
|
|
125
|
+
currentPriceId?: string;
|
|
126
|
+
selectedPriceId?: string;
|
|
127
|
+
loadingPriceId?: string;
|
|
128
|
+
loading?: boolean;
|
|
129
|
+
onSelectPrice: (price: StripePriceInterface) => void;
|
|
130
|
+
hideRecurringPrices?: boolean;
|
|
131
|
+
hideOneTimePrices?: boolean;
|
|
132
|
+
};
|
|
133
|
+
declare function ProductPricingList({ products, selectedInterval, currentPriceId, selectedPriceId, loadingPriceId, loading, onSelectPrice, hideRecurringPrices, hideOneTimePrices, }: ProductPricingListProps): React.JSX.Element;
|
|
134
|
+
|
|
135
|
+
type ProductPricingRowProps = {
|
|
136
|
+
product: StripeProductInterface;
|
|
137
|
+
prices: StripePriceInterface[];
|
|
138
|
+
currentPriceId?: string;
|
|
139
|
+
selectedPriceId?: string;
|
|
140
|
+
loadingPriceId?: string;
|
|
141
|
+
onSelectPrice: (price: StripePriceInterface) => void;
|
|
142
|
+
};
|
|
143
|
+
declare function ProductPricingRow({ product, prices, currentPriceId, selectedPriceId, loadingPriceId, onSelectPrice, }: ProductPricingRowProps): React.JSX.Element | null;
|
|
144
|
+
|
|
145
|
+
type ProrationPreviewProps = {
|
|
146
|
+
preview: ProrationPreviewInterface;
|
|
147
|
+
};
|
|
148
|
+
declare function ProrationPreview({ preview }: ProrationPreviewProps): React.JSX.Element;
|
|
149
|
+
|
|
150
|
+
type SubscriptionStatusBadgeProps = {
|
|
151
|
+
status: SubscriptionStatus;
|
|
152
|
+
cancelAtPeriodEnd?: boolean;
|
|
153
|
+
};
|
|
154
|
+
declare function SubscriptionStatusBadge({ status, cancelAtPeriodEnd }: SubscriptionStatusBadgeProps): React.JSX.Element;
|
|
155
|
+
|
|
156
|
+
type SubscriptionConfirmationProps = {
|
|
157
|
+
price: StripePriceInterface;
|
|
158
|
+
isLoading: boolean;
|
|
159
|
+
onConfirm: () => void;
|
|
160
|
+
onCancel: () => void;
|
|
161
|
+
};
|
|
162
|
+
declare function SubscriptionConfirmation({ price, isLoading, onConfirm, onCancel }: SubscriptionConfirmationProps): React.JSX.Element;
|
|
163
|
+
|
|
164
|
+
type SubscriptionWizardProps = {
|
|
165
|
+
open: boolean;
|
|
166
|
+
onOpenChange: (open: boolean) => void;
|
|
167
|
+
onSuccess: () => void;
|
|
168
|
+
hasActiveRecurringSubscription: boolean;
|
|
169
|
+
subscription?: StripeSubscriptionInterface;
|
|
170
|
+
};
|
|
171
|
+
declare function SubscriptionWizard({ open, onOpenChange, onSuccess, hasActiveRecurringSubscription, subscription, }: SubscriptionWizardProps): React.JSX.Element;
|
|
172
|
+
|
|
173
|
+
type WizardStep = "plan-selection" | "review" | "payment-method";
|
|
174
|
+
|
|
175
|
+
type WizardProgressIndicatorProps = {
|
|
176
|
+
currentStep: WizardStep;
|
|
177
|
+
};
|
|
178
|
+
declare function WizardProgressIndicator({ currentStep }: WizardProgressIndicatorProps): React.JSX.Element;
|
|
179
|
+
|
|
180
|
+
type WizardStepPlanSelectionProps = {
|
|
181
|
+
selectedPrice: StripePriceInterface | null;
|
|
182
|
+
selectedInterval: BillingInterval;
|
|
183
|
+
currentPriceId?: string;
|
|
184
|
+
hideRecurringPrices: boolean;
|
|
185
|
+
hideOneTimePrices: boolean;
|
|
186
|
+
onSelectPrice: (price: StripePriceInterface) => void;
|
|
187
|
+
onIntervalChange: (interval: BillingInterval) => void;
|
|
188
|
+
onNext: () => void;
|
|
189
|
+
isProcessing: boolean;
|
|
190
|
+
};
|
|
191
|
+
declare function WizardStepPlanSelection({ selectedPrice, selectedInterval, currentPriceId, hideRecurringPrices, hideOneTimePrices, onSelectPrice, onIntervalChange, onNext, isProcessing, }: WizardStepPlanSelectionProps): React.JSX.Element;
|
|
192
|
+
|
|
193
|
+
type WizardStepReviewProps = {
|
|
194
|
+
selectedPrice: StripePriceInterface | null;
|
|
195
|
+
subscription?: StripeSubscriptionInterface;
|
|
196
|
+
prorationPreview: ProrationPreviewInterface | null;
|
|
197
|
+
hasPaymentMethod: boolean;
|
|
198
|
+
error: string | null;
|
|
199
|
+
isProcessing: boolean;
|
|
200
|
+
onBack: () => void;
|
|
201
|
+
onAddPaymentMethod: () => void;
|
|
202
|
+
onConfirm: () => void;
|
|
203
|
+
promotionCode: PromotionCodeValidationResult | null;
|
|
204
|
+
isValidatingPromoCode: boolean;
|
|
205
|
+
promoCodeError: string | null;
|
|
206
|
+
onApplyPromoCode: (code: string) => void;
|
|
207
|
+
onRemovePromoCode: () => void;
|
|
208
|
+
isTrialUpgrade: boolean;
|
|
209
|
+
};
|
|
210
|
+
declare function WizardStepReview({ selectedPrice, subscription, prorationPreview, hasPaymentMethod, error, isProcessing, onBack, onAddPaymentMethod, onConfirm, promotionCode, isValidatingPromoCode, promoCodeError, onApplyPromoCode, onRemovePromoCode, isTrialUpgrade, }: WizardStepReviewProps): React.JSX.Element;
|
|
211
|
+
|
|
212
|
+
type WizardStepPaymentMethodProps = {
|
|
213
|
+
onBack: () => void;
|
|
214
|
+
onSuccess: () => void;
|
|
215
|
+
isProcessing: boolean;
|
|
216
|
+
};
|
|
217
|
+
declare function WizardStepPaymentMethod({ onBack, onSuccess, isProcessing }: WizardStepPaymentMethodProps): React.JSX.Element;
|
|
218
|
+
|
|
219
|
+
declare function BillingDashboardContainer({ renderCancelDialog }?: {
|
|
220
|
+
renderCancelDialog?: RenderCancelDialog;
|
|
221
|
+
}): React.JSX.Element;
|
|
52
222
|
|
|
53
223
|
type BillingDetailModalProps = {
|
|
54
224
|
open: boolean;
|
|
@@ -495,159 +665,6 @@ type CouponCodeActionsProps = {
|
|
|
495
665
|
*/
|
|
496
666
|
declare function CouponCodeActions({ code, status }: CouponCodeActionsProps): React.JSX.Element;
|
|
497
667
|
|
|
498
|
-
type SubscriptionsContainerProps = {
|
|
499
|
-
onOpenWizard?: (subscription?: StripeSubscriptionInterface) => void;
|
|
500
|
-
hasActiveRecurringSubscription?: boolean;
|
|
501
|
-
/**
|
|
502
|
-
* The list a parent already holds (the billing dashboard). When given, the container
|
|
503
|
-
* shows it instead of loading its own, and a change asks the parent to refresh through
|
|
504
|
-
* `onSubscriptionsChange`, so the dialog and the cards behind it never disagree.
|
|
505
|
-
*/
|
|
506
|
-
subscriptions?: StripeSubscriptionInterface[];
|
|
507
|
-
onSubscriptionsChange?: () => void;
|
|
508
|
-
};
|
|
509
|
-
declare function SubscriptionsContainer({ onOpenWizard, hasActiveRecurringSubscription, subscriptions: parentSubscriptions, onSubscriptionsChange, }: SubscriptionsContainerProps): React.JSX.Element;
|
|
510
|
-
|
|
511
|
-
type SubscriptionDetailsProps = {
|
|
512
|
-
subscription: StripeSubscriptionInterface;
|
|
513
|
-
open: boolean;
|
|
514
|
-
onOpenChange: (open: boolean) => void;
|
|
515
|
-
onSubscriptionChange: () => void;
|
|
516
|
-
onChangePlan?: (subscription: StripeSubscriptionInterface) => void;
|
|
517
|
-
};
|
|
518
|
-
declare function SubscriptionDetails({ subscription, open, onOpenChange, onSubscriptionChange, onChangePlan, }: SubscriptionDetailsProps): React.JSX.Element;
|
|
519
|
-
|
|
520
|
-
type CancelSubscriptionDialogProps = {
|
|
521
|
-
subscription: StripeSubscriptionInterface;
|
|
522
|
-
open: boolean;
|
|
523
|
-
onOpenChange: (open: boolean) => void;
|
|
524
|
-
onSuccess: () => void;
|
|
525
|
-
};
|
|
526
|
-
declare function CancelSubscriptionDialog({ subscription, open, onOpenChange, onSuccess, }: CancelSubscriptionDialogProps): React.JSX.Element;
|
|
527
|
-
|
|
528
|
-
type SubscriptionsListProps = {
|
|
529
|
-
subscriptions: StripeSubscriptionInterface[];
|
|
530
|
-
onSubscriptionsChange: () => void;
|
|
531
|
-
onChangePlan?: (subscription: StripeSubscriptionInterface) => void;
|
|
532
|
-
};
|
|
533
|
-
declare function SubscriptionsList({ subscriptions, onSubscriptionsChange, onChangePlan }: SubscriptionsListProps): React.JSX.Element;
|
|
534
|
-
|
|
535
|
-
type BillingInterval = "month" | "year";
|
|
536
|
-
type IntervalToggleProps = {
|
|
537
|
-
value: BillingInterval;
|
|
538
|
-
onChange: (interval: BillingInterval) => void;
|
|
539
|
-
hasMonthly: boolean;
|
|
540
|
-
hasYearly: boolean;
|
|
541
|
-
};
|
|
542
|
-
declare function IntervalToggle({ value, onChange, hasMonthly, hasYearly }: IntervalToggleProps): React.JSX.Element | null;
|
|
543
|
-
|
|
544
|
-
type PricingCardProps = {
|
|
545
|
-
price: StripePriceInterface;
|
|
546
|
-
isCurrentPlan?: boolean;
|
|
547
|
-
isSelected?: boolean;
|
|
548
|
-
isDisabled?: boolean;
|
|
549
|
-
isLoading?: boolean;
|
|
550
|
-
onSelect: (price: StripePriceInterface) => void;
|
|
551
|
-
};
|
|
552
|
-
declare function PricingCard({ price, isCurrentPlan, isSelected, isDisabled, isLoading, onSelect, }: PricingCardProps): React.JSX.Element;
|
|
553
|
-
|
|
554
|
-
type ProductPricingListProps = {
|
|
555
|
-
products: StripeProductInterface[];
|
|
556
|
-
selectedInterval: BillingInterval;
|
|
557
|
-
currentPriceId?: string;
|
|
558
|
-
selectedPriceId?: string;
|
|
559
|
-
loadingPriceId?: string;
|
|
560
|
-
loading?: boolean;
|
|
561
|
-
onSelectPrice: (price: StripePriceInterface) => void;
|
|
562
|
-
hideRecurringPrices?: boolean;
|
|
563
|
-
hideOneTimePrices?: boolean;
|
|
564
|
-
};
|
|
565
|
-
declare function ProductPricingList({ products, selectedInterval, currentPriceId, selectedPriceId, loadingPriceId, loading, onSelectPrice, hideRecurringPrices, hideOneTimePrices, }: ProductPricingListProps): React.JSX.Element;
|
|
566
|
-
|
|
567
|
-
type ProductPricingRowProps = {
|
|
568
|
-
product: StripeProductInterface;
|
|
569
|
-
prices: StripePriceInterface[];
|
|
570
|
-
currentPriceId?: string;
|
|
571
|
-
selectedPriceId?: string;
|
|
572
|
-
loadingPriceId?: string;
|
|
573
|
-
onSelectPrice: (price: StripePriceInterface) => void;
|
|
574
|
-
};
|
|
575
|
-
declare function ProductPricingRow({ product, prices, currentPriceId, selectedPriceId, loadingPriceId, onSelectPrice, }: ProductPricingRowProps): React.JSX.Element | null;
|
|
576
|
-
|
|
577
|
-
type ProrationPreviewProps = {
|
|
578
|
-
preview: ProrationPreviewInterface;
|
|
579
|
-
};
|
|
580
|
-
declare function ProrationPreview({ preview }: ProrationPreviewProps): React.JSX.Element;
|
|
581
|
-
|
|
582
|
-
type SubscriptionStatusBadgeProps = {
|
|
583
|
-
status: SubscriptionStatus;
|
|
584
|
-
cancelAtPeriodEnd?: boolean;
|
|
585
|
-
};
|
|
586
|
-
declare function SubscriptionStatusBadge({ status, cancelAtPeriodEnd }: SubscriptionStatusBadgeProps): React.JSX.Element;
|
|
587
|
-
|
|
588
|
-
type SubscriptionConfirmationProps = {
|
|
589
|
-
price: StripePriceInterface;
|
|
590
|
-
isLoading: boolean;
|
|
591
|
-
onConfirm: () => void;
|
|
592
|
-
onCancel: () => void;
|
|
593
|
-
};
|
|
594
|
-
declare function SubscriptionConfirmation({ price, isLoading, onConfirm, onCancel }: SubscriptionConfirmationProps): React.JSX.Element;
|
|
595
|
-
|
|
596
|
-
type SubscriptionWizardProps = {
|
|
597
|
-
open: boolean;
|
|
598
|
-
onOpenChange: (open: boolean) => void;
|
|
599
|
-
onSuccess: () => void;
|
|
600
|
-
hasActiveRecurringSubscription: boolean;
|
|
601
|
-
subscription?: StripeSubscriptionInterface;
|
|
602
|
-
};
|
|
603
|
-
declare function SubscriptionWizard({ open, onOpenChange, onSuccess, hasActiveRecurringSubscription, subscription, }: SubscriptionWizardProps): React.JSX.Element;
|
|
604
|
-
|
|
605
|
-
type WizardStep = "plan-selection" | "review" | "payment-method";
|
|
606
|
-
|
|
607
|
-
type WizardProgressIndicatorProps = {
|
|
608
|
-
currentStep: WizardStep;
|
|
609
|
-
};
|
|
610
|
-
declare function WizardProgressIndicator({ currentStep }: WizardProgressIndicatorProps): React.JSX.Element;
|
|
611
|
-
|
|
612
|
-
type WizardStepPlanSelectionProps = {
|
|
613
|
-
selectedPrice: StripePriceInterface | null;
|
|
614
|
-
selectedInterval: BillingInterval;
|
|
615
|
-
currentPriceId?: string;
|
|
616
|
-
hideRecurringPrices: boolean;
|
|
617
|
-
hideOneTimePrices: boolean;
|
|
618
|
-
onSelectPrice: (price: StripePriceInterface) => void;
|
|
619
|
-
onIntervalChange: (interval: BillingInterval) => void;
|
|
620
|
-
onNext: () => void;
|
|
621
|
-
isProcessing: boolean;
|
|
622
|
-
};
|
|
623
|
-
declare function WizardStepPlanSelection({ selectedPrice, selectedInterval, currentPriceId, hideRecurringPrices, hideOneTimePrices, onSelectPrice, onIntervalChange, onNext, isProcessing, }: WizardStepPlanSelectionProps): React.JSX.Element;
|
|
624
|
-
|
|
625
|
-
type WizardStepReviewProps = {
|
|
626
|
-
selectedPrice: StripePriceInterface | null;
|
|
627
|
-
subscription?: StripeSubscriptionInterface;
|
|
628
|
-
prorationPreview: ProrationPreviewInterface | null;
|
|
629
|
-
hasPaymentMethod: boolean;
|
|
630
|
-
error: string | null;
|
|
631
|
-
isProcessing: boolean;
|
|
632
|
-
onBack: () => void;
|
|
633
|
-
onAddPaymentMethod: () => void;
|
|
634
|
-
onConfirm: () => void;
|
|
635
|
-
promotionCode: PromotionCodeValidationResult | null;
|
|
636
|
-
isValidatingPromoCode: boolean;
|
|
637
|
-
promoCodeError: string | null;
|
|
638
|
-
onApplyPromoCode: (code: string) => void;
|
|
639
|
-
onRemovePromoCode: () => void;
|
|
640
|
-
isTrialUpgrade: boolean;
|
|
641
|
-
};
|
|
642
|
-
declare function WizardStepReview({ selectedPrice, subscription, prorationPreview, hasPaymentMethod, error, isProcessing, onBack, onAddPaymentMethod, onConfirm, promotionCode, isValidatingPromoCode, promoCodeError, onApplyPromoCode, onRemovePromoCode, isTrialUpgrade, }: WizardStepReviewProps): React.JSX.Element;
|
|
643
|
-
|
|
644
|
-
type WizardStepPaymentMethodProps = {
|
|
645
|
-
onBack: () => void;
|
|
646
|
-
onSuccess: () => void;
|
|
647
|
-
isProcessing: boolean;
|
|
648
|
-
};
|
|
649
|
-
declare function WizardStepPaymentMethod({ onBack, onSuccess, isProcessing }: WizardStepPaymentMethodProps): React.JSX.Element;
|
|
650
|
-
|
|
651
668
|
declare function UsageContainer(): React.JSX.Element | null;
|
|
652
669
|
|
|
653
670
|
type UsageSummaryCardProps = {
|
|
@@ -677,4 +694,4 @@ type PromoCodeInputProps = {
|
|
|
677
694
|
};
|
|
678
695
|
declare function PromoCodeInput({ appliedCode, isValidating, error, onApply, onRemove, disabled, }: PromoCodeInputProps): React.JSX.Element;
|
|
679
696
|
|
|
680
|
-
export { BillingAlertBanner, BillingDashboardContainer, BillingDetailModal, type BillingDiscount, BillingFormatOptions, type BillingInterval, BillingUsageSummaryCard, CancelSubscriptionDialog, CouponCodeActions, CouponCodeEditor, type CouponCodeEditorProps, CouponCodeFields, type CouponCodeFormValues, CouponCodesList, CouponContainer, type CouponContextType, CouponDetails, CouponEditor, type CouponEditorProps, CouponProvider, type CouponProviderProps, CouponRefresher, CouponsList, CustomerInfoCard, IntervalToggle, type IntervalToggleProps, InvoiceDetails, InvoiceStatusBadge, InvoicesContainer, InvoicesList, InvoicesSummaryCard, PaymentMethodCard, PaymentMethodEditor, PaymentMethodForm, PaymentMethodSummaryCard, PaymentMethodsContainer, PaymentMethodsList, PriceArchiver, PriceContainer, type PriceContextType, PriceDetails, PriceEditor, type PriceEditorProps, PriceProvider, type PriceProviderProps, PricesList, PricingCard, type PricingCardProps, ProductArchiver, ProductContainer, type ProductContextType, ProductDetails, ProductEditor, type ProductEditorProps, ProductPricingList, type ProductPricingListProps, ProductPricingRow, type ProductPricingRowProps, ProductProvider, type ProductProviderProps, ProductsList, ProductsListContainer, PromoCodeInput, ProrationPreview, StripeProvider, SubscriptionConfirmation, SubscriptionDetails, SubscriptionStatusBadge, SubscriptionSummaryCard, SubscriptionWizard, type SubscriptionWizardProps, SubscriptionsContainer, SubscriptionsList, UsageContainer, UsageHistoryTable, UsageSummaryCard, UsageSummaryCards, WizardProgressIndicator, WizardStepPaymentMethod, WizardStepPlanSelection, WizardStepReview, applyDiscount, couponCodeDefaults, couponCodeSchema, couponCurrencyOptions, formatDate, isStripeConfigured, optionalDate, optionalDecimal, optionalPositiveInt, parseOptionalDecimal, parseOptionalPositiveInt, priceLabel, promotionCodeDiscount, subscriptionDiscount, toCouponCodeInput, useBillingFormatOptions, useCouponContext, usePriceContext, useProductContext };
|
|
697
|
+
export { BillingAlertBanner, BillingDashboardContainer, BillingDetailModal, type BillingDiscount, BillingFormatOptions, type BillingInterval, BillingUsageSummaryCard, type CancelDialogRenderProps, CancelSubscriptionDialog, CouponCodeActions, CouponCodeEditor, type CouponCodeEditorProps, CouponCodeFields, type CouponCodeFormValues, CouponCodesList, CouponContainer, type CouponContextType, CouponDetails, CouponEditor, type CouponEditorProps, CouponProvider, type CouponProviderProps, CouponRefresher, CouponsList, CustomerInfoCard, IntervalToggle, type IntervalToggleProps, InvoiceDetails, InvoiceStatusBadge, InvoicesContainer, InvoicesList, InvoicesSummaryCard, PaymentMethodCard, PaymentMethodEditor, PaymentMethodForm, PaymentMethodSummaryCard, PaymentMethodsContainer, PaymentMethodsList, PriceArchiver, PriceContainer, type PriceContextType, PriceDetails, PriceEditor, type PriceEditorProps, PriceProvider, type PriceProviderProps, PricesList, PricingCard, type PricingCardProps, ProductArchiver, ProductContainer, type ProductContextType, ProductDetails, ProductEditor, type ProductEditorProps, ProductPricingList, type ProductPricingListProps, ProductPricingRow, type ProductPricingRowProps, ProductProvider, type ProductProviderProps, ProductsList, ProductsListContainer, PromoCodeInput, ProrationPreview, type RenderCancelDialog, StripeProvider, SubscriptionConfirmation, SubscriptionDetails, SubscriptionStatusBadge, SubscriptionSummaryCard, SubscriptionWizard, type SubscriptionWizardProps, SubscriptionsContainer, SubscriptionsList, UsageContainer, UsageHistoryTable, UsageSummaryCard, UsageSummaryCards, WizardProgressIndicator, WizardStepPaymentMethod, WizardStepPlanSelection, WizardStepReview, applyDiscount, couponCodeDefaults, couponCodeSchema, couponCurrencyOptions, formatDate, isStripeConfigured, optionalDate, optionalDecimal, optionalPositiveInt, parseOptionalDecimal, parseOptionalPositiveInt, priceLabel, promotionCodeDiscount, subscriptionDiscount, toCouponCodeInput, useBillingFormatOptions, useCouponContext, usePriceContext, useProductContext };
|