@stigg/react-sdk 7.7.1-beta.1 → 7.8.0-beta.1

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/index.d.ts CHANGED
@@ -1,938 +1,829 @@
1
- /// <reference types="react" />
2
-
3
- import { Addon } from '@stigg/js-client-sdk';
4
- import { ApplySubscription } from '@stigg/js-client-sdk';
5
- import { ApplySubscriptionResults } from '@stigg/js-client-sdk';
6
- import { BillableFeature } from '@stigg/js-client-sdk';
7
- import { BillableFeatureInput } from '@stigg/api-client-js/src/generated/sdk';
8
- import { BillingAddress } from '@stigg/js-client-sdk';
9
- import { BillingPeriod } from '@stigg/js-client-sdk';
10
- import { BillingPeriod as BillingPeriod_2 } from '@stigg/api-client-js/src/generated/sdk';
11
- import { BooleanEntitlement } from '@stigg/js-client-sdk';
12
- import { CheckoutStatePlan } from '@stigg/js-client-sdk';
13
- import { ChipProps } from '@mui/material';
14
- import { CreditGrantFragment } from '@stigg/js-client-sdk';
15
- import { CreditUsageFragment } from '@stigg/js-client-sdk';
16
- import { CreditUsageTimeRange } from '@stigg/js-client-sdk';
17
- import { Customer } from '@stigg/js-client-sdk';
18
- import { CustomerPortal as CustomerPortal_2 } from '@stigg/js-client-sdk';
19
- import { CustomerPortalEntitlement } from '@stigg/js-client-sdk';
20
- import { CustomerPortalSubscription } from '@stigg/js-client-sdk';
21
- import { CustomerPortalSubscriptionScheduledUpdateDataFragment } from '@stigg/js-client-sdk';
22
- import { default as default_2 } from 'react';
23
- import { EntitlementsFallback } from '@stigg/js-client-sdk';
24
- import { EnumEntitlement } from '@stigg/js-client-sdk';
25
- import { FeatureFragment } from '@stigg/api-client-js/src/generated/sdk';
26
- import { GetActiveSubscriptions } from '@stigg/js-client-sdk';
27
- import { GetBooleanEntitlement } from '@stigg/js-client-sdk';
28
- import { GetCheckoutState } from '@stigg/js-client-sdk';
29
- import { GetCheckoutStateResults } from '@stigg/js-client-sdk';
30
- import { GetCreditUsageInput } from '@stigg/js-client-sdk';
31
- import { GetCustomerPortal } from '@stigg/js-client-sdk';
32
- import { GetEnumEntitlement } from '@stigg/js-client-sdk';
33
- import { GetMeteredEntitlement } from '@stigg/js-client-sdk';
34
- import { GetNumericEntitlement } from '@stigg/js-client-sdk';
35
- import { GetPaywall } from '@stigg/js-client-sdk';
36
- import { MeteredEntitlement } from '@stigg/js-client-sdk';
37
- import { NumericEntitlement } from '@stigg/js-client-sdk';
38
- import { Paywall as Paywall_2 } from '@stigg/js-client-sdk';
39
- import { PaywallCalculatedPricePoint } from '@stigg/js-client-sdk';
40
- import { PaywallCurrency } from '@stigg/js-client-sdk';
41
- import { Plan } from '@stigg/js-client-sdk';
42
- import { PreviewSubscription } from '@stigg/js-client-sdk';
43
- import { Price } from '@stigg/js-client-sdk';
44
- import { PriceTierFragment } from '@stigg/js-client-sdk';
45
- import { PropsWithChildren } from 'react';
46
- import { ReactNode } from 'react';
47
- import * as StiggJs from '@stigg/js-client-sdk';
48
- import { Subscription } from '@stigg/js-client-sdk';
49
- import { SubscriptionAddon } from '@stigg/js-client-sdk';
50
- import { SubscriptionBillingInfo } from '@stigg/js-client-sdk';
51
- import { SubscriptionPreviewDiscount } from '@stigg/js-client-sdk';
52
- import { SubscriptionPreviewTaxDetails } from '@stigg/js-client-sdk';
53
- import { SubscriptionPreviewV2 } from '@stigg/js-client-sdk';
54
-
55
- export declare function AddonsList(): JSX.Element | null;
56
-
57
- declare type AddonsStepState = {
58
- addons: SubscriptionAddon[];
59
- initialAddons?: SubscriptionAddon[];
60
- availableAddons?: Addon[];
61
- };
62
-
63
- export declare type BillingInformation = {
64
- taxDetails?: TaxDetailsInput;
65
- };
66
-
67
- export declare function BooleanEntitlementGuard({ noAccessComponent, children, ...rest }: BooleanEntitlementGuardProps): JSX.Element;
68
-
69
- declare type BooleanEntitlementGuardProps = GetBooleanEntitlement & {
70
- noAccessComponent?: React.ReactNode;
71
- children: React.ReactElement;
72
- };
73
-
74
- export declare const Checkout: ({ textOverrides, theme, resourceId, planId, preferredBillingPeriod, billingCountryCode, billableFeatures, billingInformation, onMockCheckoutState, skipCheckoutSteps, onBeforeStepChange, ...containerProps }: CheckoutProps) => JSX.Element;
75
-
76
- export declare type CheckoutContainerProps = {
77
- onCheckout?: OnCheckoutCallback;
78
- onCheckoutCompleted: OnCheckoutCompletedCallback;
79
- onChangePlan?: OnChangePlanCallback;
80
- onBillingAddressChange?: OnBillingAddressChangeCallback;
81
- onBillableFeatureChange?: OnBillableFeatureChangeCallback;
82
- onAddonChange?: OnAddonChangeCallback;
83
- disablePromotionCode?: boolean;
84
- disableSuccessAnimation?: boolean;
85
- collectPhoneNumber?: boolean;
86
- onMockCheckoutPreview?: MockCheckoutPreviewCallback;
87
- };
88
-
89
- export declare type CheckoutLocalization = {
90
- changePlan: string;
91
- billingPeriodsTitle: string;
92
- addAddonText: string;
93
- addonBillingPeriodNotAvailableText: (params: {
94
- planBillingPeriod: BillingPeriod;
95
- }) => string;
96
- newPaymentMethodText: string;
97
- newPaymentMethodCardTitle: string;
98
- newPaymentMethodBillingAddressTitle: string;
99
- summary: {
100
- title: string;
101
- planName: (params: {
102
- plan: {
103
- displayName: string;
104
- };
105
- }) => string;
106
- addCouponCodeText: string;
107
- couponCodeTitle: string;
108
- addonsSectionTitle: string;
109
- discountsSectionTitle: string;
110
- onlyPayAsYouGoText: string;
111
- startsAtText: string;
112
- proratedTotalDueText: string;
113
- baseChargeText: string | ((params: {
114
- billingPeriod: BillingPeriod;
115
- }) => string);
116
- totalText: string;
117
- totalDueText: string;
118
- totalBillingPeriodText: (params: {
119
- billingPeriod: BillingPeriod;
120
- }) => string;
121
- discountText: (params: {
122
- discountDetails: SubscriptionPreviewDiscount;
123
- currency: string;
124
- }) => string;
125
- appliedCreditsTitle: string;
126
- taxTitle: (params: {
127
- taxDetails: SubscriptionPreviewTaxDetails;
128
- }) => string;
129
- checkoutSuccessText: string;
130
- payAsYouGoTooltipText: string;
131
- changesWillApplyAtEndOfBillingPeriod: string | ((params: {
132
- billingPeriodEnd: Date;
133
- }) => string);
134
- creditsForUnusedTimeText: (params: {
135
- credits: string;
136
- }) => string;
137
- };
138
- checkoutButton: {
139
- nextText: string;
140
- noChangesText: string;
141
- updateText: string;
142
- downgradeToFreeText: string;
143
- upgradeText: string;
144
- };
145
- downgradeToFree: {
146
- alertText: (params: {
147
- plan: Plan;
148
- }) => string;
149
- freePlanHeader: (params: {
150
- plan: Plan;
151
- }) => string;
152
- freePlanName: (params: {
153
- plan: Plan;
154
- }) => string;
155
- freePlanPriceText: (params: {
156
- plan: Plan;
157
- }) => string;
158
- paidPlanHeader: (params: {
159
- plan: Plan;
160
- }) => string;
161
- paidPlanName: (params: {
162
- plan: Plan;
163
- }) => string;
164
- paidPlanPriceText: (params: {
165
- plan: Plan;
166
- billingPeriod?: BillingPeriod;
167
- }) => string;
168
- };
169
- };
170
-
171
- export declare type CheckoutMockProps = {
172
- onMockCheckoutPreview?: MockCheckoutPreviewCallback;
173
- onMockCheckoutState?: MockCheckoutStateCallback;
174
- };
175
-
176
- export declare type CheckoutProps = CheckoutProviderProps & CheckoutContainerProps & CheckoutMockProps;
177
-
178
- export declare type CheckoutProviderProps = {
179
- textOverrides?: DeepPartial<CheckoutLocalization>;
180
- theme?: DeepPartial<CheckoutTheme>;
181
- resourceId?: string;
182
- planId: string;
183
- preferredBillingPeriod?: BillingPeriod;
184
- billingCountryCode?: string;
185
- billableFeatures?: BillableFeature[];
186
- billingInformation?: BillingInformation;
187
- onMockCheckoutState?: MockCheckoutStateCallback;
188
- skipCheckoutSteps?: CheckoutSteps[];
189
- onBeforeStepChange?: OnBeforeStepChangeCallback;
190
- };
191
-
192
- export declare type CheckoutResult = {
193
- success: boolean;
194
- errorMessage?: string;
195
- results?: ApplySubscriptionResults;
196
- };
197
-
198
- export declare type CheckoutState = {
199
- planStep: PlanStepState;
200
- addonsStep: AddonsStepState;
201
- paymentStep: PaymentStepState;
202
- };
203
-
204
- export declare enum CheckoutStepKey {
205
- PLAN = "PLAN",
206
- ADDONS = "ADDONS",
207
- PAYMENT = "PAYMENT"
208
- }
209
-
210
- declare type CheckoutSteps = 'PLAN' | 'ADDONS';
211
-
212
- export declare type CheckoutTheme = {
213
- primary: string;
214
- textColor: string;
215
- backgroundColor: string;
216
- borderColor: string;
217
- summaryBackgroundColor: string;
218
- paymentInputBackgroundColor?: string;
219
- paymentInputBorderColor?: string;
220
- paymentInputBorderRadius?: string;
221
- };
222
-
223
- export declare function CreditBalance({ currencyId, localization, decimalPlaces, showUnits, showSymbol, }: CreditBalanceProps): JSX.Element;
224
-
225
- declare type CreditBalanceLocalization = {
226
- title: string;
227
- };
228
-
229
- export declare type CreditBalanceProps = GetCreditBalanceParams & {
230
- localization?: CreditBalanceLocalization;
231
- decimalPlaces?: number | null;
232
- showUnits?: boolean;
233
- showSymbol?: boolean;
234
- };
235
-
236
- declare type CreditGrant = Pick<CreditGrantFragment, 'grantId' | 'amount' | 'comment' | 'currencyId' | 'effectiveAt' | 'expireAt' | 'grantType' | 'consumedAmount' | 'createdAt' | 'updatedAt'>;
237
-
238
- export declare function CreditGrants({ currencyId, localization: customLocalization, decimalPlaces }: CreditGrantsProps): JSX.Element;
239
-
240
- export declare type CreditGrantsLocalization = {
241
- receivedAt: string;
242
- effectiveAt: string;
243
- grantType: string;
244
- status: string;
245
- balance: string;
246
- expiryDate: string;
247
- emptyState: string;
248
- loadingState: string;
249
- errorState: string;
250
- };
251
-
252
- export declare type CreditGrantsProps = GetCreditGrantsParams & {
253
- localization?: Partial<CreditGrantsLocalization>;
254
- decimalPlaces?: number | null;
255
- };
256
-
257
- declare enum CreditGrantStatus {
258
- SCHEDULED = "SCHEDULED",
259
- AVAILABLE = "AVAILABLE",
260
- EXPIRED = "EXPIRED"
261
- }
262
-
263
- export declare function CreditUsageChart({ currencyId, timeRange, localization: customLocalization }: CreditUsageChartProps): JSX.Element;
264
-
265
- declare type CreditUsageChartLocalization = {
266
- title: string;
267
- totalSpend: string;
268
- };
269
-
270
- declare type CreditUsageChartProps = {
271
- currencyId: string;
272
- timeRange: CreditUsageTimeRange;
273
- localization?: Partial<CreditUsageChartLocalization>;
274
- };
275
-
276
- export declare function CreditUtilization({ currencyId, localization, decimalPlaces, showUnits, showSymbol, }: CreditUtilizationProps): JSX.Element;
277
-
278
- export declare type CreditUtilizationLocalization = {
279
- title: string;
280
- remaining: string;
281
- };
282
-
283
- export declare type CreditUtilizationProps = GetCreditBalanceParams & {
284
- localization?: CreditUtilizationLocalization;
285
- decimalPlaces?: number | null;
286
- showUnits?: boolean;
287
- showSymbol?: boolean;
288
- };
289
-
290
- export declare type CurrentPlanParams = {
291
- plan: Plan;
292
- selectedBillingPeriod: BillingPeriod;
293
- };
294
-
295
- export declare type CurrentSubscriptionOverride = {
296
- planId: string;
297
- billableFeatures: BillableFeature[];
298
- };
299
-
300
- export declare type CurrentSubscriptionOverrideFn = ({ currentSubscription, }: {
301
- currentSubscription: Subscription | null;
302
- }) => CurrentSubscriptionOverride | null | undefined;
303
-
304
- export declare function CustomerPortal({ textOverrides, theme, resourceId, productId, ...restProps }: CustomerPortalProps): JSX.Element;
305
-
306
- export declare enum CustomerPortalIntentionType {
307
- MANAGE_SUBSCRIPTION = "MANAGE_SUBSCRIPTION",
308
- UPGRADE_PLAN = "UPGRADE_PLAN",
309
- UPGRADE_TRIAL_PLAN = "UPGRADE_TRIAL_PLAN"
310
- }
311
-
312
- export declare type CustomerPortalLocalization = {
313
- manageSubscription: string;
314
- usageTabTitle: string;
315
- addonsTabTitle: string;
316
- promotionsTabTitle: string;
317
- promotionsSubtitle: string;
318
- contactSupportTitle: string;
319
- contactSupportLink: string;
320
- editBilling: string;
321
- invoicesTitle: string;
322
- viewInvoiceHistory: string;
323
- editPaymentDetails: string;
324
- paywallSectionTitle: string;
325
- cancelScheduledUpdatesButtonTitle: string;
326
- };
327
-
328
- export declare type CustomerPortalProps = {
329
- onManageSubscription?: OnManageSubscriptionFn;
330
- onBuyMore?: OnBuyMoreCallbackFn;
331
- onCancelScheduledUpdates?: (subscription: CustomerPortalSubscription) => Promise<void> | void;
332
- onContactSupport?: () => Promise<void> | void;
333
- paywallComponent?: React.ReactNode;
334
- hiddenSections?: CustomerPortalSection[];
335
- textOverrides?: DeepPartial<CustomerPortalLocalization>;
336
- theme?: DeepPartial<CustomerPortalTheme>;
337
- filterEntitlements?: FilterEntitlementsFn;
338
- resourceId?: string;
339
- productId?: string;
340
- };
341
-
342
- export declare function CustomerPortalProvider({ children, textOverrides, theme, resourceId, productId, }: {
343
- children: default_2.ReactNode;
344
- textOverrides?: DeepPartial<CustomerPortalLocalization>;
345
- theme?: DeepPartial<CustomerPortalTheme>;
346
- resourceId?: string;
347
- productId?: string;
348
- }): JSX.Element;
349
-
350
- export declare type CustomerPortalSection = 'usage' | 'addons' | 'promotionalEntitlements' | 'billingInformation' | 'paymentDetails' | 'invoices';
351
-
352
- export declare type CustomerPortalTheme = {
353
- sectionTitleColor: string;
354
- planNameColor: string;
355
- backgroundColor: string;
356
- borderColor: string;
357
- listItemBackgroundColor: string;
358
- tabMaxHeight: string;
359
- iconsColor?: string;
360
- iconsBackgroundColor?: string;
361
- };
362
-
363
- export declare function CustomerUsageData({ onManageSubscription, onBuyMore, filterEntitlements }: CustomerUsageDataProps): JSX.Element | null;
364
-
365
- export declare type CustomerUsageDataProps = {
366
- onManageSubscription?: OnManageClick;
367
- onBuyMore?: OnBuyMoreCallbackFn;
368
- filterEntitlements?: FilterEntitlementsFn;
369
- };
370
-
371
- declare type DeepPartial<T> = T extends object ? {
372
- [P in keyof T]?: DeepPartial<T[P]>;
373
- } : T;
374
-
375
- export declare function EmptyState({ message, className }: EmptyStateProps): JSX.Element;
376
-
377
- declare interface EmptyStateProps {
378
- message?: ReactNode;
379
- className?: string;
380
- }
381
-
382
- export declare function EnumEntitlementGuard({ noAccessComponent, children, ...rest }: EnumEntitlementGuardProps): JSX.Element;
383
-
384
- declare type EnumEntitlementGuardProps = GetEnumEntitlement & {
385
- noAccessComponent?: React.ReactNode;
386
- children: React.ReactElement;
387
- };
388
-
389
- export declare function ErrorState({ errorMessage, className }: ErrorStateProps): JSX.Element;
390
-
391
- declare interface ErrorStateProps {
392
- errorMessage?: ReactNode;
393
- className?: string;
394
- }
395
-
396
- declare type FilterEntitlementsFn = (entitlements: CustomerPortalEntitlement[]) => CustomerPortalEntitlement[];
397
-
398
- export declare type FontVariant = {
399
- fontSize: string;
400
- fontWeight: 'bold' | 'normal';
401
- semanticElement: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div';
402
- };
403
-
404
- /**
405
- * Formats a date without time in the format "MMM D, YYYY"
406
- * Example: "Aug 2, 2025"
407
- */
408
- export declare function formatDateOnly(date: any): string;
409
-
410
- /**
411
- * Formats a date with time in the format "MMM D, YYYY h:mmA"
412
- * Example: "Aug 2, 2025 3:45PM"
413
- */
414
- export declare function formatDateTime(date: any): string;
415
-
416
- export declare function GenericTable<T>({ data, headCells, isLoading, error, emptyMessage, errorMessage, onRowClick, className, skeletonRows, hideLastRowBorder, }: GenericTableProps<T>): JSX.Element;
417
-
418
- export declare interface GenericTableProps<T> {
419
- data: T[];
420
- headCells: Array<HeadCell<T>>;
421
- isLoading?: boolean;
422
- error?: Error | null;
423
- emptyMessage?: ReactNode;
424
- loadingMessage?: string;
425
- errorMessage?: ReactNode;
426
- onRowClick?: (item: T) => void;
427
- className?: string;
428
- skeletonRows?: number;
429
- hideLastRowBorder?: boolean;
430
- }
431
-
432
- export declare interface GetCreditBalanceParams {
433
- currencyId: string;
434
- }
435
-
436
- export declare interface GetCreditGrantsParams {
437
- currencyId?: string;
438
- }
439
-
440
- export declare interface HeadCell<T> {
441
- id: string;
442
- alignment?: TableAlignment;
443
- label: string;
444
- width?: PixelWidth;
445
- maxWidth?: PixelWidth;
446
- minWidth?: PixelWidth;
447
- disableClick?: boolean;
448
- visible?: boolean;
449
- render: (item: T) => ReactNode;
450
- }
451
-
452
- export declare type HorizontalAlignment = 'left' | 'center' | 'right';
453
-
454
- export declare function InvoicesSection(): JSX.Element | null;
455
-
456
- export declare const mapCreditGrantStatusToVariant: (status: CreditGrantStatus) => StatusChipVariant;
457
-
458
- export declare function MeteredEntitlementGuard({ noAccessComponent, children, ...rest }: MeteredEntitlementGuardProps): JSX.Element;
459
-
460
- declare type MeteredEntitlementGuardProps = GetMeteredEntitlement & {
461
- noAccessComponent?: React.ReactNode;
462
- children: React.ReactElement;
463
- };
464
-
465
- export declare type MockCheckoutPreviewCallback = (params: PreviewSubscription) => SubscriptionPreviewV2;
466
-
467
- export declare type MockCheckoutStateCallback = (params: GetCheckoutState) => GetCheckoutStateResults;
468
-
469
- export declare function NumericEntitlementGuard({ noAccessComponent, children, ...rest }: NumericEntitlementGuardProps): JSX.Element;
470
-
471
- declare type NumericEntitlementGuardProps = GetNumericEntitlement & {
472
- noAccessComponent?: React.ReactNode;
473
- children: React.ReactElement;
474
- };
475
-
476
- export declare type OnAddonChangeCallback = (params: {
477
- addon: Addon;
478
- quantity: number;
479
- }) => Promise<{
480
- errorMessage?: string;
481
- disableNextStep?: boolean;
482
- }>;
483
-
484
- export declare type OnBeforeStepChangeCallback = (params: {
485
- from: CheckoutStepKey;
486
- to: CheckoutStepKey;
487
- state: CheckoutState;
488
- }) => Promise<boolean>;
489
-
490
- export declare type OnBillableFeatureChangeCallback = (params: {
491
- feature: NonNullable<Price['feature']>;
492
- quantity: number;
493
- }) => Promise<{
494
- errorMessage?: string;
495
- disableNextStep?: boolean;
496
- }>;
497
-
498
- declare type OnBillingAddressChangeCallback = (params: {
499
- billingAddress: BillingAddress;
500
- }) => Promise<void>;
501
-
502
- export declare type OnBuyMoreCallbackFn = (feature: FeatureFragment, entitlement: CustomerPortalEntitlement) => void;
503
-
504
- declare type OnChangePlanCallback = (params: {
505
- currentPlan: CheckoutStatePlan | undefined;
506
- }) => void;
507
-
508
- declare type OnCheckoutCallback = (params: {
509
- customerId: string;
510
- checkoutParams: ApplySubscription;
511
- checkoutAction: (params: ApplySubscription) => Promise<{
512
- success: boolean;
513
- errorMessage?: string;
514
- results?: ApplySubscriptionResults;
515
- }>;
516
- }) => Promise<{
517
- success: boolean;
518
- errorMessage?: string;
519
- results?: ApplySubscriptionResults;
520
- }>;
521
-
522
- declare type OnCheckoutCompletedCallback = (params: {
523
- success: boolean;
524
- error?: string;
525
- }) => Promise<void>;
526
-
527
- export declare type OnCheckoutCompletedParams = {
528
- success: boolean;
529
- error?: string;
530
- };
531
-
532
- export declare type OnCheckoutParams = {
533
- customerId: string;
534
- checkoutParams: ApplySubscription;
535
- checkoutAction: (params: ApplySubscription) => Promise<{
536
- success: boolean;
537
- errorMessage?: string;
538
- results?: ApplySubscriptionResults;
539
- }>;
540
- };
541
-
542
- declare type OnManageClick = ({ intentionType }: {
543
- intentionType: CustomerPortalIntentionType;
544
- }) => void;
545
-
546
- export declare type OnManageSubscriptionFn = ({ intentionType, customerSubscriptions, }: {
547
- intentionType: CustomerPortalIntentionType;
548
- customerSubscriptions: CustomerPortalSubscription[];
549
- }) => Promise<void> | void;
550
-
551
- export declare type OnPlanSelectedCallbackFn = ({ plan, customer, subscription, intentionType, selectedBillingPeriod, billableFeatures, }: {
552
- plan: Plan;
553
- customer: Customer | null;
554
- subscription: Subscription | null;
555
- intentionType: SubscribeIntentionType;
556
- selectedBillingPeriod: BillingPeriod;
557
- billableFeatures?: BillableFeature[];
558
- }) => void | Promise<void>;
559
-
560
- export declare function PaymentDetailsSection(): JSX.Element | null;
561
-
562
- declare type PaymentStepState = {
563
- useNewPaymentMethod: boolean;
564
- errorMessage?: string;
565
- billingAddress?: BillingAddress;
566
- taxPercentage?: number;
567
- };
568
-
569
- export declare const Paywall: ({ productId, resourceId, highlightedPlanId, showOnlyEligiblePlans, textOverrides, onPlanSelected, preferredBillingPeriod, onBillingPeriodChange, billingCountryCode, shouldHidePlan, selectDefaultTierIndex, currentSubscriptionOverride: currentSubscriptionOverrideFn, hideCompatibleAddons, }: PaywallProps) => JSX.Element;
570
-
571
- export declare type PaywallData = {
572
- plans: PaywallPlan[] | null;
573
- customer: Customer | null;
574
- currentSubscription: Subscription | null;
575
- currentSubscriptionOverride?: CurrentSubscriptionOverride | null;
576
- isCustomerOnTrial: boolean;
577
- isLoading: boolean;
578
- selectedBillingPeriod: BillingPeriod;
579
- setSelectedBillingPeriod: (billingPeriod: BillingPeriod) => void;
580
- availableBillingPeriods: BillingPeriod[];
581
- locale: string;
582
- configuration?: Theme;
583
- showWatermark: boolean;
584
- };
585
-
586
- export declare type PaywallLocalization = {
587
- highlightChip: string;
588
- entitlementsTitle?: (plan: PaywallPlan) => string;
589
- addonsTitle?: string;
590
- planCTAButton: {
591
- upgrade: string | ((plan: PaywallPlan) => string);
592
- downgrade: string | ((plan: PaywallPlan) => string);
593
- startTrial: (plan: PaywallPlan) => string;
594
- custom: ((data: CurrentPlanParams) => string) | string;
595
- currentPlan: string;
596
- startNew: string;
597
- switchToBillingPeriod: (billingPeriod: BillingPeriod) => string;
598
- cancelScheduledUpdate: string;
599
- };
600
- price: {
601
- startingAtCaption: string;
602
- billingPeriod?: (billingPeriod: BillingPeriod) => string;
603
- pricePeriod: (billingPeriod: BillingPeriod) => string;
604
- custom: ((data: CurrentPlanParams) => string) | string;
605
- priceNotSet: string;
606
- free: PlanPriceText | ((currency?: PaywallCurrency) => PlanPriceText);
607
- paid?: (priceData: {
608
- planPrices: Price[];
609
- paywallCalculatedPrice?: PaywallCalculatedPricePoint;
610
- plan: Plan;
611
- selectedBillingPeriod: BillingPeriod;
612
- selectedTier?: PriceTierFragment;
613
- }) => PlanPriceText;
614
- };
615
- };
616
-
617
- export declare type PaywallPlan = Plan & {
618
- isLowerThanCurrentPlan?: boolean;
619
- isTriable: boolean;
620
- isCurrentCustomerPlan: boolean;
621
- currentCustomerPlanBillingPeriod?: BillingPeriod;
622
- trialDaysLeft?: number;
623
- isNextPlan?: (billingPeriod: BillingPeriod) => boolean;
624
- scheduledUpdate?: CustomerPortalSubscriptionScheduledUpdateDataFragment;
625
- paywallCurrency?: PaywallCurrency;
626
- paywallCalculatedPricePoints?: PaywallCalculatedPricePoint[];
627
- };
628
-
629
- export declare type PaywallProps = {
630
- productId?: string;
631
- resourceId?: string;
632
- highlightedPlanId?: string;
633
- showOnlyEligiblePlans?: boolean;
634
- onPlanSelected: OnPlanSelectedCallbackFn;
635
- preferredBillingPeriod?: BillingPeriod;
636
- onBillingPeriodChange?: (billingPeriod: BillingPeriod) => void;
637
- textOverrides?: DeepPartial<PaywallLocalization>;
638
- billingCountryCode?: string;
639
- shouldHidePlan?: ShouldHidePlanFn;
640
- selectDefaultTierIndex?: SelectDefaultTierIndexFn;
641
- hideCompatibleAddons?: boolean;
642
- currentSubscriptionOverride?: CurrentSubscriptionOverrideFn;
643
- };
644
-
645
- export declare type PixelWidth = `${number}px`;
646
-
647
- export declare type PlanPriceText = {
648
- price: string;
649
- unit?: string;
650
- tiers?: PriceTierFragment[] | null | undefined;
651
- tierUnits?: string;
652
- };
653
-
654
- declare type PlanStepState = {
655
- billingPeriod: BillingPeriod_2;
656
- billableFeatures: BillableFeatureInput[];
657
- billingCountryCode?: string;
658
- };
659
-
660
- export declare function Promotions(): JSX.Element;
661
-
662
- export declare enum ProvisionStatus {
663
- IN_PROGRESS = "IN_PROGRESS",
664
- SUCCEEDED = "SUCCEEDED",
665
- FAILED = "FAILED"
666
- }
667
-
668
- export declare type SelectDefaultTierIndexFn = ({ plan }: {
669
- plan: PaywallPlan;
670
- }) => number;
671
-
672
- export declare type ShouldHidePlanFn = ({ plan }: {
673
- plan: PaywallPlan;
674
- }) => boolean | Promise<boolean>;
675
-
676
- /**
677
- * StatusChip component for displaying status indicators with consistent theming
678
- *
679
- * @param variant - The status variant (success, warning, error, info, neutral)
680
- * @param label - The text to display in the chip
681
- * @param className - Optional CSS class name
682
- * @param size - Size of the chip (defaults to 'small')
683
- */
684
- export declare function StatusChip({ variant, label, className, size, ...props }: StatusChipProps): JSX.Element;
685
-
686
- export declare type StatusChipColors = {
687
- background: string;
688
- text: string;
689
- border: string;
690
- };
691
-
692
- declare interface StatusChipProps extends Omit<ChipProps, 'variant' | 'color'> {
693
- variant: StatusChipVariant;
694
- label: string;
695
- }
696
-
697
- export declare type StatusChipVariant = 'success' | 'warning' | 'error' | 'info' | 'neutral';
698
-
699
- export declare const StiggContext: default_2.Context<StiggContextValue | null>;
700
-
701
- export declare interface StiggContextValue {
702
- stigg: StiggJs.StiggClient;
703
- isInitialized: boolean;
704
- locale: string;
705
- updatedAt?: Date;
706
- customerPortalUpdatedAt?: Date;
707
- refreshData: () => Promise<void>;
708
- theme?: Theme;
709
- }
710
-
711
- export declare const StiggProvider: default_2.FC<PropsWithChildren<StiggProviderProps>>;
712
-
713
- export declare type StiggProviderProps = {
714
- apiKey: string;
715
- baseUri?: string;
716
- baseEdgeUri?: string;
717
- enableEdge?: boolean;
718
- entitlementsFallback?: EntitlementsFallback;
719
- customerId?: string;
720
- customerToken?: string;
721
- resourceId?: string;
722
- theme?: Theme;
723
- locale?: string;
724
- offline?: boolean;
725
- cacheTtlMs?: number;
726
- /** @deprecated not longer in use */
727
- useEntitlementPolling?: boolean;
728
- /** @deprecated not longer in use */
729
- entitlementPollingInterval?: number;
730
- stiggClient?: StiggJs.StiggClient;
731
- clientName?: string;
732
- clientVersion?: string;
733
- };
734
-
735
- export declare type StiggTheme = {
736
- palette: {
737
- primary: string;
738
- primaryDark: string;
739
- primaryLight: string;
740
- backgroundPaper: string;
741
- backgroundHighlight: string;
742
- backgroundSection: string;
743
- backgroundButton: string;
744
- outlinedBorder: string;
745
- outlinedRestingBorder: string;
746
- outlinedHoverBackground: string;
747
- switchBorder: string;
748
- switchFill: string;
749
- switchHandle: string;
750
- warning: string;
751
- error: string;
752
- errorDark: string;
753
- white: string;
754
- success: string;
755
- successDark: string;
756
- text: {
757
- primary: string;
758
- secondary: string;
759
- tertiary: string;
760
- disabled: string;
761
- };
762
- statusChips: {
763
- success: StatusChipColors;
764
- warning: StatusChipColors;
765
- error: StatusChipColors;
766
- info: StatusChipColors;
767
- neutral: StatusChipColors;
768
- };
769
- progress: {
770
- background: string;
771
- low: string;
772
- medium: string;
773
- high: string;
774
- };
775
- };
776
- layout: {
777
- planMinWidth: string;
778
- planMaxWidth: string;
779
- planMargin: string;
780
- planPadding: string;
781
- ctaAlignment: HorizontalAlignment;
782
- headerAlignment: HorizontalAlignment;
783
- descriptionAlignment: TextAlignment;
784
- descriptionMinHeight: string;
785
- switchBottomSpacing: string;
786
- };
787
- shadows: {
788
- light: string;
789
- popover: string;
790
- };
791
- border: {
792
- radius: string;
793
- };
794
- typography: {
795
- fontFamily: string;
796
- fontFamilyUrl?: string;
797
- h1: FontVariant;
798
- h2: FontVariant;
799
- h3: FontVariant;
800
- body: FontVariant;
801
- caption: FontVariant;
802
- };
803
- customCss?: string;
804
- };
805
-
806
- export declare enum SubscribeIntentionType {
807
- START_TRIAL = "START_TRIAL",
808
- UPGRADE_TRIAL_TO_PAID = "UPGRADE_TRIAL_TO_PAID",
809
- REQUEST_CUSTOM_PLAN_ACCESS = "REQUEST_CUSTOM_PLAN_ACCESS",
810
- CHANGE_BILLING_PERIOD = "CHANGE_BILLING_PERIOD",
811
- CHANGE_UNIT_QUANTITY = "CHANGE_UNIT_QUANTITY",
812
- UPGRADE_PLAN = "UPGRADE_PLAN",
813
- DOWNGRADE_PLAN = "DOWNGRADE_PLAN",
814
- CANCEL_SCHEDULED_UPDATES = "CANCEL_SCHEDULED_UPDATES"
815
- }
816
-
817
- export declare function SubscriptionsOverview({ onManageSubscription, onBuyMore, onCancelScheduledUpdates, onContactSupport, hiddenSections, cancelScheduledUpdatesButtonTitle, }: SubscriptionsOverviewProps): JSX.Element;
818
-
819
- export declare type SubscriptionsOverviewProps = {
820
- onManageSubscription: OnManageClick;
821
- onBuyMore?: OnBuyMoreCallbackFn;
822
- onCancelScheduledUpdates?: (subscription: CustomerPortalSubscription) => void;
823
- onContactSupport?: () => void;
824
- hiddenSections?: CustomerPortalSection[];
825
- cancelScheduledUpdatesButtonTitle: string;
826
- };
827
-
828
- export declare type TableAlignment = 'left' | 'center' | 'right';
829
-
830
- export declare type TaxDetailsInput = {
831
- taxPercentage?: SubscriptionBillingInfo['taxPercentage'];
832
- };
833
-
834
- export declare type TextAlignment = 'left' | 'center' | 'right';
835
-
836
- export declare type Theme = DeepPartial<StiggTheme>;
837
-
838
- declare type TypedGetBooleanEntitlement<T> = Omit<GetBooleanEntitlement, 'featureId'> & {
839
- featureId: T;
840
- };
841
-
842
- declare type TypedGetEnumEntitlement<T> = Omit<GetEnumEntitlement, 'featureId'> & {
843
- featureId: T;
844
- };
845
-
846
- declare type TypedGetMeteredEntitlement<T> = Omit<GetMeteredEntitlement, 'featureId'> & {
847
- featureId: T;
848
- };
849
-
850
- declare type TypedGetNumericEntitlement<T> = Omit<GetNumericEntitlement, 'featureId'> & {
851
- featureId: T;
852
- };
853
-
854
- export declare function useActiveSubscriptions(params?: GetActiveSubscriptions): {
855
- activeSubscriptions: Subscription[] | null;
856
- isLoading: boolean;
857
- error: Error | null;
858
- };
859
-
860
- export declare function useBooleanEntitlement<T extends string>(params: TypedGetBooleanEntitlement<T>): BooleanEntitlement;
861
-
862
- export declare function useCreditBalance(params: GetCreditBalanceParams): {
863
- balance: {
864
- currentBalance: number;
865
- totalConsumed: number;
866
- totalGranted: number;
867
- currencyId: string;
868
- displayName: string;
869
- units: {
870
- __typename?: "Units" | undefined;
871
- singular: string;
872
- plural: string;
873
- } | null | undefined;
874
- symbol: string | null | undefined;
875
- } | {
876
- currencyId: string;
877
- currentBalance: number;
878
- totalConsumed: number;
879
- totalGranted: number;
880
- displayName?: undefined;
881
- units?: undefined;
882
- symbol?: undefined;
883
- } | null;
884
- isLoading: boolean;
885
- error: Error | null;
886
- };
887
-
888
- export declare function useCreditGrants(params: GetCreditGrantsParams): {
889
- creditGrants: CreditGrant[];
890
- isLoading: boolean;
891
- error: Error | null;
892
- };
893
-
894
- export declare function useCreditUsage(params: GetCreditUsageInput): {
895
- creditUsage: CreditUsageFragment | null;
896
- isLoading: boolean;
897
- error: Error | null;
898
- };
899
-
900
- export declare function useCustomerPortal(params?: GetCustomerPortal): {
901
- customerPortal: CustomerPortal_2 | null;
902
- isLoading: boolean;
903
- error: Error | null;
904
- };
905
-
906
- export declare function useEnumEntitlement<T extends string>(params: TypedGetEnumEntitlement<T>): EnumEntitlement;
907
-
908
- export declare function useMeteredEntitlement<T extends string>(params: TypedGetMeteredEntitlement<T>): MeteredEntitlement;
909
-
910
- export declare function useNumericEntitlement<T extends string>(params: TypedGetNumericEntitlement<T>): NumericEntitlement;
911
-
912
- export declare function usePaywall(params?: GetPaywall): {
913
- paywall: Paywall_2 | null;
914
- isLoading: boolean;
915
- error: Error | null;
916
- };
917
-
918
- export declare function useStiggContext(options?: {
919
- optional?: false;
920
- }): StiggContextValue;
921
-
922
- export declare function useStiggContext(options: {
923
- optional: true;
924
- }): StiggContextValue | null;
925
-
926
- export declare const useWaitForCheckoutCompleted: ({ onProvisionStart, onProvisionSucceeded, onProvisionFailed, }?: {
927
- onProvisionStart?: (() => void) | undefined;
928
- onProvisionSucceeded?: ((subscription?: Subscription | null) => void) | undefined;
929
- onProvisionFailed?: ((err?: any) => void) | undefined;
930
- }) => {
931
- isAwaitingCheckout: boolean;
932
- provisionStatus: ProvisionStatus;
933
- };
934
-
935
-
936
- export * from "@stigg/js-client-sdk";
937
-
938
- export { }
1
+ import * as _stigg_js_client_sdk from '@stigg/js-client-sdk';
2
+ import { Plan, Customer, Subscription, BillingPeriod, BillableFeature, CustomerPortalSubscriptionScheduledUpdateDataFragment, PaywallCurrency, PaywallCalculatedPricePoint, PriceTierFragment, Price, CustomerPortalSubscription, CustomerPortalEntitlement, EntitlementsFallback, SubscriptionAddon, Addon, BillingAddress, SubscriptionBillingInfo, GetCheckoutState, GetCheckoutStateResults, ApplySubscription, ApplySubscriptionResults, CheckoutStatePlan, PreviewSubscription, SubscriptionPreviewV2, SubscriptionPreviewDiscount, SubscriptionPreviewTaxDetails, GetBooleanEntitlement, BooleanEntitlement, GetNumericEntitlement, NumericEntitlement, GetMeteredEntitlement, MeteredEntitlement, GetEnumEntitlement, EnumEntitlement, GetActiveSubscriptions, GetPaywall, GetCustomerPortal, CreditUsageTimeRange, GetCreditUsageInput, CursorPaging, CreditGrantFragment, PageInfoFragment } from '@stigg/js-client-sdk';
3
+ export * from '@stigg/js-client-sdk';
4
+ import * as react_jsx_runtime from 'react/jsx-runtime';
5
+ import { FeatureFragment, BillingPeriod as BillingPeriod$1, BillableFeatureInput } from '@stigg/api-client-js/src/generated/sdk';
6
+ import react, { PropsWithChildren, ReactNode } from 'react';
7
+ import { ChipProps } from '@mui/material';
8
+
9
+ type DeepPartial<T> = T extends object ? {
10
+ [P in keyof T]?: DeepPartial<T[P]>;
11
+ } : T;
12
+
13
+ type HorizontalAlignment = 'left' | 'center' | 'right';
14
+ type TextAlignment = 'left' | 'center' | 'right';
15
+ type FontVariant = {
16
+ fontSize: string;
17
+ fontWeight: 'bold' | 'normal';
18
+ semanticElement: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div';
19
+ };
20
+ type StatusChipVariant = 'success' | 'warning' | 'error' | 'info' | 'neutral';
21
+ type StatusChipColors = {
22
+ background: string;
23
+ text: string;
24
+ border: string;
25
+ };
26
+ type StiggTheme = {
27
+ palette: {
28
+ primary: string;
29
+ primaryDark: string;
30
+ primaryLight: string;
31
+ backgroundPaper: string;
32
+ backgroundHighlight: string;
33
+ backgroundSection: string;
34
+ backgroundButton: string;
35
+ outlinedBorder: string;
36
+ outlinedRestingBorder: string;
37
+ outlinedHoverBackground: string;
38
+ switchBorder: string;
39
+ switchFill: string;
40
+ switchHandle: string;
41
+ warning: string;
42
+ error: string;
43
+ errorDark: string;
44
+ white: string;
45
+ success: string;
46
+ successDark: string;
47
+ text: {
48
+ primary: string;
49
+ secondary: string;
50
+ tertiary: string;
51
+ disabled: string;
52
+ };
53
+ statusChips: {
54
+ success: StatusChipColors;
55
+ warning: StatusChipColors;
56
+ error: StatusChipColors;
57
+ info: StatusChipColors;
58
+ neutral: StatusChipColors;
59
+ };
60
+ progress: {
61
+ background: string;
62
+ low: string;
63
+ medium: string;
64
+ high: string;
65
+ };
66
+ };
67
+ layout: {
68
+ planMinWidth: string;
69
+ planMaxWidth: string;
70
+ planMargin: string;
71
+ planPadding: string;
72
+ ctaAlignment: HorizontalAlignment;
73
+ headerAlignment: HorizontalAlignment;
74
+ descriptionAlignment: TextAlignment;
75
+ descriptionMinHeight: string;
76
+ switchBottomSpacing: string;
77
+ };
78
+ shadows: {
79
+ light: string;
80
+ popover: string;
81
+ };
82
+ border: {
83
+ radius: string;
84
+ };
85
+ typography: {
86
+ fontFamily: string;
87
+ fontFamilyUrl?: string;
88
+ h1: FontVariant;
89
+ h2: FontVariant;
90
+ h3: FontVariant;
91
+ body: FontVariant;
92
+ caption: FontVariant;
93
+ };
94
+ customCss?: string;
95
+ };
96
+
97
+ type CustomizedTheme = DeepPartial<StiggTheme>;
98
+
99
+ type PaywallData = {
100
+ plans: PaywallPlan[] | null;
101
+ customer: Customer | null;
102
+ currentSubscription: Subscription | null;
103
+ currentSubscriptionOverride?: CurrentSubscriptionOverride | null;
104
+ isCustomerOnTrial: boolean;
105
+ isLoading: boolean;
106
+ selectedBillingPeriod: BillingPeriod;
107
+ setSelectedBillingPeriod: (billingPeriod: BillingPeriod) => void;
108
+ availableBillingPeriods: BillingPeriod[];
109
+ locale: string;
110
+ configuration?: CustomizedTheme;
111
+ showWatermark: boolean;
112
+ };
113
+ type CurrentSubscriptionOverride = {
114
+ planId: string;
115
+ billableFeatures: BillableFeature[];
116
+ };
117
+ declare enum SubscribeIntentionType {
118
+ START_TRIAL = "START_TRIAL",
119
+ UPGRADE_TRIAL_TO_PAID = "UPGRADE_TRIAL_TO_PAID",
120
+ REQUEST_CUSTOM_PLAN_ACCESS = "REQUEST_CUSTOM_PLAN_ACCESS",
121
+ CHANGE_BILLING_PERIOD = "CHANGE_BILLING_PERIOD",
122
+ CHANGE_UNIT_QUANTITY = "CHANGE_UNIT_QUANTITY",
123
+ UPGRADE_PLAN = "UPGRADE_PLAN",
124
+ DOWNGRADE_PLAN = "DOWNGRADE_PLAN",
125
+ CANCEL_SCHEDULED_UPDATES = "CANCEL_SCHEDULED_UPDATES"
126
+ }
127
+ type PaywallPlan = Plan & {
128
+ isLowerThanCurrentPlan?: boolean;
129
+ isTriable: boolean;
130
+ isCurrentCustomerPlan: boolean;
131
+ currentCustomerPlanBillingPeriod?: BillingPeriod;
132
+ trialDaysLeft?: number;
133
+ isNextPlan?: (billingPeriod: BillingPeriod) => boolean;
134
+ scheduledUpdate?: CustomerPortalSubscriptionScheduledUpdateDataFragment;
135
+ paywallCurrency?: PaywallCurrency;
136
+ paywallCalculatedPricePoints?: PaywallCalculatedPricePoint[];
137
+ };
138
+ type OnPlanSelectedCallbackFn = ({ plan, customer, subscription, intentionType, selectedBillingPeriod, billableFeatures, }: {
139
+ plan: Plan;
140
+ customer: Customer | null;
141
+ subscription: Subscription | null;
142
+ intentionType: SubscribeIntentionType;
143
+ selectedBillingPeriod: BillingPeriod;
144
+ billableFeatures?: BillableFeature[];
145
+ }) => void | Promise<void>;
146
+ type ShouldHidePlanFn = ({ plan }: {
147
+ plan: PaywallPlan;
148
+ }) => boolean | Promise<boolean>;
149
+ type CurrentSubscriptionOverrideFn = ({ currentSubscription, }: {
150
+ currentSubscription: Subscription | null;
151
+ }) => CurrentSubscriptionOverride | null | undefined;
152
+ type SelectDefaultTierIndexFn = ({ plan }: {
153
+ plan: PaywallPlan;
154
+ }) => number;
155
+
156
+ type PlanPriceText = {
157
+ price: string;
158
+ unit?: string;
159
+ tiers?: PriceTierFragment[] | null | undefined;
160
+ tierUnits?: string;
161
+ };
162
+
163
+ type CurrentPlanParams = {
164
+ plan: Plan;
165
+ selectedBillingPeriod: BillingPeriod;
166
+ };
167
+ type PaywallLocalization = {
168
+ highlightChip: string;
169
+ entitlementsTitle?: (plan: PaywallPlan) => string;
170
+ addonsTitle?: string;
171
+ planCTAButton: {
172
+ upgrade: string | ((plan: PaywallPlan) => string);
173
+ downgrade: string | ((plan: PaywallPlan) => string);
174
+ startTrial: (plan: PaywallPlan) => string;
175
+ custom: ((data: CurrentPlanParams) => string) | string;
176
+ currentPlan: string;
177
+ startNew: string;
178
+ switchToBillingPeriod: (billingPeriod: BillingPeriod) => string;
179
+ cancelScheduledUpdate: string;
180
+ };
181
+ price: {
182
+ startingAtCaption: string;
183
+ billingPeriod?: (billingPeriod: BillingPeriod) => string;
184
+ pricePeriod: (billingPeriod: BillingPeriod) => string;
185
+ custom: ((data: CurrentPlanParams) => string) | string;
186
+ priceNotSet: string;
187
+ free: PlanPriceText | ((currency?: PaywallCurrency) => PlanPriceText);
188
+ paid?: (priceData: {
189
+ planPrices: Price[];
190
+ paywallCalculatedPrice?: PaywallCalculatedPricePoint;
191
+ plan: Plan;
192
+ selectedBillingPeriod: BillingPeriod;
193
+ selectedTier?: PriceTierFragment;
194
+ }) => PlanPriceText;
195
+ };
196
+ };
197
+
198
+ type PaywallContainerProps = {
199
+ productId?: string;
200
+ resourceId?: string;
201
+ highlightedPlanId?: string;
202
+ showOnlyEligiblePlans?: boolean;
203
+ onPlanSelected: OnPlanSelectedCallbackFn;
204
+ preferredBillingPeriod?: BillingPeriod;
205
+ onBillingPeriodChange?: (billingPeriod: BillingPeriod) => void;
206
+ textOverrides?: DeepPartial<PaywallLocalization>;
207
+ billingCountryCode?: string;
208
+ shouldHidePlan?: ShouldHidePlanFn;
209
+ selectDefaultTierIndex?: SelectDefaultTierIndexFn;
210
+ hideCompatibleAddons?: boolean;
211
+ currentSubscriptionOverride?: CurrentSubscriptionOverrideFn;
212
+ };
213
+ declare const PaywallContainer: ({ productId, resourceId, highlightedPlanId, showOnlyEligiblePlans, textOverrides, onPlanSelected, preferredBillingPeriod, onBillingPeriodChange, billingCountryCode, shouldHidePlan, selectDefaultTierIndex, currentSubscriptionOverride: currentSubscriptionOverrideFn, hideCompatibleAddons, }: PaywallContainerProps) => react_jsx_runtime.JSX.Element;
214
+
215
+ type CustomerPortalLocalization = {
216
+ manageSubscription: string;
217
+ usageTabTitle: string;
218
+ addonsTabTitle: string;
219
+ promotionsTabTitle: string;
220
+ promotionsSubtitle: string;
221
+ contactSupportTitle: string;
222
+ contactSupportLink: string;
223
+ editBilling: string;
224
+ invoicesTitle: string;
225
+ viewInvoiceHistory: string;
226
+ editPaymentDetails: string;
227
+ paywallSectionTitle: string;
228
+ cancelScheduledUpdatesButtonTitle: string;
229
+ };
230
+
231
+ type CustomerPortalTheme = {
232
+ sectionTitleColor: string;
233
+ planNameColor: string;
234
+ backgroundColor: string;
235
+ borderColor: string;
236
+ listItemBackgroundColor: string;
237
+ tabMaxHeight: string;
238
+ iconsColor?: string;
239
+ iconsBackgroundColor?: string;
240
+ };
241
+
242
+ type OnBuyMoreCallbackFn = (feature: FeatureFragment, entitlement: CustomerPortalEntitlement) => void;
243
+ type FilterEntitlementsFn = (entitlements: CustomerPortalEntitlement[]) => CustomerPortalEntitlement[];
244
+ declare enum CustomerPortalIntentionType {
245
+ MANAGE_SUBSCRIPTION = "MANAGE_SUBSCRIPTION",
246
+ UPGRADE_PLAN = "UPGRADE_PLAN",
247
+ UPGRADE_TRIAL_PLAN = "UPGRADE_TRIAL_PLAN"
248
+ }
249
+ type OnManageSubscriptionFn = ({ intentionType, customerSubscriptions, }: {
250
+ intentionType: CustomerPortalIntentionType;
251
+ customerSubscriptions: CustomerPortalSubscription[];
252
+ }) => Promise<void> | void;
253
+
254
+ type CustomerPortalSection = 'usage' | 'addons' | 'promotionalEntitlements' | 'billingInformation' | 'paymentDetails' | 'invoices';
255
+ type CustomerPortalProps = {
256
+ onManageSubscription?: OnManageSubscriptionFn;
257
+ onBuyMore?: OnBuyMoreCallbackFn;
258
+ onCancelScheduledUpdates?: (subscription: CustomerPortalSubscription) => Promise<void> | void;
259
+ onContactSupport?: () => Promise<void> | void;
260
+ paywallComponent?: React.ReactNode;
261
+ hiddenSections?: CustomerPortalSection[];
262
+ textOverrides?: DeepPartial<CustomerPortalLocalization>;
263
+ theme?: DeepPartial<CustomerPortalTheme>;
264
+ filterEntitlements?: FilterEntitlementsFn;
265
+ resourceId?: string;
266
+ productId?: string;
267
+ };
268
+ declare function CustomerPortal({ textOverrides, theme, resourceId, productId, ...restProps }: CustomerPortalProps): react_jsx_runtime.JSX.Element;
269
+
270
+ type OnManageClick = ({ intentionType }: {
271
+ intentionType: CustomerPortalIntentionType;
272
+ }) => void;
273
+
274
+ type SubscriptionsOverviewProps = {
275
+ onManageSubscription: OnManageClick;
276
+ onBuyMore?: OnBuyMoreCallbackFn;
277
+ onCancelScheduledUpdates?: (subscription: CustomerPortalSubscription) => void;
278
+ onContactSupport?: () => void;
279
+ hiddenSections?: CustomerPortalSection[];
280
+ cancelScheduledUpdatesButtonTitle: string;
281
+ };
282
+ declare function SubscriptionsOverview({ onManageSubscription, onBuyMore, onCancelScheduledUpdates, onContactSupport, hiddenSections, cancelScheduledUpdatesButtonTitle, }: SubscriptionsOverviewProps): react_jsx_runtime.JSX.Element;
283
+
284
+ declare function PaymentDetailsSection(): react_jsx_runtime.JSX.Element | null;
285
+
286
+ declare function InvoicesSection(): react_jsx_runtime.JSX.Element | null;
287
+
288
+ type CustomerUsageDataProps = {
289
+ onManageSubscription?: OnManageClick;
290
+ onBuyMore?: OnBuyMoreCallbackFn;
291
+ filterEntitlements?: FilterEntitlementsFn;
292
+ };
293
+ declare function CustomerUsageData({ onManageSubscription, onBuyMore, filterEntitlements }: CustomerUsageDataProps): react_jsx_runtime.JSX.Element | null;
294
+
295
+ declare function AddonsList(): react_jsx_runtime.JSX.Element | null;
296
+
297
+ declare function Promotions(): react_jsx_runtime.JSX.Element;
298
+
299
+ declare function CustomerPortalProvider({ children, textOverrides, theme, resourceId, productId, }: {
300
+ children: react.ReactNode;
301
+ textOverrides?: DeepPartial<CustomerPortalLocalization>;
302
+ theme?: DeepPartial<CustomerPortalTheme>;
303
+ resourceId?: string;
304
+ productId?: string;
305
+ }): react_jsx_runtime.JSX.Element;
306
+
307
+ interface StiggContextValue {
308
+ stigg: _stigg_js_client_sdk.StiggClient;
309
+ isInitialized: boolean;
310
+ locale: string;
311
+ updatedAt?: Date;
312
+ customerPortalUpdatedAt?: Date;
313
+ refreshData: () => Promise<void>;
314
+ theme?: CustomizedTheme;
315
+ }
316
+ declare const StiggContext: react.Context<StiggContextValue | null>;
317
+ type StiggProviderProps = {
318
+ apiKey: string;
319
+ baseUri?: string;
320
+ baseEdgeUri?: string;
321
+ enableEdge?: boolean;
322
+ entitlementsFallback?: EntitlementsFallback;
323
+ customerId?: string;
324
+ customerToken?: string;
325
+ resourceId?: string;
326
+ theme?: CustomizedTheme;
327
+ locale?: string;
328
+ offline?: boolean;
329
+ cacheTtlMs?: number;
330
+ /** @deprecated not longer in use */
331
+ useEntitlementPolling?: boolean;
332
+ /** @deprecated not longer in use */
333
+ entitlementPollingInterval?: number;
334
+ stiggClient?: _stigg_js_client_sdk.StiggClient;
335
+ clientName?: string;
336
+ clientVersion?: string;
337
+ };
338
+ declare const StiggProvider: react.FC<PropsWithChildren<StiggProviderProps>>;
339
+
340
+ type AddonsStepState = {
341
+ addons: SubscriptionAddon[];
342
+ initialAddons?: SubscriptionAddon[];
343
+ availableAddons?: Addon[];
344
+ };
345
+
346
+ type PaymentStepState = {
347
+ useNewPaymentMethod: boolean;
348
+ errorMessage?: string;
349
+ billingAddress?: BillingAddress;
350
+ taxPercentage?: number;
351
+ };
352
+
353
+ type PlanStepState = {
354
+ billingPeriod: BillingPeriod$1;
355
+ billableFeatures: BillableFeatureInput[];
356
+ billingCountryCode?: string;
357
+ };
358
+
359
+ declare enum CheckoutStepKey {
360
+ PLAN = "PLAN",
361
+ ADDONS = "ADDONS",
362
+ PAYMENT = "PAYMENT"
363
+ }
364
+ type CheckoutState = {
365
+ planStep: PlanStepState;
366
+ addonsStep: AddonsStepState;
367
+ paymentStep: PaymentStepState;
368
+ };
369
+ type BillingInformation = {
370
+ taxDetails?: TaxDetailsInput;
371
+ };
372
+ type TaxDetailsInput = {
373
+ taxPercentage?: SubscriptionBillingInfo['taxPercentage'];
374
+ };
375
+ type MockCheckoutPreviewCallback = (params: PreviewSubscription) => SubscriptionPreviewV2;
376
+ type MockCheckoutStateCallback = (params: GetCheckoutState) => GetCheckoutStateResults;
377
+ type CheckoutMockProps = {
378
+ onMockCheckoutPreview?: MockCheckoutPreviewCallback;
379
+ onMockCheckoutState?: MockCheckoutStateCallback;
380
+ };
381
+ type OnBeforeStepChangeCallback = (params: {
382
+ from: CheckoutStepKey;
383
+ to: CheckoutStepKey;
384
+ state: CheckoutState;
385
+ }) => Promise<boolean>;
386
+ type OnBillableFeatureChangeCallback = (params: {
387
+ feature: NonNullable<Price['feature']>;
388
+ quantity: number;
389
+ }) => Promise<{
390
+ errorMessage?: string;
391
+ disableNextStep?: boolean;
392
+ }>;
393
+ type OnAddonChangeCallback = (params: {
394
+ addon: Addon;
395
+ quantity: number;
396
+ }) => Promise<{
397
+ errorMessage?: string;
398
+ disableNextStep?: boolean;
399
+ }>;
400
+ type OnCheckoutCallback = (params: {
401
+ customerId: string;
402
+ checkoutParams: ApplySubscription;
403
+ checkoutAction: (params: ApplySubscription) => Promise<{
404
+ success: boolean;
405
+ errorMessage?: string;
406
+ results?: ApplySubscriptionResults;
407
+ }>;
408
+ }) => Promise<{
409
+ success: boolean;
410
+ errorMessage?: string;
411
+ results?: ApplySubscriptionResults;
412
+ }>;
413
+ type OnCheckoutCompletedCallback = (params: {
414
+ success: boolean;
415
+ error?: string;
416
+ }) => Promise<void>;
417
+ type OnChangePlanCallback = (params: {
418
+ currentPlan: CheckoutStatePlan | undefined;
419
+ }) => void;
420
+ type OnBillingAddressChangeCallback = (params: {
421
+ billingAddress: BillingAddress;
422
+ }) => Promise<void>;
423
+ type OnCheckoutParams = {
424
+ customerId: string;
425
+ checkoutParams: ApplySubscription;
426
+ checkoutAction: (params: ApplySubscription) => Promise<{
427
+ success: boolean;
428
+ errorMessage?: string;
429
+ results?: ApplySubscriptionResults;
430
+ }>;
431
+ };
432
+ type OnCheckoutCompletedParams = {
433
+ success: boolean;
434
+ error?: string;
435
+ };
436
+ type CheckoutResult = {
437
+ success: boolean;
438
+ errorMessage?: string;
439
+ results?: ApplySubscriptionResults;
440
+ };
441
+
442
+ type CheckoutSteps = 'PLAN' | 'ADDONS';
443
+
444
+ type CheckoutLocalization = {
445
+ changePlan: string;
446
+ billingPeriodsTitle: string;
447
+ addAddonText: string;
448
+ addonBillingPeriodNotAvailableText: (params: {
449
+ planBillingPeriod: BillingPeriod;
450
+ }) => string;
451
+ newPaymentMethodText: string;
452
+ newPaymentMethodCardTitle: string;
453
+ newPaymentMethodBillingAddressTitle: string;
454
+ summary: {
455
+ title: string;
456
+ planName: (params: {
457
+ plan: {
458
+ displayName: string;
459
+ };
460
+ }) => string;
461
+ addCouponCodeText: string;
462
+ couponCodeTitle: string;
463
+ addonsSectionTitle: string;
464
+ discountsSectionTitle: string;
465
+ onlyPayAsYouGoText: string;
466
+ startsAtText: string;
467
+ proratedTotalDueText: string;
468
+ baseChargeText: string | ((params: {
469
+ billingPeriod: BillingPeriod;
470
+ }) => string);
471
+ totalText: string;
472
+ totalDueText: string;
473
+ totalBillingPeriodText: (params: {
474
+ billingPeriod: BillingPeriod;
475
+ }) => string;
476
+ discountText: (params: {
477
+ discountDetails: SubscriptionPreviewDiscount;
478
+ currency: string;
479
+ }) => string;
480
+ appliedCreditsTitle: string;
481
+ taxTitle: (params: {
482
+ taxDetails: SubscriptionPreviewTaxDetails;
483
+ }) => string;
484
+ checkoutSuccessText: string;
485
+ payAsYouGoTooltipText: string;
486
+ changesWillApplyAtEndOfBillingPeriod: string | ((params: {
487
+ billingPeriodEnd: Date;
488
+ }) => string);
489
+ creditsForUnusedTimeText: (params: {
490
+ credits: string;
491
+ }) => string;
492
+ };
493
+ checkoutButton: {
494
+ nextText: string;
495
+ noChangesText: string;
496
+ updateText: string;
497
+ downgradeToFreeText: string;
498
+ upgradeText: string;
499
+ };
500
+ downgradeToFree: {
501
+ alertText: (params: {
502
+ plan: Plan;
503
+ }) => string;
504
+ freePlanHeader: (params: {
505
+ plan: Plan;
506
+ }) => string;
507
+ freePlanName: (params: {
508
+ plan: Plan;
509
+ }) => string;
510
+ freePlanPriceText: (params: {
511
+ plan: Plan;
512
+ }) => string;
513
+ paidPlanHeader: (params: {
514
+ plan: Plan;
515
+ }) => string;
516
+ paidPlanName: (params: {
517
+ plan: Plan;
518
+ }) => string;
519
+ paidPlanPriceText: (params: {
520
+ plan: Plan;
521
+ billingPeriod?: BillingPeriod;
522
+ }) => string;
523
+ };
524
+ };
525
+
526
+ type CheckoutTheme = {
527
+ primary: string;
528
+ textColor: string;
529
+ backgroundColor: string;
530
+ borderColor: string;
531
+ summaryBackgroundColor: string;
532
+ paymentInputBackgroundColor?: string;
533
+ paymentInputBorderColor?: string;
534
+ paymentInputBorderRadius?: string;
535
+ };
536
+
537
+ type CheckoutProviderProps = {
538
+ textOverrides?: DeepPartial<CheckoutLocalization>;
539
+ theme?: DeepPartial<CheckoutTheme>;
540
+ resourceId?: string;
541
+ planId: string;
542
+ preferredBillingPeriod?: BillingPeriod;
543
+ billingCountryCode?: string;
544
+ billableFeatures?: BillableFeature[];
545
+ billingInformation?: BillingInformation;
546
+ onMockCheckoutState?: MockCheckoutStateCallback;
547
+ skipCheckoutSteps?: CheckoutSteps[];
548
+ onBeforeStepChange?: OnBeforeStepChangeCallback;
549
+ };
550
+
551
+ type CheckoutContainerProps = {
552
+ onCheckout?: OnCheckoutCallback;
553
+ onCheckoutCompleted: OnCheckoutCompletedCallback;
554
+ onChangePlan?: OnChangePlanCallback;
555
+ onBillingAddressChange?: OnBillingAddressChangeCallback;
556
+ onBillableFeatureChange?: OnBillableFeatureChangeCallback;
557
+ onAddonChange?: OnAddonChangeCallback;
558
+ disablePromotionCode?: boolean;
559
+ disableSuccessAnimation?: boolean;
560
+ collectPhoneNumber?: boolean;
561
+ onMockCheckoutPreview?: MockCheckoutPreviewCallback;
562
+ };
563
+
564
+ type CheckoutProps = CheckoutProviderProps & CheckoutContainerProps & CheckoutMockProps;
565
+ declare const Checkout: ({ textOverrides, theme, resourceId, planId, preferredBillingPeriod, billingCountryCode, billableFeatures, billingInformation, onMockCheckoutState, skipCheckoutSteps, onBeforeStepChange, ...containerProps }: CheckoutProps) => react_jsx_runtime.JSX.Element;
566
+
567
+ declare enum ProvisionStatus {
568
+ IN_PROGRESS = "IN_PROGRESS",
569
+ SUCCEEDED = "SUCCEEDED",
570
+ FAILED = "FAILED"
571
+ }
572
+ declare const useWaitForCheckoutCompleted: ({ onProvisionStart, onProvisionSucceeded, onProvisionFailed, }?: {
573
+ onProvisionStart?: (() => void) | undefined;
574
+ onProvisionSucceeded?: ((subscription?: Subscription | null) => void) | undefined;
575
+ onProvisionFailed?: ((err?: any) => void) | undefined;
576
+ }) => {
577
+ isAwaitingCheckout: boolean;
578
+ provisionStatus: ProvisionStatus;
579
+ };
580
+
581
+ type TypedGetBooleanEntitlement<T> = Omit<GetBooleanEntitlement, 'featureId'> & {
582
+ featureId: T;
583
+ };
584
+ declare function useBooleanEntitlement<T extends string>(params: TypedGetBooleanEntitlement<T>): BooleanEntitlement;
585
+
586
+ type TypedGetNumericEntitlement<T> = Omit<GetNumericEntitlement, 'featureId'> & {
587
+ featureId: T;
588
+ };
589
+ declare function useNumericEntitlement<T extends string>(params: TypedGetNumericEntitlement<T>): NumericEntitlement;
590
+
591
+ type TypedGetMeteredEntitlement<T> = Omit<GetMeteredEntitlement, 'featureId'> & {
592
+ featureId: T;
593
+ };
594
+ declare function useMeteredEntitlement<T extends string>(params: TypedGetMeteredEntitlement<T>): MeteredEntitlement;
595
+
596
+ type TypedGetEnumEntitlement<T> = Omit<GetEnumEntitlement, 'featureId'> & {
597
+ featureId: T;
598
+ };
599
+ declare function useEnumEntitlement<T extends string>(params: TypedGetEnumEntitlement<T>): EnumEntitlement;
600
+
601
+ declare function useActiveSubscriptions(params?: GetActiveSubscriptions): {
602
+ activeSubscriptions: _stigg_js_client_sdk.Subscription[] | null;
603
+ isLoading: boolean;
604
+ error: Error | null;
605
+ };
606
+
607
+ declare function usePaywall(params?: GetPaywall): {
608
+ paywall: _stigg_js_client_sdk.Paywall | null;
609
+ isLoading: boolean;
610
+ error: Error | null;
611
+ };
612
+
613
+ declare function useCustomerPortal(params?: GetCustomerPortal): {
614
+ customerPortal: _stigg_js_client_sdk.CustomerPortal | null;
615
+ isLoading: boolean;
616
+ error: Error | null;
617
+ };
618
+
619
+ declare function useStiggContext(options?: {
620
+ optional?: false;
621
+ }): StiggContextValue;
622
+ declare function useStiggContext(options: {
623
+ optional: true;
624
+ }): StiggContextValue | null;
625
+
626
+ type BooleanEntitlementGuardProps = GetBooleanEntitlement & {
627
+ noAccessComponent?: React.ReactNode;
628
+ children: React.ReactElement;
629
+ };
630
+ declare function BooleanEntitlementGuard({ noAccessComponent, children, ...rest }: BooleanEntitlementGuardProps): JSX.Element;
631
+
632
+ type NumericEntitlementGuardProps = GetNumericEntitlement & {
633
+ noAccessComponent?: React.ReactNode;
634
+ children: React.ReactElement;
635
+ };
636
+ declare function NumericEntitlementGuard({ noAccessComponent, children, ...rest }: NumericEntitlementGuardProps): JSX.Element;
637
+
638
+ type MeteredEntitlementGuardProps = GetMeteredEntitlement & {
639
+ noAccessComponent?: React.ReactNode;
640
+ children: React.ReactElement;
641
+ };
642
+ declare function MeteredEntitlementGuard({ noAccessComponent, children, ...rest }: MeteredEntitlementGuardProps): JSX.Element;
643
+
644
+ type EnumEntitlementGuardProps = GetEnumEntitlement & {
645
+ noAccessComponent?: React.ReactNode;
646
+ children: React.ReactElement;
647
+ };
648
+ declare function EnumEntitlementGuard({ noAccessComponent, children, ...rest }: EnumEntitlementGuardProps): JSX.Element;
649
+
650
+ interface GetCreditBalanceParams {
651
+ currencyId: string;
652
+ }
653
+ declare function useCreditBalance(params: GetCreditBalanceParams): {
654
+ balance: {
655
+ currentBalance: number;
656
+ totalConsumed: number;
657
+ totalGranted: number;
658
+ currencyId: string;
659
+ displayName: string;
660
+ units: {
661
+ __typename?: "Units" | undefined;
662
+ singular: string;
663
+ plural: string;
664
+ } | null | undefined;
665
+ symbol: string | null | undefined;
666
+ } | {
667
+ currencyId: string;
668
+ currentBalance: number;
669
+ totalConsumed: number;
670
+ totalGranted: number;
671
+ displayName?: undefined;
672
+ units?: undefined;
673
+ symbol?: undefined;
674
+ } | null;
675
+ isLoading: boolean;
676
+ error: Error | null;
677
+ };
678
+
679
+ type CreditBalanceProps = GetCreditBalanceParams & {
680
+ localization?: CreditBalanceLocalization;
681
+ decimalPlaces?: number | null;
682
+ showUnits?: boolean;
683
+ showSymbol?: boolean;
684
+ };
685
+ type CreditBalanceLocalization = {
686
+ title: string;
687
+ };
688
+ declare function CreditBalance({ currencyId, localization, decimalPlaces, showUnits, showSymbol, }: CreditBalanceProps): react_jsx_runtime.JSX.Element;
689
+
690
+ type CreditUsageChartLocalization = {
691
+ title: string;
692
+ totalSpend: string;
693
+ };
694
+
695
+ type CreditUsageChartProps = {
696
+ currencyId: string;
697
+ timeRange: CreditUsageTimeRange;
698
+ localization?: Partial<CreditUsageChartLocalization>;
699
+ };
700
+ declare function CreditUsageChart({ currencyId, timeRange, localization: customLocalization }: CreditUsageChartProps): react_jsx_runtime.JSX.Element;
701
+
702
+ declare function useCreditUsage(params: GetCreditUsageInput): {
703
+ creditUsage: _stigg_js_client_sdk.CreditUsageFragment | null;
704
+ isLoading: boolean;
705
+ error: Error | null;
706
+ };
707
+
708
+ type CreditUtilizationProps = GetCreditBalanceParams & {
709
+ localization?: CreditUtilizationLocalization;
710
+ decimalPlaces?: number | null;
711
+ showUnits?: boolean;
712
+ showSymbol?: boolean;
713
+ };
714
+ type CreditUtilizationLocalization = {
715
+ title: string;
716
+ remaining: string;
717
+ };
718
+ declare function CreditUtilization({ currencyId, localization, decimalPlaces, showUnits, showSymbol, }: CreditUtilizationProps): react_jsx_runtime.JSX.Element;
719
+
720
+ type CreditGrant = Pick<CreditGrantFragment, 'grantId' | 'amount' | 'comment' | 'currencyId' | 'effectiveAt' | 'expireAt' | 'grantType' | 'consumedAmount' | 'createdAt' | 'updatedAt'>;
721
+ declare enum CreditGrantStatus {
722
+ SCHEDULED = "SCHEDULED",
723
+ AVAILABLE = "AVAILABLE",
724
+ EXPIRED = "EXPIRED"
725
+ }
726
+ interface GetCreditGrantsParams {
727
+ currencyId?: string;
728
+ pageSize?: number;
729
+ paging?: CursorPaging;
730
+ }
731
+ type CreditGrantsLocalization = {
732
+ receivedAt: string;
733
+ effectiveAt: string;
734
+ grantType: string;
735
+ status: string;
736
+ balance: string;
737
+ expiryDate: string;
738
+ emptyState: string;
739
+ loadingState: string;
740
+ errorState: string;
741
+ };
742
+
743
+ type CreditGrantsProps = GetCreditGrantsParams & {
744
+ localization?: Partial<CreditGrantsLocalization>;
745
+ decimalPlaces?: number | null;
746
+ };
747
+ declare function CreditGrants({ currencyId, localization: customLocalization, decimalPlaces, pageSize, }: CreditGrantsProps): react_jsx_runtime.JSX.Element;
748
+
749
+ declare function useCreditGrants(params: GetCreditGrantsParams): {
750
+ creditGrants: CreditGrant[];
751
+ isLoading: boolean;
752
+ error: Error | null;
753
+ paging?: PageInfoFragment | null;
754
+ totalCount?: number;
755
+ };
756
+
757
+ type TableAlignment = 'left' | 'center' | 'right';
758
+ type PixelWidth = `${number}px`;
759
+ interface HeadCell<T> {
760
+ id: string;
761
+ alignment?: TableAlignment;
762
+ label: string;
763
+ width?: PixelWidth;
764
+ maxWidth?: PixelWidth;
765
+ minWidth?: PixelWidth;
766
+ disableClick?: boolean;
767
+ visible?: boolean;
768
+ render: (item: T) => ReactNode;
769
+ }
770
+ interface GenericTableProps<T> {
771
+ data: T[];
772
+ headCells: Array<HeadCell<T>>;
773
+ isLoading?: boolean;
774
+ error?: Error | null;
775
+ emptyMessage?: ReactNode;
776
+ loadingMessage?: string;
777
+ errorMessage?: ReactNode;
778
+ onRowClick?: (item: T) => void;
779
+ className?: string;
780
+ skeletonRows?: number;
781
+ hideLastRowBorder?: boolean;
782
+ pageSize?: number;
783
+ pageNum?: number;
784
+ totalCount?: number;
785
+ onPageChange?: (event: any, nextPage: number) => void;
786
+ }
787
+
788
+ declare function GenericTable<T>({ data, headCells, isLoading, error, emptyMessage, errorMessage, onRowClick, className, skeletonRows, hideLastRowBorder, pageSize, pageNum, totalCount, onPageChange, }: GenericTableProps<T>): react_jsx_runtime.JSX.Element;
789
+
790
+ interface ErrorStateProps {
791
+ errorMessage?: ReactNode;
792
+ className?: string;
793
+ }
794
+ declare function ErrorState({ errorMessage, className }: ErrorStateProps): react_jsx_runtime.JSX.Element;
795
+
796
+ interface EmptyStateProps {
797
+ message?: ReactNode;
798
+ className?: string;
799
+ }
800
+ declare function EmptyState({ message, className }: EmptyStateProps): react_jsx_runtime.JSX.Element;
801
+
802
+ /**
803
+ * Formats a date with time in the format "MMM D, YYYY h:mmA"
804
+ * Example: "Aug 2, 2025 3:45PM"
805
+ */
806
+ declare function formatDateTime(date: any): string;
807
+ /**
808
+ * Formats a date without time in the format "MMM D, YYYY"
809
+ * Example: "Aug 2, 2025"
810
+ */
811
+ declare function formatDateOnly(date: any): string;
812
+
813
+ interface StatusChipProps extends Omit<ChipProps, 'variant' | 'color'> {
814
+ variant: StatusChipVariant;
815
+ label: string;
816
+ }
817
+ /**
818
+ * StatusChip component for displaying status indicators with consistent theming
819
+ *
820
+ * @param variant - The status variant (success, warning, error, info, neutral)
821
+ * @param label - The text to display in the chip
822
+ * @param className - Optional CSS class name
823
+ * @param size - Size of the chip (defaults to 'small')
824
+ */
825
+ declare function StatusChip({ variant, label, className, size, ...props }: StatusChipProps): react_jsx_runtime.JSX.Element;
826
+
827
+ declare const mapCreditGrantStatusToVariant: (status: CreditGrantStatus) => StatusChipVariant;
828
+
829
+ export { AddonsList, type BillingInformation, BooleanEntitlementGuard, Checkout, type CheckoutContainerProps, type CheckoutLocalization, type CheckoutMockProps, type CheckoutProps, type CheckoutProviderProps, type CheckoutResult, type CheckoutState, CheckoutStepKey, type CheckoutTheme, CreditBalance, type CreditBalanceProps, CreditGrants, type CreditGrantsLocalization, type CreditGrantsProps, CreditUsageChart, CreditUtilization, type CreditUtilizationLocalization, type CreditUtilizationProps, type CurrentPlanParams, type CurrentSubscriptionOverride, type CurrentSubscriptionOverrideFn, CustomerPortal, CustomerPortalIntentionType, type CustomerPortalLocalization, type CustomerPortalProps, CustomerPortalProvider, type CustomerPortalSection, type CustomerPortalTheme, CustomerUsageData, type CustomerUsageDataProps, EmptyState, EnumEntitlementGuard, ErrorState, type FontVariant, GenericTable, type GenericTableProps, type GetCreditBalanceParams, type GetCreditGrantsParams, type HeadCell, type HorizontalAlignment, InvoicesSection, MeteredEntitlementGuard, type MockCheckoutPreviewCallback, type MockCheckoutStateCallback, NumericEntitlementGuard, type OnAddonChangeCallback, type OnBeforeStepChangeCallback, type OnBillableFeatureChangeCallback, type OnBuyMoreCallbackFn, type OnCheckoutCompletedParams, type OnCheckoutParams, type OnManageSubscriptionFn, type OnPlanSelectedCallbackFn, PaymentDetailsSection, PaywallContainer as Paywall, type PaywallData, type PaywallLocalization, type PaywallPlan, type PaywallContainerProps as PaywallProps, type PixelWidth, type PlanPriceText, Promotions, ProvisionStatus, type SelectDefaultTierIndexFn, type ShouldHidePlanFn, StatusChip, type StatusChipColors, type StatusChipVariant, StiggContext, type StiggContextValue, StiggProvider, type StiggProviderProps, type StiggTheme, SubscribeIntentionType, SubscriptionsOverview, type SubscriptionsOverviewProps, type TableAlignment, type TaxDetailsInput, type TextAlignment, type CustomizedTheme as Theme, formatDateOnly, formatDateTime, mapCreditGrantStatusToVariant, useActiveSubscriptions, useBooleanEntitlement, useCreditBalance, useCreditGrants, useCreditUsage, useCustomerPortal, useEnumEntitlement, useMeteredEntitlement, useNumericEntitlement, usePaywall, useStiggContext, useWaitForCheckoutCompleted };