@burdenoff/microfe-billing 2026.1031.1 → 2026.1101.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/billing/BillingAdminRoutes.d.ts +6 -0
- package/dist/billing/BillingAdminRoutes.d.ts.map +1 -0
- package/dist/billing/BillingRoot.d.ts +36 -0
- package/dist/billing/BillingRoot.d.ts.map +1 -0
- package/dist/billing/BillingUserRoutes.d.ts +7 -0
- package/dist/billing/BillingUserRoutes.d.ts.map +1 -0
- package/dist/billing/hooks/useBillingAccountSelection.d.ts +36 -0
- package/dist/billing/hooks/useBillingAccountSelection.d.ts.map +1 -0
- package/dist/billing/hooks/useBillingEventEmitter.d.ts +7 -0
- package/dist/billing/hooks/useBillingEventEmitter.d.ts.map +1 -0
- package/dist/billing/hooks/useBillingNavigate.d.ts +30 -0
- package/dist/billing/hooks/useBillingNavigate.d.ts.map +1 -0
- package/dist/billing/hooks/useBillingPermissions.d.ts +106 -0
- package/dist/billing/hooks/useBillingPermissions.d.ts.map +1 -0
- package/dist/billing/hooks/useDefaultBillingCurrency.d.ts +14 -0
- package/dist/billing/hooks/useDefaultBillingCurrency.d.ts.map +1 -0
- package/dist/billing/hooks/useProducts.d.ts +18 -0
- package/dist/billing/hooks/useProducts.d.ts.map +1 -0
- package/dist/billing/index.d.ts +31 -0
- package/dist/billing/index.d.ts.map +1 -0
- package/dist/billing/lib/native-purchases.d.ts +10 -0
- package/dist/billing/lib/native-purchases.d.ts.map +1 -0
- package/dist/billing/modules/addons/components/FloatingCartDrawer.d.ts +3 -0
- package/dist/billing/modules/addons/components/FloatingCartDrawer.d.ts.map +1 -0
- package/dist/billing/modules/addons/hooks/index.d.ts +8 -0
- package/dist/billing/modules/addons/hooks/index.d.ts.map +1 -0
- package/dist/billing/modules/addons/hooks/useAddonPurchaseEligibility.d.ts +23 -0
- package/dist/billing/modules/addons/hooks/useAddonPurchaseEligibility.d.ts.map +1 -0
- package/dist/billing/modules/addons/hooks/useAddons.d.ts +54 -0
- package/dist/billing/modules/addons/hooks/useAddons.d.ts.map +1 -0
- package/dist/billing/modules/addons/index.d.ts +7 -0
- package/dist/billing/modules/addons/index.d.ts.map +1 -0
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.d.ts +3 -0
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.d.ts.map +1 -0
- package/dist/billing/modules/addons/pages/AddonCreatePage.d.ts +3 -0
- package/dist/billing/modules/addons/pages/AddonCreatePage.d.ts.map +1 -0
- package/dist/billing/modules/addons/pages/AddonDetailPage.d.ts +3 -0
- package/dist/billing/modules/addons/pages/AddonDetailPage.d.ts.map +1 -0
- package/dist/billing/modules/addons/pages/AddonEditPage.d.ts +3 -0
- package/dist/billing/modules/addons/pages/AddonEditPage.d.ts.map +1 -0
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.d.ts +3 -0
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.d.ts.map +1 -0
- package/dist/billing/modules/addons/pages/AddonsListPage.d.ts +3 -0
- package/dist/billing/modules/addons/pages/AddonsListPage.d.ts.map +1 -0
- package/dist/billing/modules/addons/pages/index.d.ts +11 -0
- package/dist/billing/modules/addons/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/addons/store/addonCartStore.d.ts +37 -0
- package/dist/billing/modules/addons/store/addonCartStore.d.ts.map +1 -0
- package/dist/billing/modules/affiliate/api.d.ts +101 -0
- package/dist/billing/modules/affiliate/api.d.ts.map +1 -0
- package/dist/billing/modules/affiliate/index.d.ts +2 -0
- package/dist/billing/modules/affiliate/index.d.ts.map +1 -0
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.d.ts +3 -0
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.d.ts.map +1 -0
- package/dist/billing/modules/analytics/index.d.ts +5 -0
- package/dist/billing/modules/analytics/index.d.ts.map +1 -0
- package/dist/billing/modules/analytics/pages/AnalyticsPage.d.ts +3 -0
- package/dist/billing/modules/analytics/pages/AnalyticsPage.d.ts.map +1 -0
- package/dist/billing/modules/analytics/pages/index.d.ts +5 -0
- package/dist/billing/modules/analytics/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/billing/hooks/index.d.ts +12 -0
- package/dist/billing/modules/billing/hooks/index.d.ts.map +1 -0
- package/dist/billing/modules/billing/hooks/useInvoices.d.ts +76 -0
- package/dist/billing/modules/billing/hooks/useInvoices.d.ts.map +1 -0
- package/dist/billing/modules/billing/hooks/useOrderCallbacks.d.ts +57 -0
- package/dist/billing/modules/billing/hooks/useOrderCallbacks.d.ts.map +1 -0
- package/dist/billing/modules/billing/hooks/usePayments.d.ts +61 -0
- package/dist/billing/modules/billing/hooks/usePayments.d.ts.map +1 -0
- package/dist/billing/modules/billing/hooks/useRefunds.d.ts +216 -0
- package/dist/billing/modules/billing/hooks/useRefunds.d.ts.map +1 -0
- package/dist/billing/modules/billing/hooks/useTransactions.d.ts +40 -0
- package/dist/billing/modules/billing/hooks/useTransactions.d.ts.map +1 -0
- package/dist/billing/modules/billing/index.d.ts +7 -0
- package/dist/billing/modules/billing/index.d.ts.map +1 -0
- package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.d.ts +3 -0
- package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.d.ts.map +1 -0
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.d.ts +3 -0
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.d.ts.map +1 -0
- package/dist/billing/modules/billing/pages/InvoicesListPage.d.ts +3 -0
- package/dist/billing/modules/billing/pages/InvoicesListPage.d.ts.map +1 -0
- package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.d.ts +3 -0
- package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.d.ts.map +1 -0
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.d.ts +3 -0
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.d.ts.map +1 -0
- package/dist/billing/modules/billing/pages/RefundIssueLogsPage.d.ts +3 -0
- package/dist/billing/modules/billing/pages/RefundIssueLogsPage.d.ts.map +1 -0
- package/dist/billing/modules/billing/pages/RefundsPage.d.ts +3 -0
- package/dist/billing/modules/billing/pages/RefundsPage.d.ts.map +1 -0
- package/dist/billing/modules/billing/pages/TransactionsPage.d.ts +3 -0
- package/dist/billing/modules/billing/pages/TransactionsPage.d.ts.map +1 -0
- package/dist/billing/modules/billing/pages/UserRefundsPage.d.ts +3 -0
- package/dist/billing/modules/billing/pages/UserRefundsPage.d.ts.map +1 -0
- package/dist/billing/modules/billing/pages/index.d.ts +14 -0
- package/dist/billing/modules/billing/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/AutoPayToggle.d.ts +13 -0
- package/dist/billing/modules/checkout/components/AutoPayToggle.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/BillingAccountSelector.d.ts +13 -0
- package/dist/billing/modules/checkout/components/BillingAccountSelector.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/CompactAutoPayToggle.d.ts +13 -0
- package/dist/billing/modules/checkout/components/CompactAutoPayToggle.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.d.ts +23 -0
- package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/CreditsAmountInput.d.ts +13 -0
- package/dist/billing/modules/checkout/components/CreditsAmountInput.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/CreditsPaymentOption.d.ts +15 -0
- package/dist/billing/modules/checkout/components/CreditsPaymentOption.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/CurrencySelector.d.ts +18 -0
- package/dist/billing/modules/checkout/components/CurrencySelector.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/NativeCheckoutView.d.ts +13 -0
- package/dist/billing/modules/checkout/components/NativeCheckoutView.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/OrderSummary.d.ts +36 -0
- package/dist/billing/modules/checkout/components/OrderSummary.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/PaymentProviderSelector.d.ts +18 -0
- package/dist/billing/modules/checkout/components/PaymentProviderSelector.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/PromoCodeInput.d.ts +18 -0
- package/dist/billing/modules/checkout/components/PromoCodeInput.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/RazorpayPaymentButton.d.ts +34 -0
- package/dist/billing/modules/checkout/components/RazorpayPaymentButton.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/SavedCardSelector.d.ts +12 -0
- package/dist/billing/modules/checkout/components/SavedCardSelector.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.d.ts +12 -0
- package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/StoreShippingSection.d.ts +17 -0
- package/dist/billing/modules/checkout/components/StoreShippingSection.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/StripePaymentForm.d.ts +15 -0
- package/dist/billing/modules/checkout/components/StripePaymentForm.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/SubscriptionSelector.d.ts +25 -0
- package/dist/billing/modules/checkout/components/SubscriptionSelector.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.d.ts +28 -0
- package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/WebCheckoutRedirectView.d.ts +11 -0
- package/dist/billing/modules/checkout/components/WebCheckoutRedirectView.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.d.ts +30 -0
- package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/index.d.ts +24 -0
- package/dist/billing/modules/checkout/components/index.d.ts.map +1 -0
- package/dist/billing/modules/checkout/hooks/index.d.ts +9 -0
- package/dist/billing/modules/checkout/hooks/index.d.ts.map +1 -0
- package/dist/billing/modules/checkout/hooks/useCheckout.d.ts +78 -0
- package/dist/billing/modules/checkout/hooks/useCheckout.d.ts.map +1 -0
- package/dist/billing/modules/checkout/hooks/useNativeCheckout.d.ts +25 -0
- package/dist/billing/modules/checkout/hooks/useNativeCheckout.d.ts.map +1 -0
- package/dist/billing/modules/checkout/hooks/usePaymentProviders.d.ts +19 -0
- package/dist/billing/modules/checkout/hooks/usePaymentProviders.d.ts.map +1 -0
- package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.d.ts +59 -0
- package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.d.ts.map +1 -0
- package/dist/billing/modules/checkout/hooks/useStoreShipping.d.ts +122 -0
- package/dist/billing/modules/checkout/hooks/useStoreShipping.d.ts.map +1 -0
- package/dist/billing/modules/checkout/index.d.ts +24 -0
- package/dist/billing/modules/checkout/index.d.ts.map +1 -0
- package/dist/billing/modules/checkout/pages/CheckoutPage.d.ts +3 -0
- package/dist/billing/modules/checkout/pages/CheckoutPage.d.ts.map +1 -0
- package/dist/billing/modules/checkout/pages/index.d.ts +5 -0
- package/dist/billing/modules/checkout/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/checkout/types/index.d.ts +279 -0
- package/dist/billing/modules/checkout/types/index.d.ts.map +1 -0
- package/dist/billing/modules/checkout/utils/storeOrder.d.ts +19 -0
- package/dist/billing/modules/checkout/utils/storeOrder.d.ts.map +1 -0
- package/dist/billing/modules/coupons/index.d.ts +5 -0
- package/dist/billing/modules/coupons/index.d.ts.map +1 -0
- package/dist/billing/modules/coupons/pages/CouponDetailPage.d.ts +3 -0
- package/dist/billing/modules/coupons/pages/CouponDetailPage.d.ts.map +1 -0
- package/dist/billing/modules/coupons/pages/CouponsListPage.d.ts +3 -0
- package/dist/billing/modules/coupons/pages/CouponsListPage.d.ts.map +1 -0
- package/dist/billing/modules/coupons/pages/CreateCouponPage.d.ts +3 -0
- package/dist/billing/modules/coupons/pages/CreateCouponPage.d.ts.map +1 -0
- package/dist/billing/modules/coupons/pages/EditCouponPage.d.ts +3 -0
- package/dist/billing/modules/coupons/pages/EditCouponPage.d.ts.map +1 -0
- package/dist/billing/modules/coupons/pages/index.d.ts +8 -0
- package/dist/billing/modules/coupons/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/credits/hooks/index.d.ts +5 -0
- package/dist/billing/modules/credits/hooks/index.d.ts.map +1 -0
- package/dist/billing/modules/credits/hooks/useCredits.d.ts +74 -0
- package/dist/billing/modules/credits/hooks/useCredits.d.ts.map +1 -0
- package/dist/billing/modules/credits/index.d.ts +6 -0
- package/dist/billing/modules/credits/index.d.ts.map +1 -0
- package/dist/billing/modules/credits/pages/AdminCreditsPage.d.ts +3 -0
- package/dist/billing/modules/credits/pages/AdminCreditsPage.d.ts.map +1 -0
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.d.ts +3 -0
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.d.ts.map +1 -0
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.d.ts +3 -0
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.d.ts.map +1 -0
- package/dist/billing/modules/credits/pages/CreditsPage.d.ts +3 -0
- package/dist/billing/modules/credits/pages/CreditsPage.d.ts.map +1 -0
- package/dist/billing/modules/credits/pages/index.d.ts +8 -0
- package/dist/billing/modules/credits/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.d.ts +15 -0
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.d.ts +71 -0
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/components/BillingAccountCard.d.ts +17 -0
- package/dist/billing/modules/dashboard/components/BillingAccountCard.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.d.ts +12 -0
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.d.ts +16 -0
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.d.ts +28 -0
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/components/index.d.ts +10 -0
- package/dist/billing/modules/dashboard/components/index.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/hooks/index.d.ts +6 -0
- package/dist/billing/modules/dashboard/hooks/index.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.d.ts +16 -0
- package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/hooks/useDashboard.d.ts +144 -0
- package/dist/billing/modules/dashboard/hooks/useDashboard.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/index.d.ts +8 -0
- package/dist/billing/modules/dashboard/index.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/pages/OverviewPage.d.ts +3 -0
- package/dist/billing/modules/dashboard/pages/OverviewPage.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/pages/index.d.ts +5 -0
- package/dist/billing/modules/dashboard/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/discounts/index.d.ts +6 -0
- package/dist/billing/modules/discounts/index.d.ts.map +1 -0
- package/dist/billing/modules/discounts/pages/DiscountsListPage.d.ts +3 -0
- package/dist/billing/modules/discounts/pages/DiscountsListPage.d.ts.map +1 -0
- package/dist/billing/modules/discounts/pages/index.d.ts +6 -0
- package/dist/billing/modules/discounts/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/earnings/api.d.ts +226 -0
- package/dist/billing/modules/earnings/api.d.ts.map +1 -0
- package/dist/billing/modules/earnings/index.d.ts +6 -0
- package/dist/billing/modules/earnings/index.d.ts.map +1 -0
- package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.d.ts +3 -0
- package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.d.ts.map +1 -0
- package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.d.ts +3 -0
- package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.d.ts.map +1 -0
- package/dist/billing/modules/earnings/pages/EarningsPage.d.ts +3 -0
- package/dist/billing/modules/earnings/pages/EarningsPage.d.ts.map +1 -0
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.d.ts +3 -0
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.d.ts.map +1 -0
- package/dist/billing/modules/earnings/pages/PayoutsPage.d.ts +3 -0
- package/dist/billing/modules/earnings/pages/PayoutsPage.d.ts.map +1 -0
- package/dist/billing/modules/plans/constants/enterprise.d.ts +20 -0
- package/dist/billing/modules/plans/constants/enterprise.d.ts.map +1 -0
- package/dist/billing/modules/plans/constants/featuredQuotas.d.ts +10 -0
- package/dist/billing/modules/plans/constants/featuredQuotas.d.ts.map +1 -0
- package/dist/billing/modules/plans/hooks/index.d.ts +7 -0
- package/dist/billing/modules/plans/hooks/index.d.ts.map +1 -0
- package/dist/billing/modules/plans/hooks/usePlans.d.ts +45 -0
- package/dist/billing/modules/plans/hooks/usePlans.d.ts.map +1 -0
- package/dist/billing/modules/plans/hooks/useQuotas.d.ts +26 -0
- package/dist/billing/modules/plans/hooks/useQuotas.d.ts.map +1 -0
- package/dist/billing/modules/plans/index.d.ts +7 -0
- package/dist/billing/modules/plans/index.d.ts.map +1 -0
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.d.ts +3 -0
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.d.ts.map +1 -0
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.d.ts +3 -0
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.d.ts.map +1 -0
- package/dist/billing/modules/plans/pages/PlanCreatePage.d.ts +3 -0
- package/dist/billing/modules/plans/pages/PlanCreatePage.d.ts.map +1 -0
- package/dist/billing/modules/plans/pages/PlanDetailPage.d.ts +3 -0
- package/dist/billing/modules/plans/pages/PlanDetailPage.d.ts.map +1 -0
- package/dist/billing/modules/plans/pages/PlanEditPage.d.ts +3 -0
- package/dist/billing/modules/plans/pages/PlanEditPage.d.ts.map +1 -0
- package/dist/billing/modules/plans/pages/PlansBrowsePage.d.ts +3 -0
- package/dist/billing/modules/plans/pages/PlansBrowsePage.d.ts.map +1 -0
- package/dist/billing/modules/plans/pages/PlansListPage.d.ts +3 -0
- package/dist/billing/modules/plans/pages/PlansListPage.d.ts.map +1 -0
- package/dist/billing/modules/plans/pages/index.d.ts +12 -0
- package/dist/billing/modules/plans/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/plans/utils/currencyPriceOverrides.d.ts +3 -0
- package/dist/billing/modules/plans/utils/currencyPriceOverrides.d.ts.map +1 -0
- package/dist/billing/modules/plans/utils/planSelector.d.ts +3 -0
- package/dist/billing/modules/plans/utils/planSelector.d.ts.map +1 -0
- package/dist/billing/modules/promotions/index.d.ts +2 -0
- package/dist/billing/modules/promotions/index.d.ts.map +1 -0
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.d.ts +3 -0
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.d.ts.map +1 -0
- package/dist/billing/modules/promotions/pages/PromotionsListPage.d.ts +3 -0
- package/dist/billing/modules/promotions/pages/PromotionsListPage.d.ts.map +1 -0
- package/dist/billing/modules/promotions/pages/index.d.ts +3 -0
- package/dist/billing/modules/promotions/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/quota/hooks/index.d.ts +6 -0
- package/dist/billing/modules/quota/hooks/index.d.ts.map +1 -0
- package/dist/billing/modules/quota/hooks/useQuota.d.ts +132 -0
- package/dist/billing/modules/quota/hooks/useQuota.d.ts.map +1 -0
- package/dist/billing/modules/quota/hooks/useQuotaTemplates.d.ts +38 -0
- package/dist/billing/modules/quota/hooks/useQuotaTemplates.d.ts.map +1 -0
- package/dist/billing/modules/quota/index.d.ts +6 -0
- package/dist/billing/modules/quota/index.d.ts.map +1 -0
- package/dist/billing/modules/quota/pages/QuotaAssignFreePage.d.ts +3 -0
- package/dist/billing/modules/quota/pages/QuotaAssignFreePage.d.ts.map +1 -0
- package/dist/billing/modules/quota/pages/QuotaPage.d.ts +3 -0
- package/dist/billing/modules/quota/pages/QuotaPage.d.ts.map +1 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.d.ts +3 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.d.ts.map +1 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.d.ts +3 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.d.ts.map +1 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.d.ts +3 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.d.ts.map +1 -0
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.d.ts +3 -0
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.d.ts.map +1 -0
- package/dist/billing/modules/quota/pages/index.d.ts +10 -0
- package/dist/billing/modules/quota/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/quota/utils/quotaSelector.d.ts +4 -0
- package/dist/billing/modules/quota/utils/quotaSelector.d.ts.map +1 -0
- package/dist/billing/modules/settings/index.d.ts +5 -0
- package/dist/billing/modules/settings/index.d.ts.map +1 -0
- package/dist/billing/modules/settings/pages/SettingsPage.d.ts +3 -0
- package/dist/billing/modules/settings/pages/SettingsPage.d.ts.map +1 -0
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.d.ts +3 -0
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.d.ts.map +1 -0
- package/dist/billing/modules/settings/pages/index.d.ts +6 -0
- package/dist/billing/modules/settings/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/store/graphql/index.d.ts +6 -0
- package/dist/billing/modules/store/graphql/index.d.ts.map +1 -0
- package/dist/billing/modules/store/index.d.ts +6 -0
- package/dist/billing/modules/store/index.d.ts.map +1 -0
- package/dist/billing/modules/store/pages/StoreCheckoutPage.d.ts +10 -0
- package/dist/billing/modules/store/pages/StoreCheckoutPage.d.ts.map +1 -0
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.d.ts +11 -0
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.d.ts.map +1 -0
- package/dist/billing/modules/subscriptions/hooks/index.d.ts +6 -0
- package/dist/billing/modules/subscriptions/hooks/index.d.ts.map +1 -0
- package/dist/billing/modules/subscriptions/hooks/useSubscriptions.d.ts +91 -0
- package/dist/billing/modules/subscriptions/hooks/useSubscriptions.d.ts.map +1 -0
- package/dist/billing/modules/subscriptions/index.d.ts +7 -0
- package/dist/billing/modules/subscriptions/index.d.ts.map +1 -0
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.d.ts +3 -0
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.d.ts.map +1 -0
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.d.ts +3 -0
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.d.ts.map +1 -0
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.d.ts +3 -0
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.d.ts.map +1 -0
- package/dist/billing/modules/subscriptions/pages/index.d.ts +8 -0
- package/dist/billing/modules/subscriptions/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.d.ts +7 -0
- package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.d.ts.map +1 -0
- package/dist/billing/modules/usage/hooks/index.d.ts +6 -0
- package/dist/billing/modules/usage/hooks/index.d.ts.map +1 -0
- package/dist/billing/modules/usage/hooks/useUsage.d.ts +316 -0
- package/dist/billing/modules/usage/hooks/useUsage.d.ts.map +1 -0
- package/dist/billing/modules/usage/hooks/useWorkspaceAiSpend.d.ts +13 -0
- package/dist/billing/modules/usage/hooks/useWorkspaceAiSpend.d.ts.map +1 -0
- package/dist/billing/modules/usage/index.d.ts +6 -0
- package/dist/billing/modules/usage/index.d.ts.map +1 -0
- package/dist/billing/modules/usage/pages/UsagePage.d.ts +3 -0
- package/dist/billing/modules/usage/pages/UsagePage.d.ts.map +1 -0
- package/dist/billing/modules/usage/pages/index.d.ts +5 -0
- package/dist/billing/modules/usage/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/usage/utils/aiSpend.d.ts +71 -0
- package/dist/billing/modules/usage/utils/aiSpend.d.ts.map +1 -0
- package/dist/billing/providers/BillingProvider.d.ts +20 -0
- package/dist/billing/providers/BillingProvider.d.ts.map +1 -0
- package/dist/billing/shared/components/AccessDenied.d.ts +7 -0
- package/dist/billing/shared/components/AccessDenied.d.ts.map +1 -0
- package/dist/billing/shared/components/ActorIdentity.d.ts +9 -0
- package/dist/billing/shared/components/ActorIdentity.d.ts.map +1 -0
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.d.ts +10 -0
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.d.ts.map +1 -0
- package/dist/billing/shared/components/EmptyState.d.ts +10 -0
- package/dist/billing/shared/components/EmptyState.d.ts.map +1 -0
- package/dist/billing/shared/components/GeoPricingOverridesEditor.d.ts +10 -0
- package/dist/billing/shared/components/GeoPricingOverridesEditor.d.ts.map +1 -0
- package/dist/billing/shared/components/PageHeader.d.ts +10 -0
- package/dist/billing/shared/components/PageHeader.d.ts.map +1 -0
- package/dist/billing/shared/components/PushPermissionNudge.d.ts +7 -0
- package/dist/billing/shared/components/PushPermissionNudge.d.ts.map +1 -0
- package/dist/billing/shared/components/ServerError.d.ts +10 -0
- package/dist/billing/shared/components/ServerError.d.ts.map +1 -0
- package/dist/billing/shared/components/StatCard.d.ts +14 -0
- package/dist/billing/shared/components/StatCard.d.ts.map +1 -0
- package/dist/billing/shared/components/index.d.ts +13 -0
- package/dist/billing/shared/components/index.d.ts.map +1 -0
- package/dist/billing/shared/hooks/index.d.ts +4 -0
- package/dist/billing/shared/hooks/index.d.ts.map +1 -0
- package/dist/billing/shared/hooks/useActorProfiles.d.ts +17 -0
- package/dist/billing/shared/hooks/useActorProfiles.d.ts.map +1 -0
- package/dist/billing/shared/hooks/useTr.d.ts +17 -0
- package/dist/billing/shared/hooks/useTr.d.ts.map +1 -0
- package/dist/billing/shared/index.d.ts +9 -0
- package/dist/billing/shared/index.d.ts.map +1 -0
- package/dist/billing/shared/types/graphql.d.ts +946 -0
- package/dist/billing/shared/types/graphql.d.ts.map +1 -0
- package/dist/billing/shared/types/index.d.ts +101 -0
- package/dist/billing/shared/types/index.d.ts.map +1 -0
- package/dist/billing/shared/ui/Card.d.ts +17 -0
- package/dist/billing/shared/ui/Card.d.ts.map +1 -0
- package/dist/billing/shared/ui/MetricCard.d.ts +20 -0
- package/dist/billing/shared/ui/MetricCard.d.ts.map +1 -0
- package/dist/billing/shared/ui/ProgressBar.d.ts +15 -0
- package/dist/billing/shared/ui/ProgressBar.d.ts.map +1 -0
- package/dist/billing/shared/ui/SectionHeader.d.ts +15 -0
- package/dist/billing/shared/ui/SectionHeader.d.ts.map +1 -0
- package/dist/billing/shared/ui/StatusPill.d.ts +14 -0
- package/dist/billing/shared/ui/StatusPill.d.ts.map +1 -0
- package/dist/billing/shared/ui/index.d.ts +13 -0
- package/dist/billing/shared/ui/index.d.ts.map +1 -0
- package/dist/billing/shared/utils/directActivityGraphql.d.ts +12 -0
- package/dist/billing/shared/utils/directActivityGraphql.d.ts.map +1 -0
- package/dist/billing/shared/utils/directBillingGraphql.d.ts +12 -0
- package/dist/billing/shared/utils/directBillingGraphql.d.ts.map +1 -0
- package/dist/billing/shared/utils/error.d.ts +30 -0
- package/dist/billing/shared/utils/error.d.ts.map +1 -0
- package/dist/billing/shared/utils/format.d.ts +33 -0
- package/dist/billing/shared/utils/format.d.ts.map +1 -0
- package/dist/billing/shared/utils/gatewayGraphql.d.ts +14 -0
- package/dist/billing/shared/utils/gatewayGraphql.d.ts.map +1 -0
- package/dist/billing/shared/utils/index.d.ts +14 -0
- package/dist/billing/shared/utils/index.d.ts.map +1 -0
- package/dist/billing/shared/utils/navigation.d.ts +2 -0
- package/dist/billing/shared/utils/navigation.d.ts.map +1 -0
- package/dist/billing/shared/utils/paymentTheme.d.ts +18 -0
- package/dist/billing/shared/utils/paymentTheme.d.ts.map +1 -0
- package/dist/billing/shared/utils/planFeatureQuantity.d.ts +40 -0
- package/dist/billing/shared/utils/planFeatureQuantity.d.ts.map +1 -0
- package/dist/billing/shared/utils/status.d.ts +27 -0
- package/dist/billing/shared/utils/status.d.ts.map +1 -0
- package/dist/billing/shared/utils/tokens.d.ts +156 -0
- package/dist/billing/shared/utils/tokens.d.ts.map +1 -0
- package/dist/billing/translations/en.d.ts +534 -0
- package/dist/billing/translations/en.d.ts.map +1 -0
- package/dist/billing/types/index.d.ts +275 -0
- package/dist/billing/types/index.d.ts.map +1 -0
- package/dist/dev/main.d.ts +1 -0
- package/dist/dev/main.d.ts.map +1 -0
- package/dist/generated/global-operations.d.ts +10856 -0
- package/dist/generated/global-operations.d.ts.map +1 -0
- package/dist/generated/global-types.d.ts +26958 -0
- package/dist/generated/global-types.d.ts.map +1 -0
- package/dist/generated/wspace-operations.d.ts +261 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -0
- package/dist/generated/wspace-types.d.ts +49193 -0
- package/dist/generated/wspace-types.d.ts.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/utils/nativeBridge.d.ts +3 -0
- package/dist/utils/nativeBridge.d.ts.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BillingAdminRoutes.d.ts","sourceRoot":"","sources":["../../src/billing/BillingAdminRoutes.tsx"],"names":[],"mappings":"AAmNA;;;GAGG;AACH,wBAAgB,kBAAkB,gCAycjC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { BillingRootProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Root component for the Billing microfrontend.
|
|
5
|
+
*
|
|
6
|
+
* This is the main entry point that host applications import and render.
|
|
7
|
+
* It sets up the necessary providers and renders the internal routing.
|
|
8
|
+
* Automatically registers navigation items with the shell if registration functions are provided.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* import { BillingRoot, type BillingRootProps } from '@burdenoff/microfe-billing';
|
|
13
|
+
*
|
|
14
|
+
* function App() {
|
|
15
|
+
* const props: BillingRootProps = {
|
|
16
|
+
* basePath: '/billing',
|
|
17
|
+
* navigate: (path) => router.push(path),
|
|
18
|
+
* currentUser: { id: '1', email: 'user@example.com', firstName: 'John', lastName: 'Doe' },
|
|
19
|
+
* workspaceId: 'ws-123',
|
|
20
|
+
* orgId: 'org-123',
|
|
21
|
+
* apiGatewayUrl: 'https://api.example.com/tenant/graphql',
|
|
22
|
+
* authToken: 'token',
|
|
23
|
+
* stripePublishableKey: 'pk_test_...',
|
|
24
|
+
* razorpayKey: 'rzp_test_...',
|
|
25
|
+
* onSubscriptionCreate: (subscription) => console.log('Subscription created:', subscription),
|
|
26
|
+
* onSubscriptionUpdate: (subscription) => console.log('Subscription updated:', subscription),
|
|
27
|
+
* onPaymentProcess: (payment) => console.log('Payment processed:', payment),
|
|
28
|
+
* registerNavItems: (items) => { return () => {}; },
|
|
29
|
+
* };
|
|
30
|
+
*
|
|
31
|
+
* return <BillingRoot {...props} />;
|
|
32
|
+
* }
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare const BillingRoot: FC<BillingRootProps>;
|
|
36
|
+
//# sourceMappingURL=BillingRoot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BillingRoot.d.ts","sourceRoot":"","sources":["../../src/billing/BillingRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAsBhC,OAAO,KAAK,EAAW,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAKzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAuN5C,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* User-facing billing routes.
|
|
3
|
+
* Includes overview, subscriptions, plan/addon browsing (read-only),
|
|
4
|
+
* invoices, payments, credits, quota usage, checkout, and settings.
|
|
5
|
+
*/
|
|
6
|
+
export declare function BillingUserRoutes(): import("react").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=BillingUserRoutes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BillingUserRoutes.d.ts","sourceRoot":"","sources":["../../src/billing/BillingUserRoutes.tsx"],"names":[],"mappings":"AAyLA;;;;GAIG;AACH,wBAAgB,iBAAiB,gCAyehC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook for managing billing account selection per org
|
|
3
|
+
* Persists the selected account to localStorage and syncs across pages.
|
|
4
|
+
* Keys are scoped by profile and org to support multi-user/multi-org usage.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Get stored account ID (handles finding active profile)
|
|
8
|
+
*/
|
|
9
|
+
export declare const getStoredBillingAccountId: (orgId: string) => string | null;
|
|
10
|
+
/**
|
|
11
|
+
* Set stored account ID
|
|
12
|
+
*/
|
|
13
|
+
export declare const setStoredBillingAccountId: (orgId: string, accountId: string | null) => void;
|
|
14
|
+
interface UseBillingAccountSelectionOptions {
|
|
15
|
+
orgId: string;
|
|
16
|
+
/** Available billing accounts to validate against */
|
|
17
|
+
billingAccounts?: Array<{
|
|
18
|
+
id: string;
|
|
19
|
+
isDefault?: boolean;
|
|
20
|
+
}>;
|
|
21
|
+
/** Whether to sync from URL query param on navigation */
|
|
22
|
+
syncFromUrl?: boolean;
|
|
23
|
+
/** URL query param name (default: 'billingAccountId') */
|
|
24
|
+
urlParamName?: string;
|
|
25
|
+
}
|
|
26
|
+
interface UseBillingAccountSelectionResult {
|
|
27
|
+
/** Currently selected billing account ID */
|
|
28
|
+
selectedAccountId: string | null;
|
|
29
|
+
/** Set the selected billing account (persists to localStorage) */
|
|
30
|
+
setSelectedAccountId: (accountId: string | null) => void;
|
|
31
|
+
/** Clear the stored selection */
|
|
32
|
+
clearSelection: () => void;
|
|
33
|
+
}
|
|
34
|
+
export declare function useBillingAccountSelection({ orgId, billingAccounts, syncFromUrl, urlParamName, }: UseBillingAccountSelectionOptions): UseBillingAccountSelectionResult;
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=useBillingAccountSelection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBillingAccountSelection.d.ts","sourceRoot":"","sources":["../../../src/billing/hooks/useBillingAccountSelection.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAuBH;;GAEG;AACH,eAAO,MAAM,yBAAyB,GAAI,OAAO,MAAM,KAAG,MAAM,GAAG,IAQlE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,GAAI,OAAO,MAAM,EAAE,WAAW,MAAM,GAAG,IAAI,SAYhF,CAAC;AAEF,UAAU,iCAAiC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,eAAe,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAC7D,yDAAyD;IACzD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,gCAAgC;IACxC,4CAA4C;IAC5C,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,kEAAkE;IAClE,oBAAoB,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzD,iCAAiC;IACjC,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,wBAAgB,0BAA0B,CAAC,EACzC,KAAK,EACL,eAAe,EACf,WAAmB,EACnB,YAAiC,GAClC,EAAE,iCAAiC,GAAG,gCAAgC,CA8EtE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BillingLifecyclePayload } from '@burdenoff/fe-libs/shared/events';
|
|
2
|
+
export type BillingDomainEvent = 'billing.billing_account.viewed' | 'billing.billing_account.created' | 'billing.billing_account.updated' | 'billing.billing_account.archived' | 'billing.subscription.viewed' | 'billing.subscription.cancelled' | 'billing.plan.viewed' | 'billing.addon.viewed' | 'billing.checkout.viewed' | 'billing.checkout.initiated' | 'billing.checkout.failed' | 'billing.payment.succeeded' | 'billing.payment.failed' | 'billing.invoice.viewed' | 'billing.payment_method.viewed' | 'billing.payment_method.added' | 'billing.payment_method.default_set' | 'billing.payment_method.deleted' | 'billing.credit.viewed' | 'billing.credits.spent' | 'billing.credits.granted' | 'billing.credits.withdrawal_requested' | 'billing.quota.viewed' | 'billing.usage.viewed' | 'billing.transaction.viewed' | 'billing.affiliate.viewed' | 'billing.affiliate_code.created' | 'billing.affiliate_code.updated' | 'billing.affiliate_code.deactivated' | 'billing.affiliate_code.note_added' | 'billing.earning.viewed' | 'billing.payout.viewed' | 'billing.payout_account.added' | 'billing.payout_account.updated' | 'billing.payout_account.archived' | 'billing.payout.requested' | 'billing.payout.approved' | 'billing.payout.rejected' | 'billing.payout.processed';
|
|
3
|
+
export type BillingEventPayload = BillingLifecyclePayload;
|
|
4
|
+
export declare function useBillingEventEmitter(): {
|
|
5
|
+
emit: (event: BillingDomainEvent, payload?: BillingEventPayload) => void;
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=useBillingEventEmitter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBillingEventEmitter.d.ts","sourceRoot":"","sources":["../../../src/billing/hooks/useBillingEventEmitter.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,KAAK,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE7F,MAAM,MAAM,kBAAkB,GAC1B,gCAAgC,GAChC,iCAAiC,GACjC,iCAAiC,GACjC,kCAAkC,GAClC,6BAA6B,GAC7B,gCAAgC,GAChC,qBAAqB,GACrB,sBAAsB,GACtB,yBAAyB,GACzB,4BAA4B,GAC5B,yBAAyB,GACzB,2BAA2B,GAC3B,wBAAwB,GACxB,wBAAwB,GACxB,+BAA+B,GAC/B,8BAA8B,GAC9B,oCAAoC,GACpC,gCAAgC,GAChC,uBAAuB,GACvB,uBAAuB,GACvB,yBAAyB,GACzB,sCAAsC,GACtC,sBAAsB,GACtB,sBAAsB,GACtB,4BAA4B,GAC5B,0BAA0B,GAC1B,gCAAgC,GAChC,gCAAgC,GAChC,oCAAoC,GACpC,mCAAmC,GACnC,wBAAwB,GACxB,uBAAuB,GACvB,8BAA8B,GAC9B,gCAAgC,GAChC,iCAAiC,GACjC,0BAA0B,GAC1B,yBAAyB,GACzB,yBAAyB,GACzB,0BAA0B,CAAC;AAE/B,MAAM,MAAM,mBAAmB,GAAG,uBAAuB,CAAC;AAE1D,wBAAgB,sBAAsB,IAAI;IACxC,IAAI,EAAE,CAAC,KAAK,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,mBAAmB,KAAK,IAAI,CAAC;CAC1E,CAeA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom navigation hook for the Billing microfrontend.
|
|
3
|
+
* Properly handles basePath when navigating within billing routes.
|
|
4
|
+
*/
|
|
5
|
+
export interface NavigateOptions {
|
|
6
|
+
replace?: boolean;
|
|
7
|
+
state?: unknown;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Hook that returns a navigation function that properly prepends the basePath.
|
|
11
|
+
* This ensures all navigation within the billing microfrontend works correctly
|
|
12
|
+
* when integrated into a shell application with a basePath (e.g., '/billing').
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* const navigateTo = useBillingNavigate();
|
|
17
|
+
*
|
|
18
|
+
* // Navigate to checkout
|
|
19
|
+
* navigateTo('/checkout/credits');
|
|
20
|
+
* // When basePath is '/billing', this navigates to '/billing/checkout/credits'
|
|
21
|
+
*
|
|
22
|
+
* // Navigate with state
|
|
23
|
+
* navigateTo('/checkout/plan-123', { state: { fromUpgrade: true } });
|
|
24
|
+
*
|
|
25
|
+
* // Navigate back in history
|
|
26
|
+
* navigateTo(-1);
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare function useBillingNavigate(): (pathOrDelta: string | number, options?: NavigateOptions) => void;
|
|
30
|
+
//# sourceMappingURL=useBillingNavigate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBillingNavigate.d.ts","sourceRoot":"","sources":["../../../src/billing/hooks/useBillingNavigate.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,kBAKhB,MAAM,GAAG,MAAM,YAAY,eAAe,UAoC3D"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook for billing-specific RBAC permissions.
|
|
3
|
+
*
|
|
4
|
+
* Permission model aligns with the `@rbac` directives on global-billing-svc:
|
|
5
|
+
* resource: "billing"
|
|
6
|
+
* actions: "read" – view billing data
|
|
7
|
+
* "create" – create billing accounts, initiate payments
|
|
8
|
+
* "update" – modify billing accounts, payment methods, usage
|
|
9
|
+
* "delete" – remove payment methods, cancel subscriptions
|
|
10
|
+
* "manage" – admin-only (plans, addons, quotas, discounts, refunds, tax rates)
|
|
11
|
+
*
|
|
12
|
+
* The RBAC service resolves these via `billingAccount.*` permission strings:
|
|
13
|
+
* billingAccount.read → action: "read"
|
|
14
|
+
* billingAccount.create → action: "create"
|
|
15
|
+
* billingAccount.update → action: "update"
|
|
16
|
+
* billingAccount.delete → action: "delete"
|
|
17
|
+
* billingAccount.all → action: "manage" (admin bypass)
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
export interface UseBillingPermissionsOptions {
|
|
21
|
+
/**
|
|
22
|
+
* Caller-resolved billing account ID. When provided, this overrides the
|
|
23
|
+
* hook's internal `useBillingAccountSelection` resolution. Use this when
|
|
24
|
+
* the calling page already resolves a billing account (e.g. via the
|
|
25
|
+
* `useBillingAccounts` + `useBillingAccountSelection` pair) so the
|
|
26
|
+
* billing-scope permission fetch observes the *same* account ID and
|
|
27
|
+
* doesn't lag behind for first-time users whose default account only
|
|
28
|
+
* resolves once the accounts list loads.
|
|
29
|
+
*/
|
|
30
|
+
billingAccountIdOverride?: string | null;
|
|
31
|
+
}
|
|
32
|
+
export declare function useBillingPermissions(options?: UseBillingPermissionsOptions): {
|
|
33
|
+
/** @rbac(action: "read", resource: "billing") */
|
|
34
|
+
canViewBillingAccount: boolean;
|
|
35
|
+
/** @rbac(action: "create", resource: "billing") */
|
|
36
|
+
canCreateBillingAccount: boolean;
|
|
37
|
+
/** @rbac(action: "update", resource: "billing") */
|
|
38
|
+
canManageBillingAccount: boolean;
|
|
39
|
+
/** @rbac(action: "delete", resource: "billing") — archiveBillingAccount */
|
|
40
|
+
canArchiveBillingAccount: boolean;
|
|
41
|
+
/** @rbac(action: "read", resource: "billing") */
|
|
42
|
+
canViewSubscriptions: boolean;
|
|
43
|
+
/** @rbac(action: "create", resource: "billing") — initiatePayment for plans */
|
|
44
|
+
canCreateSubscription: boolean;
|
|
45
|
+
/** @rbac(action: "update", resource: "billing") */
|
|
46
|
+
canUpdateSubscription: boolean;
|
|
47
|
+
/** @rbac(action: "delete", resource: "billing") — cancelSubscription */
|
|
48
|
+
canCancelSubscription: boolean;
|
|
49
|
+
/** @rbac(action: "read", resource: "billing") */
|
|
50
|
+
canViewPlans: boolean;
|
|
51
|
+
/** @rbac(action: "manage", resource: "billing") — createPlan, updatePlan, togglePlan */
|
|
52
|
+
canManagePlans: boolean;
|
|
53
|
+
/** @rbac(action: "read", resource: "billing") */
|
|
54
|
+
canViewAddons: boolean;
|
|
55
|
+
/** @rbac(action: "manage", resource: "billing") — createAddOns, updateAddOnDetails, toggleAddOn */
|
|
56
|
+
canManageAddons: boolean;
|
|
57
|
+
/** @rbac(action: "read", resource: "billing") */
|
|
58
|
+
canViewQuotas: boolean;
|
|
59
|
+
/** @rbac(action: "manage", resource: "billing") — createQuota, updateQuota */
|
|
60
|
+
canManageQuotas: boolean;
|
|
61
|
+
/** @rbac(action: "read", resource: "billing") */
|
|
62
|
+
canViewInvoices: boolean;
|
|
63
|
+
/** @rbac(action: "update", resource: "billing") — payInvoice */
|
|
64
|
+
canPayInvoice: boolean;
|
|
65
|
+
/** @rbac(action: "manage", resource: "billing") — voidInvoice, generateInvoice */
|
|
66
|
+
canVoidInvoice: boolean;
|
|
67
|
+
/** @rbac(action: "read", resource: "billing") */
|
|
68
|
+
canViewPayments: boolean;
|
|
69
|
+
/** @rbac(action: "create", resource: "billing") — initiatePayment */
|
|
70
|
+
canProcessPayment: boolean;
|
|
71
|
+
/** @rbac(action: "read", resource: "billing") */
|
|
72
|
+
canViewPaymentMethods: boolean;
|
|
73
|
+
/** @rbac(action: "update", resource: "billing") — addPaymentMethod, updatePaymentMethod */
|
|
74
|
+
canManagePaymentMethods: boolean;
|
|
75
|
+
/** @rbac(action: "read", resource: "billing") */
|
|
76
|
+
canViewUsage: boolean;
|
|
77
|
+
/** @rbac(action: "update", resource: "billing") — addUsage, freeUpUsage */
|
|
78
|
+
canRecordUsage: boolean;
|
|
79
|
+
/** @rbac(action: "read", resource: "billing") */
|
|
80
|
+
canViewCredits: boolean;
|
|
81
|
+
/** @rbac(action: "update", resource: "billing") — spendCredits */
|
|
82
|
+
canIssueCredit: boolean;
|
|
83
|
+
/** @rbac(action: "update", resource: "billing") — requestCreditWithdrawal */
|
|
84
|
+
canWithdrawCredits: boolean;
|
|
85
|
+
/** @rbac(action: "manage", resource: "billing") — grantCredits */
|
|
86
|
+
canGrantCredits: boolean;
|
|
87
|
+
/** @rbac(action: "update", resource: "billing") — applyBillingDiscount */
|
|
88
|
+
canApplyDiscount: boolean;
|
|
89
|
+
/** @rbac(action: "manage", resource: "billing") — createDiscount, updateDiscount, deleteDiscount */
|
|
90
|
+
canManageDiscounts: boolean;
|
|
91
|
+
/** @rbac(action: "read", resource: "billing") */
|
|
92
|
+
canViewAnalytics: boolean;
|
|
93
|
+
/** @rbac(action: "manage", resource: "billing") — processRefund, skipRefund, retryRefund */
|
|
94
|
+
canProcessRefund: boolean;
|
|
95
|
+
/** @rbac(action: "manage", resource: "billing") */
|
|
96
|
+
canManageRecurringBilling: boolean;
|
|
97
|
+
/** @rbac(action: "manage", resource: "billing") — createEntitlement, updateEntitlement, deleteEntitlement */
|
|
98
|
+
canManageEntitlements: boolean;
|
|
99
|
+
/** @rbac(action: "manage", resource: "billing") — createTaxRate, updateTaxRate, deleteTaxRate */
|
|
100
|
+
canManageTaxRates: boolean;
|
|
101
|
+
/** Full billing admin (billing:manage) */
|
|
102
|
+
isBillingAdmin: boolean;
|
|
103
|
+
/** Whether permissions are still being loaded from RBAC service */
|
|
104
|
+
isLoading: boolean;
|
|
105
|
+
};
|
|
106
|
+
//# sourceMappingURL=useBillingPermissions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBillingPermissions.d.ts","sourceRoot":"","sources":["../../../src/billing/hooks/useBillingPermissions.ts"],"names":[],"mappings":"AA6CA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;;;;;;;OAQG;IACH,wBAAwB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1C;AAED,wBAAgB,qBAAqB,CAAC,OAAO,CAAC,EAAE,4BAA4B;IAyExE,iDAAiD;;IAEjD,mDAAmD;;IAEnD,mDAAmD;;IAEnD,2EAA2E;;IAI3E,iDAAiD;;IAEjD,+EAA+E;;IAE/E,mDAAmD;;IAEnD,wEAAwE;;IAIxE,iDAAiD;;IAEjD,wFAAwF;;IAIxF,iDAAiD;;IAEjD,mGAAmG;;IAInG,iDAAiD;;IAEjD,8EAA8E;;IAI9E,iDAAiD;;IAEjD,gEAAgE;;IAEhE,kFAAkF;;IAIlF,iDAAiD;;IAEjD,qEAAqE;;IAIrE,iDAAiD;;IAEjD,2FAA2F;;IAI3F,iDAAiD;;IAEjD,2EAA2E;;IAI3E,iDAAiD;;IAEjD,kEAAkE;;IAElE,6EAA6E;;IAE7E,kEAAkE;;IAIlE,0EAA0E;;IAE1E,oGAAoG;;IAIpG,iDAAiD;;IAIjD,4FAA4F;;IAI5F,mDAAmD;;IAInD,6GAA6G;;IAI7G,iGAAiG;;IAIjG,0CAA0C;;IAI1C,mEAAmE;;EAGtE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the currency of the user's default billing account (e.g. "INR", "USD").
|
|
3
|
+
* Falls back to "USD" while loading or if no billing account exists.
|
|
4
|
+
*/
|
|
5
|
+
export declare function useDefaultBillingCurrency(): string;
|
|
6
|
+
/**
|
|
7
|
+
* Given a plan/addon's base price + currency and an optional currencyPrices map,
|
|
8
|
+
* returns the best price/currency to display for the given target currency.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getDisplayPrice(basePrice: number, baseCurrency: string, currencyPrices: Record<string, number> | null | undefined, targetCurrency: string): {
|
|
11
|
+
price: number;
|
|
12
|
+
currency: string;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=useDefaultBillingCurrency.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDefaultBillingCurrency.d.ts","sourceRoot":"","sources":["../../../src/billing/hooks/useDefaultBillingCurrency.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,CAGlD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,EACzD,cAAc,EAAE,MAAM,GACrB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAQrC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface ProductOption {
|
|
2
|
+
id: string;
|
|
3
|
+
/**
|
|
4
|
+
* The slug is what actually gets stored as Addon/Plan.productID and what
|
|
5
|
+
* every read path (addon/plan browse filters, quota context) matches
|
|
6
|
+
* against — never the catalog row's `id`, which is a different UUID.
|
|
7
|
+
*/
|
|
8
|
+
slug: string;
|
|
9
|
+
name: string;
|
|
10
|
+
}
|
|
11
|
+
interface UseProductsResult {
|
|
12
|
+
products: ProductOption[];
|
|
13
|
+
isLoading: boolean;
|
|
14
|
+
error: Error | undefined;
|
|
15
|
+
}
|
|
16
|
+
export declare function useProducts(): UseProductsResult;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=useProducts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useProducts.d.ts","sourceRoot":"","sources":["../../../src/billing/hooks/useProducts.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,iBAAiB;IACzB,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;CAC1B;AAED,wBAAgB,WAAW,IAAI,iBAAiB,CAU/C"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Billing Microfrontend
|
|
3
|
+
*
|
|
4
|
+
* Provides a complete billing and subscription management interface
|
|
5
|
+
* for managing subscriptions, payments, invoices, usage tracking, and revenue analytics.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* import { BillingRoot, type BillingRootProps } from '@burdenoff/microfe-billing';
|
|
10
|
+
*
|
|
11
|
+
* function App() {
|
|
12
|
+
* const props: BillingRootProps = {
|
|
13
|
+
* basePath: '/billing',
|
|
14
|
+
* navigate: (path) => router.push(path),
|
|
15
|
+
* currentUser: { id: '1', email: 'user@example.com' },
|
|
16
|
+
* workspaceId: 'ws-123',
|
|
17
|
+
* orgId: 'org-123',
|
|
18
|
+
* apiGatewayUrl: 'https://api.example.com/tenant/graphql',
|
|
19
|
+
* authToken: 'token',
|
|
20
|
+
* stripePublishableKey: 'pk_test_...',
|
|
21
|
+
* razorpayKey: 'rzp_test_...',
|
|
22
|
+
* };
|
|
23
|
+
*
|
|
24
|
+
* return <BillingRoot {...props} />;
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export { BillingRoot } from './BillingRoot';
|
|
29
|
+
export type { BillingRootProps, SubscriptionSummary, PaymentSummary, SubscriptionStatus, InvoiceStatus, PaymentStatus, PaymentMethodType, PaymentGateway, PlanInterval, PricingModel, TransactionType, UsageDimension, UsagePeriod, ViewMode, BillingAccount, Plan, PlanFeature, Subscription, Invoice, InvoiceLineItem, Payment, PaymentMethod, UsageRecord, Transaction, RevenueMetrics, } from './types';
|
|
30
|
+
export { useBilling } from './providers/BillingProvider';
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/billing/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EACV,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,cAAc,EACd,WAAW,EACX,QAAQ,EACR,cAAc,EACd,IAAI,EACJ,WAAW,EACX,YAAY,EACZ,OAAO,EACP,eAAe,EACf,OAAO,EACP,aAAa,EACb,WAAW,EACX,WAAW,EACX,cAAc,GACf,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { getNativeProducts, purchaseNativeProduct, acknowledgeNativePurchase, restoreNativePurchases, getNativePurchases, installNativeIAP, NativeProduct, NativeTransaction, NativePurchaseType } from '@burdenoff/fe-libs/shared/native/purchases';
|
|
2
|
+
/**
|
|
3
|
+
* Capacitor injects its platform global before the shell's custom bridge is
|
|
4
|
+
* installed. Accept both signals so checkout cannot fall back to Razorpay
|
|
5
|
+
* during native boot.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isNativeIAPAvailable(): boolean;
|
|
8
|
+
export { getNativeProducts, purchaseNativeProduct, acknowledgeNativePurchase, restoreNativePurchases, getNativePurchases, installNativeIAP, };
|
|
9
|
+
export type { NativeProduct, NativeTransaction, NativePurchaseType };
|
|
10
|
+
//# sourceMappingURL=native-purchases.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-purchases.d.ts","sourceRoot":"","sources":["../../../src/billing/lib/native-purchases.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAEL,iBAAiB,EACjB,qBAAqB,EACrB,yBAAyB,EACzB,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACxB,MAAM,4CAA4C,CAAC;AA0BpD;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C;AAED,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,yBAAyB,EACzB,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,GACjB,CAAC;AAEF,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FloatingCartDrawer.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/addons/components/FloatingCartDrawer.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAuBhC,eAAO,MAAM,kBAAkB,EAAE,EAwLhC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Addons Module - Hooks
|
|
3
|
+
* Re-exports all hooks for the Addons module
|
|
4
|
+
*/
|
|
5
|
+
export { useAddons, useAddon, useSelectedAddons, useAddonMutations } from './useAddons';
|
|
6
|
+
export { useAddonPurchaseEligibility } from './useAddonPurchaseEligibility';
|
|
7
|
+
export type { AddonPurchaseBlock } from './useAddonPurchaseEligibility';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/addons/hooks/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACxF,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,YAAY,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Addons Module - useAddonPurchaseEligibility Hook
|
|
3
|
+
*
|
|
4
|
+
* BOFF-9889: add-ons require a paid subscription to their product (the
|
|
5
|
+
* catalogs' "Free tier exclusion" rule). The backend enforces it at checkout;
|
|
6
|
+
* this hook asks the same rule up front so the browse and detail pages can
|
|
7
|
+
* explain the restriction instead of letting a Free workspace fill a cart it
|
|
8
|
+
* cannot check out.
|
|
9
|
+
*/
|
|
10
|
+
export interface AddonPurchaseBlock {
|
|
11
|
+
addonId: string;
|
|
12
|
+
productId: string | null;
|
|
13
|
+
reason: string;
|
|
14
|
+
}
|
|
15
|
+
interface UseAddonPurchaseEligibilityResult {
|
|
16
|
+
/** Add-ons the organization cannot buy yet, keyed by add-on id. */
|
|
17
|
+
blocked: Map<string, AddonPurchaseBlock>;
|
|
18
|
+
isBlocked: (addonId: string) => boolean;
|
|
19
|
+
isLoading: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare function useAddonPurchaseEligibility(addonIds: string[]): UseAddonPurchaseEligibilityResult;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=useAddonPurchaseEligibility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAddonPurchaseEligibility.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/addons/hooks/useAddonPurchaseEligibility.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,iCAAiC;IACzC,mEAAmE;IACnE,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IACzC,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IACxC,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,iCAAiC,CA2BjG"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Addon, CreateAddonInput, UpdateAddonInput } from '../../../shared/types';
|
|
2
|
+
interface UseAddonsOptions {
|
|
3
|
+
onlyActive?: boolean;
|
|
4
|
+
/** Filter by product ID — pushed to backend query, not client-side. */
|
|
5
|
+
productId?: string;
|
|
6
|
+
/**
|
|
7
|
+
* When false, free addons (price = 0) are excluded at the backend.
|
|
8
|
+
* Use false on user-facing browse pages; omit or set true for admin pages.
|
|
9
|
+
*/
|
|
10
|
+
includeFree?: boolean;
|
|
11
|
+
}
|
|
12
|
+
interface UseAddonsResult {
|
|
13
|
+
addons: Addon[];
|
|
14
|
+
isLoading: boolean;
|
|
15
|
+
error: Error | undefined;
|
|
16
|
+
refetch: () => Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
interface UseSelectedAddonsResult {
|
|
19
|
+
addons: Addon[];
|
|
20
|
+
isLoading: boolean;
|
|
21
|
+
error: Error | undefined;
|
|
22
|
+
}
|
|
23
|
+
interface UseAddonMutationsResult {
|
|
24
|
+
createAddon: (input: CreateAddonInput) => Promise<boolean>;
|
|
25
|
+
updateAddon: (input: UpdateAddonInput) => Promise<boolean>;
|
|
26
|
+
toggleAddon: (addonId: string, status: boolean) => Promise<boolean>;
|
|
27
|
+
isCreating: boolean;
|
|
28
|
+
isUpdating: boolean;
|
|
29
|
+
isToggling: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Hook for fetching all addons
|
|
33
|
+
*/
|
|
34
|
+
export declare function useAddons(options?: UseAddonsOptions): UseAddonsResult;
|
|
35
|
+
interface UseAddonResult {
|
|
36
|
+
addon: Addon | null;
|
|
37
|
+
isLoading: boolean;
|
|
38
|
+
error: Error | undefined;
|
|
39
|
+
refetch: () => Promise<void>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Hook for fetching a single addon by ID
|
|
43
|
+
*/
|
|
44
|
+
export declare function useAddon(addonId: string | undefined): UseAddonResult;
|
|
45
|
+
/**
|
|
46
|
+
* Hook for fetching specific addons by IDs
|
|
47
|
+
*/
|
|
48
|
+
export declare function useSelectedAddons(addonIds: string[]): UseSelectedAddonsResult;
|
|
49
|
+
/**
|
|
50
|
+
* Hook for addon mutations (create, update, toggle)
|
|
51
|
+
*/
|
|
52
|
+
export declare function useAddonMutations(): UseAddonMutationsResult;
|
|
53
|
+
export {};
|
|
54
|
+
//# sourceMappingURL=useAddons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAddons.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/addons/hooks/useAddons.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAYH,OAAO,KAAK,EAAE,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEvF,UAAU,gBAAgB;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,UAAU,eAAe;IACvB,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;IACzB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED,UAAU,uBAAuB;IAC/B,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;CAC1B;AAED,UAAU,uBAAuB;IAC/B,WAAW,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3D,WAAW,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3D,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACpE,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,OAAO,GAAE,gBAAqB,GAAG,eAAe,CA6BzE;AAED,UAAU,cAAc;IACtB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;IACzB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,cAAc,CAiBpE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,uBAAuB,CAY7E;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,uBAAuB,CA0E3D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/billing/modules/addons/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddonBrowseDetailPage.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/addons/pages/AddonBrowseDetailPage.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAW,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AA+CzC,eAAO,MAAM,qBAAqB,EAAE,EA6RnC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddonCreatePage.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/addons/pages/AddonCreatePage.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAY,KAAK,EAAE,EAAkB,MAAM,OAAO,CAAC;AAoB1D,eAAO,MAAM,eAAe,EAAE,EAma7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddonDetailPage.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/addons/pages/AddonDetailPage.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAW,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AA4DzC,eAAO,MAAM,eAAe,EAAE,EA0T7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddonEditPage.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/addons/pages/AddonEditPage.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAuB,KAAK,EAAE,EAAkB,MAAM,OAAO,CAAC;AA2BrE,eAAO,MAAM,aAAa,EAAE,EAye3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddonsBrowsePage.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/addons/pages/AddonsBrowsePage.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAqB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AA8FnD,eAAO,MAAM,gBAAgB,EAAE,EA4P9B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddonsListPage.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/addons/pages/AddonsListPage.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAqB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAmFnD,eAAO,MAAM,cAAc,EAAE,EAoV5B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Addons Module - Pages
|
|
3
|
+
* Re-exports all page components
|
|
4
|
+
*/
|
|
5
|
+
export { AddonsListPage } from './AddonsListPage';
|
|
6
|
+
export { AddonDetailPage } from './AddonDetailPage';
|
|
7
|
+
export { AddonEditPage } from './AddonEditPage';
|
|
8
|
+
export { AddonCreatePage } from './AddonCreatePage';
|
|
9
|
+
export { AddonsBrowsePage } from './AddonsBrowsePage';
|
|
10
|
+
export { AddonBrowseDetailPage } from './AddonBrowseDetailPage';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/addons/pages/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Addon } from '../../../shared/types';
|
|
2
|
+
export interface CartAddon {
|
|
3
|
+
addon: Addon;
|
|
4
|
+
quantity: number;
|
|
5
|
+
}
|
|
6
|
+
interface AddonCartState {
|
|
7
|
+
items: CartAddon[];
|
|
8
|
+
isCartOpen: boolean;
|
|
9
|
+
_hasHydrated: boolean;
|
|
10
|
+
addToCart: (addon: Addon, quantity?: number) => void;
|
|
11
|
+
removeFromCart: (addonId: string) => void;
|
|
12
|
+
updateQuantity: (addonId: string, quantity: number) => void;
|
|
13
|
+
clearCart: () => void;
|
|
14
|
+
toggleCart: () => void;
|
|
15
|
+
openCart: () => void;
|
|
16
|
+
closeCart: () => void;
|
|
17
|
+
setHasHydrated: (state: boolean) => void;
|
|
18
|
+
getItemCount: () => number;
|
|
19
|
+
getCartTotal: () => number;
|
|
20
|
+
isInCart: (addonId: string) => boolean;
|
|
21
|
+
getCartItem: (addonId: string) => CartAddon | undefined;
|
|
22
|
+
}
|
|
23
|
+
export declare const useAddonCartStore: import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<AddonCartState>, "setState" | "persist"> & {
|
|
24
|
+
setState(partial: AddonCartState | Partial<AddonCartState> | ((state: AddonCartState) => AddonCartState | Partial<AddonCartState>), replace?: false | undefined): unknown;
|
|
25
|
+
setState(state: AddonCartState | ((state: AddonCartState) => AddonCartState), replace: true): unknown;
|
|
26
|
+
persist: {
|
|
27
|
+
setOptions: (options: Partial<import('zustand/middleware').PersistOptions<AddonCartState, unknown, unknown>>) => void;
|
|
28
|
+
clearStorage: () => void;
|
|
29
|
+
rehydrate: () => Promise<void> | void;
|
|
30
|
+
hasHydrated: () => boolean;
|
|
31
|
+
onHydrate: (fn: (state: AddonCartState) => void) => () => void;
|
|
32
|
+
onFinishHydration: (fn: (state: AddonCartState) => void) => () => void;
|
|
33
|
+
getOptions: () => Partial<import('zustand/middleware').PersistOptions<AddonCartState, unknown, unknown>>;
|
|
34
|
+
};
|
|
35
|
+
}>;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=addonCartStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addonCartStore.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/addons/store/addonCartStore.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,cAAc;IAEtB,KAAK,EAAE,SAAS,EAAE,CAAC;IAGnB,UAAU,EAAE,OAAO,CAAC;IAGpB,YAAY,EAAE,OAAO,CAAC;IAGtB,SAAS,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5D,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,cAAc,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAGzC,YAAY,EAAE,MAAM,MAAM,CAAC;IAC3B,YAAY,EAAE,MAAM,MAAM,CAAC;IAC3B,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IACvC,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,SAAS,GAAG,SAAS,CAAC;CACzD;AAED,eAAO,MAAM,iBAAiB;;;;;;;;;;;;EAoG7B,CAAC"}
|