@stigg/react-sdk 7.10.0 → 7.12.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/index.d.mts CHANGED
@@ -1,7 +1,6 @@
1
1
  import * as _stigg_js_client_sdk from '@stigg/js-client-sdk';
2
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
3
  export * from '@stigg/js-client-sdk';
4
- import * as react_jsx_runtime from 'react/jsx-runtime';
5
4
  import { FeatureFragment, BillingPeriod as BillingPeriod$1, BillableFeatureInput } from '@stigg/api-client-js/src/generated/sdk';
6
5
  import react, { PropsWithChildren, ReactNode } from 'react';
7
6
  import { ChipProps } from '@mui/material';
@@ -211,7 +210,7 @@ type PaywallContainerProps = {
211
210
  currentSubscriptionOverride?: CurrentSubscriptionOverrideFn;
212
211
  skeletonPlanCount?: number;
213
212
  };
214
- declare const PaywallContainer: ({ productId, resourceId, highlightedPlanId, showOnlyEligiblePlans, textOverrides, onPlanSelected, preferredBillingPeriod, onBillingPeriodChange, billingCountryCode, shouldHidePlan, selectDefaultTierIndex, currentSubscriptionOverride: currentSubscriptionOverrideFn, hideCompatibleAddons, skeletonPlanCount, }: PaywallContainerProps) => react_jsx_runtime.JSX.Element;
213
+ declare const PaywallContainer: ({ productId, resourceId, highlightedPlanId, showOnlyEligiblePlans, textOverrides, onPlanSelected, preferredBillingPeriod, onBillingPeriodChange, billingCountryCode, shouldHidePlan, selectDefaultTierIndex, currentSubscriptionOverride: currentSubscriptionOverrideFn, hideCompatibleAddons, skeletonPlanCount, }: PaywallContainerProps) => JSX.Element;
215
214
 
