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