216
215
  type CustomerPortalLocalization = {
217
216
  manageSubscription: string;
@@ -266,7 +265,7 @@ type CustomerPortalProps = {
266
265
  resourceId?: string;
267
266
  productId?: string;
268
267
  };
269
- declare function CustomerPortal({ textOverrides, theme, resourceId, productId, ...restProps }: CustomerPortalProps): react_jsx_runtime.JSX.Element;
268
+ declare function CustomerPortal({ textOverrides, theme, resourceId, productId, ...restProps }: CustomerPortalProps): JSX.Element;
270
269
 
271
270
  type OnManageClick = ({ intentionType }: {
272
271
  intentionType: CustomerPortalIntentionType;
@@ -280,22 +279,22 @@ type SubscriptionsOverviewProps = {
280
279
  hiddenSections?: CustomerPortalSection[];
281
280
  cancelScheduledUpdatesButtonTitle: string;
282
281
  };
283
- declare function SubscriptionsOverview({ onManageSubscription, onBuyMore, onCancelScheduledUpdates, onContactSupport, hiddenSections, cancelScheduledUpdatesButtonTitle, }: SubscriptionsOverviewProps): react_jsx_runtime.JSX.Element;
282
+ declare function SubscriptionsOverview({ onManageSubscription, onBuyMore, onCancelScheduledUpdates, onContactSupport, hiddenSections, cancelScheduledUpdatesButtonTitle, }: SubscriptionsOverviewProps): JSX.Element;
284
283
 
285
- declare function PaymentDetailsSection(): react_jsx_runtime.JSX.Element | null;
284
+ declare function PaymentDetailsSection(): JSX.Element | null;
286
285
 
287
- declare function InvoicesSection(): react_jsx_runtime.JSX.Element | null;
286
+ declare function InvoicesSection(): JSX.Element | null;
288
287
 
289
288
  type CustomerUsageDataProps = {
290
289
  onManageSubscription?: OnManageClick;
291
290
  onBuyMore?: OnBuyMoreCallbackFn;
292
291
  filterEntitlements?: FilterEntitlementsFn;
293
292
  };
294
- declare function CustomerUsageData({ onManageSubscription, onBuyMore, filterEntitlements }: CustomerUsageDataProps): react_jsx_runtime.JSX.Element | null;
293
+ declare function CustomerUsageData({ onManageSubscription, onBuyMore, filterEntitlements }: CustomerUsageDataProps): JSX.Element | null;
295
294
 
296
- declare function AddonsList(): react_jsx_runtime.JSX.Element | null;
295
+ declare function AddonsList(): JSX.Element | null;
297
296
 
298
- declare function Promotions(): react_jsx_runtime.JSX.Element;
297
+ declare function Promotions(): JSX.Element;
299
298
 
300
299
  declare function CustomerPortalProvider({ children, textOverrides, theme, resourceId, productId, }: {
301
300
  children: react.ReactNode;
@@ -303,7 +302,7 @@ declare function CustomerPortalProvider({ children, textOverrides, theme, resour
303
302
  theme?: DeepPartial<CustomerPortalTheme>;
304
303
  resourceId?: string;
305
304
  productId?: string;
306
- }): react_jsx_runtime.JSX.Element;
305
+ }): JSX.Element;
307
306
 
308
307
  interface StiggContextValue {
309
308
  stigg: _stigg_js_client_sdk.StiggClient;
@@ -563,7 +562,7 @@ type CheckoutContainerProps = {
563
562
  };
564
563
 
565
564
  type CheckoutProps = CheckoutProviderProps & CheckoutContainerProps & CheckoutMockProps;
566
- declare const Checkout: ({ textOverrides, theme, resourceId, planId, preferredBillingPeriod, billingCountryCode, billableFeatures, billingInformation, onMockCheckoutState, skipCheckoutSteps, onBeforeStepChange, ...containerProps }: CheckoutProps) => react_jsx_runtime.JSX.Element;
565
+ declare const Checkout: ({ textOverrides, theme, resourceId, planId, preferredBillingPeriod, billingCountryCode, billableFeatures, billingInformation, onMockCheckoutState, skipCheckoutSteps, onBeforeStepChange, ...containerProps }: CheckoutProps) => JSX.Element;
567
566
 
568
567
  declare enum ProvisionStatus {
569
568
  IN_PROGRESS = "IN_PROGRESS",
@@ -686,7 +685,7 @@ type CreditBalanceProps = GetCreditBalanceParams & {
686
685
  type CreditBalanceLocalization = {
687
686
  title: string;
688
687
  };
689
- declare function CreditBalance({ currencyId, localization, decimalPlaces, showUnits, showSymbol, }: CreditBalanceProps): react_jsx_runtime.JSX.Element;
688
+ declare function CreditBalance({ currencyId, localization, decimalPlaces, showUnits, showSymbol, }: CreditBalanceProps): JSX.Element;
690
689
 
691
690
  type CreditUsageChartLocalization = {
692
691
  title: string;
@@ -698,7 +697,7 @@ type CreditUsageChartProps = {
698
697
  timeRange: CreditUsageTimeRange;
699
698
  localization?: Partial<CreditUsageChartLocalization>;
700
699
  };
701
- declare function CreditUsageChart({ currencyId, timeRange, localization: customLocalization }: CreditUsageChartProps): react_jsx_runtime.JSX.Element;
700
+ declare function CreditUsageChart({ currencyId, timeRange, localization: customLocalization }: CreditUsageChartProps): JSX.Element;
702
701
 
703
702
  declare function useCreditUsage(params: GetCreditUsageInput): {
704
703
  creditUsage: _stigg_js_client_sdk.CreditUsageFragment | null;
@@ -716,7 +715,7 @@ type CreditUtilizationLocalization = {
716
715
  title: string;
717
716
  remaining: string;
718
717
  };
719
- declare function CreditUtilization({ currencyId, localization, decimalPlaces, showUnits, showSymbol, }: CreditUtilizationProps): react_jsx_runtime.JSX.Element;
718
+ declare function CreditUtilization({ currencyId, localization, decimalPlaces, showUnits, showSymbol, }: CreditUtilizationProps): JSX.Element;
720
719
 
721
720
  type CreditGrant = Pick<CreditGrantFragment, 'grantId' | 'amount' | 'comment' | 'currencyId' | 'effectiveAt' | 'expireAt' | 'grantType' | 'consumedAmount' | 'createdAt' | 'updatedAt'>;
722
721
  declare enum CreditGrantStatus {
@@ -745,7 +744,7 @@ type CreditGrantsProps = GetCreditGrantsParams & {
745
744
  localization?: Partial<CreditGrantsLocalization>;
746
745
  decimalPlaces?: number | null;
747
746
  };
748
- declare function CreditGrants({ currencyId, localization: customLocalization, decimalPlaces, pageSize, }: CreditGrantsProps): react_jsx_runtime.JSX.Element;
747
+ declare function CreditGrants({ currencyId, localization: customLocalization, decimalPlaces, pageSize, }: CreditGrantsProps): JSX.Element;
749
748
 
750
749
  declare function useCreditGrants(params: GetCreditGrantsParams): {
751
750
  creditGrants: CreditGrant[];
@@ -786,19 +785,19 @@ interface GenericTableProps<T> {
786
785
  onPageChange?: (event: any, nextPage: number) => void;
787
786
  }
788
787
 
789
- 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;
788
+ declare function GenericTable<T>({ data, headCells, isLoading, error, emptyMessage, errorMessage, onRowClick, className, skeletonRows, hideLastRowBorder, pageSize, pageNum, totalCount, onPageChange, }: GenericTableProps<T>): JSX.Element;
790
789
 
791
790
  interface ErrorStateProps {
792
791
  errorMessage?: ReactNode;
793
792
  className?: string;
794
793
  }
795
- declare function ErrorState({ errorMessage, className }: ErrorStateProps): react_jsx_runtime.JSX.Element;
794
+ declare function ErrorState({ errorMessage, className }: ErrorStateProps): JSX.Element;
796
795
 
797
796
  interface EmptyStateProps {
798
797
  message?: ReactNode;
799
798
  className?: string;
800
799
  }
801
- declare function EmptyState({ message, className }: EmptyStateProps): react_jsx_runtime.JSX.Element;
800
+ declare function EmptyState({ message, className }: EmptyStateProps): JSX.Element;
802
801
 
803
802
  /**
804
803
  * Formats a date with time in the format "MMM D, YYYY h:mmA"
@@ -823,7 +822,7 @@ interface StatusChipProps extends Omit<ChipProps, 'variant' | 'color'> {
823
822
  * @param className - Optional CSS class name
824
823
  * @param size - Size of the chip (defaults to 'small')
825
824
  */
826
- declare function StatusChip({ variant, label, className, size, ...props }: StatusChipProps): react_jsx_runtime.JSX.Element;
825
+ declare function StatusChip({ variant, label, className, size, ...props }: StatusChipProps): JSX.Element;
827
826
 
828
827
  declare const mapCreditGrantStatusToVariant: (status: CreditGrantStatus) => StatusChipVariant;
829
828
 
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import * as _stigg_js_client_sdk from '@stigg/js-client-sdk';
2
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
3
  export * from '@stigg/js-client-sdk';
4
- import * as react_jsx_runtime from 'react/jsx-runtime';
5
4
  import { FeatureFragment, BillingPeriod as BillingPeriod$1, BillableFeatureInput } from '@stigg/api-client-js/src/generated/sdk';
6
5
  import react, { PropsWithChildren, ReactNode } from 'react';
7
6
  import { ChipProps } from '@mui/material';
@@ -211,7 +210,7 @@ type PaywallContainerProps = {
211
210
  currentSubscriptionOverride?: CurrentSubscriptionOverrideFn;
212
211
  skeletonPlanCount?: number;
213
212
  };
214
- declare const PaywallContainer: ({ productId, resourceId, highlightedPlanId, showOnlyEligiblePlans, textOverrides, onPlanSelected, preferredBillingPeriod, onBillingPeriodChange, billingCountryCode, shouldHidePlan, selectDefaultTierIndex, currentSubscriptionOverride: currentSubscriptionOverrideFn, hideCompatibleAddons, skeletonPlanCount, }: PaywallContainerProps) => react_jsx_runtime.JSX.Element;
213
+ declare const PaywallContainer: ({ productId, resourceId, highlightedPlanId, showOnlyEligiblePlans, textOverrides, onPlanSelected, preferredBillingPeriod, onBillingPeriodChange, billingCountryCode, shouldHidePlan, selectDefaultTierIndex, currentSubscriptionOverride: currentSubscriptionOverrideFn, hideCompatibleAddons, skeletonPlanCount, }: PaywallContainerProps) => JSX.Element;
215
214
 
216
215
  type CustomerPortalLocalization = {
217
216
  manageSubscription: string;
@@ -266,7 +265,7 @@ type CustomerPortalProps = {
266
265
  resourceId?: string;
267
266
  productId?: string;
268
267
  };
269
- declare function CustomerPortal({ textOverrides, theme, resourceId, productId, ...restProps }: CustomerPortalProps): react_jsx_runtime.JSX.Element;
268
+ declare function CustomerPortal({ textOverrides, theme, resourceId, productId, ...restProps }: CustomerPortalProps): JSX.Element;
270
269
 
271
270
  type OnManageClick = ({ intentionType }: {
272
271
  intentionType: CustomerPortalIntentionType;
@@ -280,22 +279,22 @@ type SubscriptionsOverviewProps = {
280
279
  hiddenSections?: CustomerPortalSection[];
281
280
  cancelScheduledUpdatesButtonTitle: string;
282
281
  };
283
- declare function SubscriptionsOverview({ onManageSubscription, onBuyMore, onCancelScheduledUpdates, onContactSupport, hiddenSections, cancelScheduledUpdatesButtonTitle, }: SubscriptionsOverviewProps): react_jsx_runtime.JSX.Element;
282
+ declare function SubscriptionsOverview({ onManageSubscription, onBuyMore, onCancelScheduledUpdates, onContactSupport, hiddenSections, cancelScheduledUpdatesButtonTitle, }: SubscriptionsOverviewProps): JSX.Element;
284
283
 
285
- declare function PaymentDetailsSection(): react_jsx_runtime.JSX.Element | null;
284
+ declare function PaymentDetailsSection(): JSX.Element | null;
286
285
 
287
- declare function InvoicesSection(): react_jsx_runtime.JSX.Element | null;
286
+ declare function InvoicesSection(): JSX.Element | null;
288
287
 
289
288
  type CustomerUsageDataProps = {
290
289
  onManageSubscription?: OnManageClick;
291
290
  onBuyMore?: OnBuyMoreCallbackFn;
292
291
  filterEntitlements?: FilterEntitlementsFn;
293
292
  };
294
- declare function CustomerUsageData({ onManageSubscription, onBuyMore, filterEntitlements }: CustomerUsageDataProps): react_jsx_runtime.JSX.Element | null;
293
+ declare function CustomerUsageData({ onManageSubscription, onBuyMore, filterEntitlements }: CustomerUsageDataProps): JSX.Element | null;
295
294
 
296
- declare function AddonsList(): react_jsx_runtime.JSX.Element | null;
295
+ declare function AddonsList(): JSX.Element | null;
297
296
 
298
- declare function Promotions(): react_jsx_runtime.JSX.Element;
297
+ declare function Promotions(): JSX.Element;
299
298
 
300
299
  declare function CustomerPortalProvider({ children, textOverrides, theme, resourceId, productId, }: {
301
300
  children: react.ReactNode;
@@ -303,7 +302,7 @@ declare function CustomerPortalProvider({ children, textOverrides, theme, resour
303
302
  theme?: DeepPartial<CustomerPortalTheme>;
304
303
  resourceId?: string;
305
304
  productId?: string;
306
- }): react_jsx_runtime.JSX.Element;
305
+ }): JSX.Element;
307
306
 
308
307
  interface StiggContextValue {
309
308
  stigg: _stigg_js_client_sdk.StiggClient;
@@ -563,7 +562,7 @@ type CheckoutContainerProps = {
563
562
  };
564
563
 
565
564
  type CheckoutProps = CheckoutProviderProps & CheckoutContainerProps & CheckoutMockProps;
566
- declare const Checkout: ({ textOverrides, theme, resourceId, planId, preferredBillingPeriod, billingCountryCode, billableFeatures, billingInformation, onMockCheckoutState, skipCheckoutSteps, onBeforeStepChange, ...containerProps }: CheckoutProps) => react_jsx_runtime.JSX.Element;
565
+ declare const Checkout: ({ textOverrides, theme, resourceId, planId, preferredBillingPeriod, billingCountryCode, billableFeatures, billingInformation, onMockCheckoutState, skipCheckoutSteps, onBeforeStepChange, ...containerProps }: CheckoutProps) => JSX.Element;
567
566
 
568
567
  declare enum ProvisionStatus {
569
568
  IN_PROGRESS = "IN_PROGRESS",
@@ -686,7 +685,7 @@ type CreditBalanceProps = GetCreditBalanceParams & {
686
685
  type CreditBalanceLocalization = {
687
686
  title: string;
688
687
  };
689
- declare function CreditBalance({ currencyId, localization, decimalPlaces, showUnits, showSymbol, }: CreditBalanceProps): react_jsx_runtime.JSX.Element;
688
+ declare function CreditBalance({ currencyId, localization, decimalPlaces, showUnits, showSymbol, }: CreditBalanceProps): JSX.Element;
690
689
 
691
690
  type CreditUsageChartLocalization = {
692
691
  title: string;
@@ -698,7 +697,7 @@ type CreditUsageChartProps = {
698
697
  timeRange: CreditUsageTimeRange;
699
698
  localization?: Partial<CreditUsageChartLocalization>;
700
699
  };
701
- declare function CreditUsageChart({ currencyId, timeRange, localization: customLocalization }: CreditUsageChartProps): react_jsx_runtime.JSX.Element;
700
+ declare function CreditUsageChart({ currencyId, timeRange, localization: customLocalization }: CreditUsageChartProps): JSX.Element;
702
701
 
703
702
  declare function useCreditUsage(params: GetCreditUsageInput): {
704
703
  creditUsage: _stigg_js_client_sdk.CreditUsageFragment | null;
@@ -716,7 +715,7 @@ type CreditUtilizationLocalization = {
716
715
  title: string;
717
716
  remaining: string;
718
717
  };
719
- declare function CreditUtilization({ currencyId, localization, decimalPlaces, showUnits, showSymbol, }: CreditUtilizationProps): react_jsx_runtime.JSX.Element;
718
+ declare function CreditUtilization({ currencyId, localization, decimalPlaces, showUnits, showSymbol, }: CreditUtilizationProps): JSX.Element;
720
719
 
721
720
  type CreditGrant = Pick<CreditGrantFragment, 'grantId' | 'amount' | 'comment' | 'currencyId' | 'effectiveAt' | 'expireAt' | 'grantType' | 'consumedAmount' | 'createdAt' | 'updatedAt'>;
722
721
  declare enum CreditGrantStatus {
@@ -745,7 +744,7 @@ type CreditGrantsProps = GetCreditGrantsParams & {
745
744
  localization?: Partial<CreditGrantsLocalization>;
746
745
  decimalPlaces?: number | null;
747
746
  };
748
- declare function CreditGrants({ currencyId, localization: customLocalization, decimalPlaces, pageSize, }: CreditGrantsProps): react_jsx_runtime.JSX.Element;
747
+ declare function CreditGrants({ currencyId, localization: customLocalization, decimalPlaces, pageSize, }: CreditGrantsProps): JSX.Element;
749
748
 
750
749
  declare function useCreditGrants(params: GetCreditGrantsParams): {
751
750
  creditGrants: CreditGrant[];
@@ -786,19 +785,19 @@ interface GenericTableProps<T> {
786
785
  onPageChange?: (event: any, nextPage: number) => void;
787
786
  }
788
787
 
789
- 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;
788
+ declare function GenericTable<T>({ data, headCells, isLoading, error, emptyMessage, errorMessage, onRowClick, className, skeletonRows, hideLastRowBorder, pageSize, pageNum, totalCount, onPageChange, }: GenericTableProps<T>): JSX.Element;
790
789
 
791
790
  interface ErrorStateProps {
792
791
  errorMessage?: ReactNode;
793
792
  className?: string;
794
793
  }
795
- declare function ErrorState({ errorMessage, className }: ErrorStateProps): react_jsx_runtime.JSX.Element;
794
+ declare function ErrorState({ errorMessage, className }: ErrorStateProps): JSX.Element;
796
795
 
797
796
  interface EmptyStateProps {
798
797
  message?: ReactNode;
799
798
  className?: string;
800
799
  }
801
- declare function EmptyState({ message, className }: EmptyStateProps): react_jsx_runtime.JSX.Element;
800
+ declare function EmptyState({ message, className }: EmptyStateProps): JSX.Element;
802
801
 
803
802
  /**
804
803
  * Formats a date with time in the format "MMM D, YYYY h:mmA"
@@ -823,7 +822,7 @@ interface StatusChipProps extends Omit<ChipProps, 'variant' | 'color'> {
823
822
  * @param className - Optional CSS class name
824
823
  * @param size - Size of the chip (defaults to 'small')
825
824
  */
826
- declare function StatusChip({ variant, label, className, size, ...props }: StatusChipProps): react_jsx_runtime.JSX.Element;
825
+ declare function StatusChip({ variant, label, className, size, ...props }: StatusChipProps): JSX.Element;
827
826
 
828
827
  declare const mapCreditGrantStatusToVariant: (status: CreditGrantStatus) => StatusChipVariant;
829
828