@burdenoff/microfe-billing 2026.510.114
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/README.md +12 -0
- package/dist/billing/BillingAdminRoutes.d.ts +6 -0
- package/dist/billing/BillingAdminRoutes.d.ts.map +1 -0
- package/dist/billing/BillingAdminRoutes.js +359 -0
- package/dist/billing/BillingAdminRoutes.js.map +1 -0
- package/dist/billing/BillingRoot.d.ts +37 -0
- package/dist/billing/BillingRoot.d.ts.map +1 -0
- package/dist/billing/BillingRoot.js +190 -0
- package/dist/billing/BillingRoot.js.map +1 -0
- package/dist/billing/BillingUserRoutes.d.ts +7 -0
- package/dist/billing/BillingUserRoutes.d.ts.map +1 -0
- package/dist/billing/BillingUserRoutes.js +479 -0
- package/dist/billing/BillingUserRoutes.js.map +1 -0
- package/dist/billing/constants/permissions.d.ts +18 -0
- package/dist/billing/constants/permissions.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/useBillingAccountSelection.js +81 -0
- package/dist/billing/hooks/useBillingAccountSelection.js.map +1 -0
- package/dist/billing/hooks/useBillingEventEmitter.d.ts +8 -0
- package/dist/billing/hooks/useBillingEventEmitter.d.ts.map +1 -0
- package/dist/billing/hooks/useBillingEventEmitter.js +15 -0
- package/dist/billing/hooks/useBillingEventEmitter.js.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/useBillingNavigate.js +23 -0
- package/dist/billing/hooks/useBillingNavigate.js.map +1 -0
- package/dist/billing/hooks/useBillingPermissions.d.ts +94 -0
- package/dist/billing/hooks/useBillingPermissions.d.ts.map +1 -0
- package/dist/billing/hooks/useBillingPermissions.js +78 -0
- package/dist/billing/hooks/useBillingPermissions.js.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/useDefaultBillingCurrency.js +23 -0
- package/dist/billing/hooks/useDefaultBillingCurrency.js.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 +51 -0
- package/dist/billing/lib/native-purchases.d.ts.map +1 -0
- package/dist/billing/lib/native-purchases.js +44 -0
- package/dist/billing/lib/native-purchases.js.map +1 -0
- package/dist/billing/modules/addons/components/FloatingCartDrawer.d.ts +4 -0
- package/dist/billing/modules/addons/components/FloatingCartDrawer.d.ts.map +1 -0
- package/dist/billing/modules/addons/components/FloatingCartDrawer.js +179 -0
- package/dist/billing/modules/addons/components/FloatingCartDrawer.js.map +1 -0
- package/dist/billing/modules/addons/components/index.d.ts +5 -0
- package/dist/billing/modules/addons/components/index.d.ts.map +1 -0
- package/dist/billing/modules/addons/hooks/index.d.ts +6 -0
- package/dist/billing/modules/addons/hooks/index.d.ts.map +1 -0
- package/dist/billing/modules/addons/hooks/index.js +1 -0
- package/dist/billing/modules/addons/hooks/useAddons.d.ts +55 -0
- package/dist/billing/modules/addons/hooks/useAddons.d.ts.map +1 -0
- package/dist/billing/modules/addons/hooks/useAddons.js +77 -0
- package/dist/billing/modules/addons/hooks/useAddons.js.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/index.js +10 -0
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.d.ts +4 -0
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.d.ts.map +1 -0
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js +266 -0
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js.map +1 -0
- package/dist/billing/modules/addons/pages/AddonCreatePage.d.ts +4 -0
- package/dist/billing/modules/addons/pages/AddonCreatePage.d.ts.map +1 -0
- package/dist/billing/modules/addons/pages/AddonCreatePage.js +369 -0
- package/dist/billing/modules/addons/pages/AddonCreatePage.js.map +1 -0
- package/dist/billing/modules/addons/pages/AddonDetailPage.d.ts +4 -0
- package/dist/billing/modules/addons/pages/AddonDetailPage.d.ts.map +1 -0
- package/dist/billing/modules/addons/pages/AddonDetailPage.js +280 -0
- package/dist/billing/modules/addons/pages/AddonDetailPage.js.map +1 -0
- package/dist/billing/modules/addons/pages/AddonEditPage.d.ts +4 -0
- package/dist/billing/modules/addons/pages/AddonEditPage.d.ts.map +1 -0
- package/dist/billing/modules/addons/pages/AddonEditPage.js +396 -0
- package/dist/billing/modules/addons/pages/AddonEditPage.js.map +1 -0
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.d.ts +4 -0
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.d.ts.map +1 -0
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +582 -0
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js.map +1 -0
- package/dist/billing/modules/addons/pages/AddonsListPage.d.ts +4 -0
- package/dist/billing/modules/addons/pages/AddonsListPage.d.ts.map +1 -0
- package/dist/billing/modules/addons/pages/AddonsListPage.js +744 -0
- package/dist/billing/modules/addons/pages/AddonsListPage.js.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/pages/index.js +6 -0
- package/dist/billing/modules/addons/store/addonCartStore.d.ts +38 -0
- package/dist/billing/modules/addons/store/addonCartStore.d.ts.map +1 -0
- package/dist/billing/modules/addons/store/addonCartStore.js +74 -0
- package/dist/billing/modules/addons/store/addonCartStore.js.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/api.js +38 -0
- package/dist/billing/modules/affiliate/api.js.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/index.js +2 -0
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.d.ts +4 -0
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.d.ts.map +1 -0
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +464 -0
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.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/index.js +3 -0
- package/dist/billing/modules/analytics/pages/AnalyticsPage.d.ts +4 -0
- package/dist/billing/modules/analytics/pages/AnalyticsPage.d.ts.map +1 -0
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js +469 -0
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js.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/analytics/pages/index.js +1 -0
- package/dist/billing/modules/billing/hooks/index.d.ts +10 -0
- package/dist/billing/modules/billing/hooks/index.d.ts.map +1 -0
- package/dist/billing/modules/billing/hooks/index.js +4 -0
- package/dist/billing/modules/billing/hooks/useInvoices.d.ts +67 -0
- package/dist/billing/modules/billing/hooks/useInvoices.d.ts.map +1 -0
- package/dist/billing/modules/billing/hooks/useInvoices.js +87 -0
- package/dist/billing/modules/billing/hooks/useInvoices.js.map +1 -0
- package/dist/billing/modules/billing/hooks/usePayments.d.ts +62 -0
- package/dist/billing/modules/billing/hooks/usePayments.d.ts.map +1 -0
- package/dist/billing/modules/billing/hooks/usePayments.js +3 -0
- package/dist/billing/modules/billing/hooks/useRefunds.d.ts +191 -0
- package/dist/billing/modules/billing/hooks/useRefunds.d.ts.map +1 -0
- package/dist/billing/modules/billing/hooks/useRefunds.js +162 -0
- package/dist/billing/modules/billing/hooks/useRefunds.js.map +1 -0
- package/dist/billing/modules/billing/hooks/useTransactions.d.ts +41 -0
- package/dist/billing/modules/billing/hooks/useTransactions.d.ts.map +1 -0
- package/dist/billing/modules/billing/hooks/useTransactions.js +55 -0
- package/dist/billing/modules/billing/hooks/useTransactions.js.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/index.js +11 -0
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.d.ts +4 -0
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.d.ts.map +1 -0
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +631 -0
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -0
- package/dist/billing/modules/billing/pages/InvoicesListPage.d.ts +4 -0
- package/dist/billing/modules/billing/pages/InvoicesListPage.d.ts.map +1 -0
- package/dist/billing/modules/billing/pages/InvoicesListPage.js +382 -0
- package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -0
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.d.ts +4 -0
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.d.ts.map +1 -0
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +147 -0
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.js.map +1 -0
- package/dist/billing/modules/billing/pages/RefundsPage.d.ts +4 -0
- package/dist/billing/modules/billing/pages/RefundsPage.d.ts.map +1 -0
- package/dist/billing/modules/billing/pages/RefundsPage.js +1074 -0
- package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -0
- package/dist/billing/modules/billing/pages/TransactionsPage.d.ts +4 -0
- package/dist/billing/modules/billing/pages/TransactionsPage.d.ts.map +1 -0
- package/dist/billing/modules/billing/pages/TransactionsPage.js +587 -0
- package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -0
- package/dist/billing/modules/billing/pages/index.d.ts +10 -0
- package/dist/billing/modules/billing/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/billing/pages/index.js +5 -0
- package/dist/billing/modules/checkout/components/AutoPayToggle.d.ts +14 -0
- package/dist/billing/modules/checkout/components/AutoPayToggle.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/AutoPayToggle.js +3 -0
- package/dist/billing/modules/checkout/components/BillingAccountSelector.d.ts +14 -0
- package/dist/billing/modules/checkout/components/BillingAccountSelector.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/BillingAccountSelector.js +151 -0
- package/dist/billing/modules/checkout/components/BillingAccountSelector.js.map +1 -0
- package/dist/billing/modules/checkout/components/CompactAutoPayToggle.d.ts +14 -0
- package/dist/billing/modules/checkout/components/CompactAutoPayToggle.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/CompactAutoPayToggle.js +4 -0
- package/dist/billing/modules/checkout/components/CreditsAmountInput.d.ts +14 -0
- package/dist/billing/modules/checkout/components/CreditsAmountInput.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/CreditsAmountInput.js +130 -0
- package/dist/billing/modules/checkout/components/CreditsAmountInput.js.map +1 -0
- package/dist/billing/modules/checkout/components/CreditsPaymentOption.d.ts +16 -0
- package/dist/billing/modules/checkout/components/CreditsPaymentOption.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/CreditsPaymentOption.js +5 -0
- package/dist/billing/modules/checkout/components/CurrencySelector.d.ts +19 -0
- package/dist/billing/modules/checkout/components/CurrencySelector.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/CurrencySelector.js +5 -0
- package/dist/billing/modules/checkout/components/NativeCheckoutView.d.ts +14 -0
- package/dist/billing/modules/checkout/components/NativeCheckoutView.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/NativeCheckoutView.js +273 -0
- package/dist/billing/modules/checkout/components/NativeCheckoutView.js.map +1 -0
- package/dist/billing/modules/checkout/components/OrderSummary.d.ts +22 -0
- package/dist/billing/modules/checkout/components/OrderSummary.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/OrderSummary.js +293 -0
- package/dist/billing/modules/checkout/components/OrderSummary.js.map +1 -0
- package/dist/billing/modules/checkout/components/PaymentProviderSelector.d.ts +19 -0
- package/dist/billing/modules/checkout/components/PaymentProviderSelector.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/PaymentProviderSelector.js +3 -0
- package/dist/billing/modules/checkout/components/PromoCodeInput.d.ts +19 -0
- package/dist/billing/modules/checkout/components/PromoCodeInput.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/PromoCodeInput.js +102 -0
- package/dist/billing/modules/checkout/components/PromoCodeInput.js.map +1 -0
- package/dist/billing/modules/checkout/components/RazorpayPaymentButton.d.ts +25 -0
- package/dist/billing/modules/checkout/components/RazorpayPaymentButton.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/RazorpayPaymentButton.js +169 -0
- package/dist/billing/modules/checkout/components/RazorpayPaymentButton.js.map +1 -0
- package/dist/billing/modules/checkout/components/SavedCardSelector.d.ts +13 -0
- package/dist/billing/modules/checkout/components/SavedCardSelector.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/SavedCardSelector.js +4 -0
- package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.d.ts +13 -0
- package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.js +78 -0
- package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.js.map +1 -0
- package/dist/billing/modules/checkout/components/StripePaymentForm.d.ts +16 -0
- package/dist/billing/modules/checkout/components/StripePaymentForm.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/StripePaymentForm.js +253 -0
- package/dist/billing/modules/checkout/components/StripePaymentForm.js.map +1 -0
- package/dist/billing/modules/checkout/components/SubscriptionSelector.d.ts +26 -0
- package/dist/billing/modules/checkout/components/SubscriptionSelector.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/SubscriptionSelector.js +84 -0
- package/dist/billing/modules/checkout/components/SubscriptionSelector.js.map +1 -0
- package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.d.ts +23 -0
- package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.js +229 -0
- package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.js.map +1 -0
- package/dist/billing/modules/checkout/components/index.d.ts +20 -0
- package/dist/billing/modules/checkout/components/index.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/index.js +16 -0
- package/dist/billing/modules/checkout/graphql/index.d.ts +6 -0
- package/dist/billing/modules/checkout/graphql/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/index.js +4 -0
- package/dist/billing/modules/checkout/hooks/useCheckout.d.ts +69 -0
- package/dist/billing/modules/checkout/hooks/useCheckout.d.ts.map +1 -0
- package/dist/billing/modules/checkout/hooks/useCheckout.js +377 -0
- package/dist/billing/modules/checkout/hooks/useCheckout.js.map +1 -0
- package/dist/billing/modules/checkout/hooks/useNativeCheckout.d.ts +26 -0
- package/dist/billing/modules/checkout/hooks/useNativeCheckout.d.ts.map +1 -0
- package/dist/billing/modules/checkout/hooks/useNativeCheckout.js +88 -0
- package/dist/billing/modules/checkout/hooks/useNativeCheckout.js.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/usePaymentProviders.js +16 -0
- package/dist/billing/modules/checkout/hooks/usePaymentProviders.js.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/usePaymentStatusPolling.js +107 -0
- package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.js.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/index.js +19 -0
- package/dist/billing/modules/checkout/pages/CheckoutPage.d.ts +4 -0
- package/dist/billing/modules/checkout/pages/CheckoutPage.d.ts.map +1 -0
- package/dist/billing/modules/checkout/pages/CheckoutPage.js +1248 -0
- package/dist/billing/modules/checkout/pages/CheckoutPage.js.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/pages/index.js +1 -0
- package/dist/billing/modules/checkout/types/index.d.ts +270 -0
- package/dist/billing/modules/checkout/types/index.d.ts.map +1 -0
- package/dist/billing/modules/checkout/utils/storeOrder.d.ts +20 -0
- package/dist/billing/modules/checkout/utils/storeOrder.d.ts.map +1 -0
- package/dist/billing/modules/checkout/utils/storeOrder.js +27 -0
- package/dist/billing/modules/checkout/utils/storeOrder.js.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/index.js +6 -0
- package/dist/billing/modules/coupons/pages/CouponDetailPage.d.ts +4 -0
- package/dist/billing/modules/coupons/pages/CouponDetailPage.d.ts.map +1 -0
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js +489 -0
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -0
- package/dist/billing/modules/coupons/pages/CouponsListPage.d.ts +4 -0
- package/dist/billing/modules/coupons/pages/CouponsListPage.d.ts.map +1 -0
- package/dist/billing/modules/coupons/pages/CouponsListPage.js +544 -0
- package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -0
- package/dist/billing/modules/coupons/pages/CreateCouponPage.d.ts +4 -0
- package/dist/billing/modules/coupons/pages/CreateCouponPage.d.ts.map +1 -0
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js +421 -0
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js.map +1 -0
- package/dist/billing/modules/coupons/pages/EditCouponPage.d.ts +4 -0
- package/dist/billing/modules/coupons/pages/EditCouponPage.d.ts.map +1 -0
- package/dist/billing/modules/coupons/pages/EditCouponPage.js +379 -0
- package/dist/billing/modules/coupons/pages/EditCouponPage.js.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/coupons/pages/index.js +4 -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/index.js +1 -0
- package/dist/billing/modules/credits/hooks/useCredits.d.ts +75 -0
- package/dist/billing/modules/credits/hooks/useCredits.d.ts.map +1 -0
- package/dist/billing/modules/credits/hooks/useCredits.js +78 -0
- package/dist/billing/modules/credits/hooks/useCredits.js.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/index.js +8 -0
- package/dist/billing/modules/credits/pages/AdminCreditsPage.d.ts +4 -0
- package/dist/billing/modules/credits/pages/AdminCreditsPage.d.ts.map +1 -0
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js +140 -0
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js.map +1 -0
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.d.ts +4 -0
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.d.ts.map +1 -0
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +331 -0
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.js.map +1 -0
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.d.ts +4 -0
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.d.ts.map +1 -0
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +770 -0
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js.map +1 -0
- package/dist/billing/modules/credits/pages/CreditsPage.d.ts +4 -0
- package/dist/billing/modules/credits/pages/CreditsPage.d.ts.map +1 -0
- package/dist/billing/modules/credits/pages/CreditsPage.js +324 -0
- package/dist/billing/modules/credits/pages/CreditsPage.js.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/credits/pages/index.js +4 -0
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.d.ts +14 -0
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js +185 -0
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js.map +1 -0
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.d.ts +111 -0
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js +388 -0
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js.map +1 -0
- package/dist/billing/modules/dashboard/components/BillingAccountCard.d.ts +16 -0
- package/dist/billing/modules/dashboard/components/BillingAccountCard.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/components/BillingAccountCard.js +146 -0
- package/dist/billing/modules/dashboard/components/BillingAccountCard.js.map +1 -0
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.d.ts +13 -0
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js +1044 -0
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js.map +1 -0
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.d.ts +15 -0
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js +216 -0
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js.map +1 -0
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.d.ts +27 -0
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js +193 -0
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js.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/components/index.js +6 -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/index.js +2 -0
- package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.d.ts +17 -0
- package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.js +42 -0
- package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.js.map +1 -0
- package/dist/billing/modules/dashboard/hooks/useDashboard.d.ts +145 -0
- package/dist/billing/modules/dashboard/hooks/useDashboard.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/hooks/useDashboard.js +118 -0
- package/dist/billing/modules/dashboard/hooks/useDashboard.js.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/index.js +12 -0
- package/dist/billing/modules/dashboard/pages/OverviewPage.d.ts +4 -0
- package/dist/billing/modules/dashboard/pages/OverviewPage.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/pages/OverviewPage.js +478 -0
- package/dist/billing/modules/dashboard/pages/OverviewPage.js.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/dashboard/pages/index.js +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/index.js +3 -0
- package/dist/billing/modules/discounts/pages/DiscountsListPage.d.ts +4 -0
- package/dist/billing/modules/discounts/pages/DiscountsListPage.d.ts.map +1 -0
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js +1009 -0
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js.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/discounts/pages/index.js +1 -0
- package/dist/billing/modules/earnings/api.d.ts +131 -0
- package/dist/billing/modules/earnings/api.d.ts.map +1 -0
- package/dist/billing/modules/earnings/api.js +122 -0
- package/dist/billing/modules/earnings/api.js.map +1 -0
- package/dist/billing/modules/earnings/index.d.ts +4 -0
- package/dist/billing/modules/earnings/index.d.ts.map +1 -0
- package/dist/billing/modules/earnings/index.js +4 -0
- package/dist/billing/modules/earnings/pages/EarningsPage.d.ts +4 -0
- package/dist/billing/modules/earnings/pages/EarningsPage.d.ts.map +1 -0
- package/dist/billing/modules/earnings/pages/EarningsPage.js +435 -0
- package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -0
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.d.ts +4 -0
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.d.ts.map +1 -0
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +273 -0
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -0
- package/dist/billing/modules/earnings/pages/PayoutsPage.d.ts +4 -0
- package/dist/billing/modules/earnings/pages/PayoutsPage.d.ts.map +1 -0
- package/dist/billing/modules/earnings/pages/PayoutsPage.js +480 -0
- package/dist/billing/modules/earnings/pages/PayoutsPage.js.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/index.js +2 -0
- package/dist/billing/modules/plans/hooks/usePlans.d.ts +46 -0
- package/dist/billing/modules/plans/hooks/usePlans.d.ts.map +1 -0
- package/dist/billing/modules/plans/hooks/usePlans.js +77 -0
- package/dist/billing/modules/plans/hooks/usePlans.js.map +1 -0
- package/dist/billing/modules/plans/hooks/useQuotas.d.ts +27 -0
- package/dist/billing/modules/plans/hooks/useQuotas.d.ts.map +1 -0
- package/dist/billing/modules/plans/hooks/useQuotas.js +21 -0
- package/dist/billing/modules/plans/hooks/useQuotas.js.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/index.js +11 -0
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.d.ts +4 -0
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.d.ts.map +1 -0
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +264 -0
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js.map +1 -0
- package/dist/billing/modules/plans/pages/PlanCreatePage.d.ts +4 -0
- package/dist/billing/modules/plans/pages/PlanCreatePage.d.ts.map +1 -0
- package/dist/billing/modules/plans/pages/PlanCreatePage.js +368 -0
- package/dist/billing/modules/plans/pages/PlanCreatePage.js.map +1 -0
- package/dist/billing/modules/plans/pages/PlanDetailPage.d.ts +4 -0
- package/dist/billing/modules/plans/pages/PlanDetailPage.d.ts.map +1 -0
- package/dist/billing/modules/plans/pages/PlanDetailPage.js +356 -0
- package/dist/billing/modules/plans/pages/PlanDetailPage.js.map +1 -0
- package/dist/billing/modules/plans/pages/PlanEditPage.d.ts +4 -0
- package/dist/billing/modules/plans/pages/PlanEditPage.d.ts.map +1 -0
- package/dist/billing/modules/plans/pages/PlanEditPage.js +395 -0
- package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -0
- package/dist/billing/modules/plans/pages/PlansBrowsePage.d.ts +4 -0
- package/dist/billing/modules/plans/pages/PlansBrowsePage.d.ts.map +1 -0
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js +314 -0
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js.map +1 -0
- package/dist/billing/modules/plans/pages/PlansListPage.d.ts +4 -0
- package/dist/billing/modules/plans/pages/PlansListPage.d.ts.map +1 -0
- package/dist/billing/modules/plans/pages/PlansListPage.js +438 -0
- package/dist/billing/modules/plans/pages/PlansListPage.js.map +1 -0
- package/dist/billing/modules/plans/pages/index.d.ts +11 -0
- package/dist/billing/modules/plans/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/plans/pages/index.js +6 -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/index.js +2 -0
- package/dist/billing/modules/quota/hooks/useQuota.d.ts +102 -0
- package/dist/billing/modules/quota/hooks/useQuota.d.ts.map +1 -0
- package/dist/billing/modules/quota/hooks/useQuota.js +63 -0
- package/dist/billing/modules/quota/hooks/useQuota.js.map +1 -0
- package/dist/billing/modules/quota/hooks/useQuotaTemplates.d.ts +39 -0
- package/dist/billing/modules/quota/hooks/useQuotaTemplates.d.ts.map +1 -0
- package/dist/billing/modules/quota/hooks/useQuotaTemplates.js +67 -0
- package/dist/billing/modules/quota/hooks/useQuotaTemplates.js.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/index.js +10 -0
- package/dist/billing/modules/quota/pages/QuotaPage.d.ts +4 -0
- package/dist/billing/modules/quota/pages/QuotaPage.d.ts.map +1 -0
- package/dist/billing/modules/quota/pages/QuotaPage.js +337 -0
- package/dist/billing/modules/quota/pages/QuotaPage.js.map +1 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.d.ts +4 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.d.ts.map +1 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +273 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js.map +1 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.d.ts +4 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.d.ts.map +1 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +272 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js.map +1 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.d.ts +4 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.d.ts.map +1 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +316 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js.map +1 -0
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.d.ts +4 -0
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.d.ts.map +1 -0
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +401 -0
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js.map +1 -0
- package/dist/billing/modules/quota/pages/index.d.ts +9 -0
- package/dist/billing/modules/quota/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/quota/pages/index.js +5 -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/index.js +4 -0
- package/dist/billing/modules/settings/pages/SettingsPage.d.ts +4 -0
- package/dist/billing/modules/settings/pages/SettingsPage.d.ts.map +1 -0
- package/dist/billing/modules/settings/pages/SettingsPage.js +632 -0
- package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -0
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.d.ts +4 -0
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.d.ts.map +1 -0
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +270 -0
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.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/settings/pages/index.js +2 -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/graphql/index.js +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/index.js +3 -0
- package/dist/billing/modules/store/pages/StoreCheckoutPage.d.ts +11 -0
- package/dist/billing/modules/store/pages/StoreCheckoutPage.d.ts.map +1 -0
- package/dist/billing/modules/store/pages/StoreCheckoutPage.js +18 -0
- package/dist/billing/modules/store/pages/StoreCheckoutPage.js.map +1 -0
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.d.ts +12 -0
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.d.ts.map +1 -0
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js +167 -0
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js.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/index.js +1 -0
- package/dist/billing/modules/subscriptions/hooks/useSubscriptions.d.ts +92 -0
- package/dist/billing/modules/subscriptions/hooks/useSubscriptions.d.ts.map +1 -0
- package/dist/billing/modules/subscriptions/hooks/useSubscriptions.js +136 -0
- package/dist/billing/modules/subscriptions/hooks/useSubscriptions.js.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/index.js +7 -0
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.d.ts +4 -0
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.d.ts.map +1 -0
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +551 -0
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -0
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.d.ts +4 -0
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.d.ts.map +1 -0
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +529 -0
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js.map +1 -0
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.d.ts +4 -0
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.d.ts.map +1 -0
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js +430 -0
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.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/subscriptions/pages/index.js +3 -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/index.js +1 -0
- package/dist/billing/modules/usage/hooks/useUsage.d.ts +203 -0
- package/dist/billing/modules/usage/hooks/useUsage.d.ts.map +1 -0
- package/dist/billing/modules/usage/hooks/useUsage.js +271 -0
- package/dist/billing/modules/usage/hooks/useUsage.js.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/index.js +5 -0
- package/dist/billing/modules/usage/pages/UsagePage.d.ts +4 -0
- package/dist/billing/modules/usage/pages/UsagePage.d.ts.map +1 -0
- package/dist/billing/modules/usage/pages/UsagePage.js +817 -0
- package/dist/billing/modules/usage/pages/UsagePage.js.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/pages/index.js +1 -0
- package/dist/billing/providers/BillingProvider.d.ts +16 -0
- package/dist/billing/providers/BillingProvider.d.ts.map +1 -0
- package/dist/billing/providers/BillingProvider.js +40 -0
- package/dist/billing/providers/BillingProvider.js.map +1 -0
- package/dist/billing/shared/components/AccessDenied.d.ts +8 -0
- package/dist/billing/shared/components/AccessDenied.d.ts.map +1 -0
- package/dist/billing/shared/components/AccessDenied.js +44 -0
- package/dist/billing/shared/components/AccessDenied.js.map +1 -0
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.d.ts +11 -0
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.d.ts.map +1 -0
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js +230 -0
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js.map +1 -0
- package/dist/billing/shared/components/EmptyState.d.ts +11 -0
- package/dist/billing/shared/components/EmptyState.d.ts.map +1 -0
- package/dist/billing/shared/components/EmptyState.js +27 -0
- package/dist/billing/shared/components/EmptyState.js.map +1 -0
- package/dist/billing/shared/components/GeoPricingOverridesEditor.d.ts +11 -0
- package/dist/billing/shared/components/GeoPricingOverridesEditor.d.ts.map +1 -0
- package/dist/billing/shared/components/GeoPricingOverridesEditor.js +1 -0
- package/dist/billing/shared/components/PageHeader.d.ts +11 -0
- package/dist/billing/shared/components/PageHeader.d.ts.map +1 -0
- package/dist/billing/shared/components/PageHeader.js +25 -0
- package/dist/billing/shared/components/PageHeader.js.map +1 -0
- package/dist/billing/shared/components/ServerError.d.ts +11 -0
- package/dist/billing/shared/components/ServerError.d.ts.map +1 -0
- package/dist/billing/shared/components/ServerError.js +75 -0
- package/dist/billing/shared/components/ServerError.js.map +1 -0
- package/dist/billing/shared/components/StatCard.d.ts +15 -0
- package/dist/billing/shared/components/StatCard.d.ts.map +1 -0
- package/dist/billing/shared/components/StatCard.js +37 -0
- package/dist/billing/shared/components/StatCard.js.map +1 -0
- package/dist/billing/shared/components/index.d.ts +11 -0
- package/dist/billing/shared/components/index.d.ts.map +1 -0
- package/dist/billing/shared/components/index.js +7 -0
- package/dist/billing/shared/index.d.ts +8 -0
- package/dist/billing/shared/index.d.ts.map +1 -0
- package/dist/billing/shared/types/graphql.d.ts +926 -0
- package/dist/billing/shared/types/graphql.d.ts.map +1 -0
- package/dist/billing/shared/types/graphql.js +30 -0
- package/dist/billing/shared/types/graphql.js.map +1 -0
- package/dist/billing/shared/types/index.d.ts +96 -0
- package/dist/billing/shared/types/index.d.ts.map +1 -0
- package/dist/billing/shared/utils/directActivityGraphql.d.ts +13 -0
- package/dist/billing/shared/utils/directActivityGraphql.d.ts.map +1 -0
- package/dist/billing/shared/utils/directActivityGraphql.js +2 -0
- package/dist/billing/shared/utils/directBillingGraphql.d.ts +13 -0
- package/dist/billing/shared/utils/directBillingGraphql.d.ts.map +1 -0
- package/dist/billing/shared/utils/directBillingGraphql.js +22 -0
- package/dist/billing/shared/utils/directBillingGraphql.js.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/error.js +16 -0
- package/dist/billing/shared/utils/error.js.map +1 -0
- package/dist/billing/shared/utils/format.d.ts +28 -0
- package/dist/billing/shared/utils/format.d.ts.map +1 -0
- package/dist/billing/shared/utils/format.js +65 -0
- package/dist/billing/shared/utils/format.js.map +1 -0
- package/dist/billing/shared/utils/gatewayGraphql.d.ts +15 -0
- package/dist/billing/shared/utils/gatewayGraphql.d.ts.map +1 -0
- package/dist/billing/shared/utils/gatewayGraphql.js +27 -0
- package/dist/billing/shared/utils/gatewayGraphql.js.map +1 -0
- package/dist/billing/shared/utils/index.d.ts +13 -0
- package/dist/billing/shared/utils/index.d.ts.map +1 -0
- package/dist/billing/shared/utils/index.js +8 -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/navigation.js +8 -0
- package/dist/billing/shared/utils/navigation.js.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/paymentTheme.js +32 -0
- package/dist/billing/shared/utils/paymentTheme.js.map +1 -0
- package/dist/billing/shared/utils/status.d.ts +28 -0
- package/dist/billing/shared/utils/status.d.ts.map +1 -0
- package/dist/billing/shared/utils/status.js +57 -0
- package/dist/billing/shared/utils/status.js.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/shared/utils/tokens.js +128 -0
- package/dist/billing/shared/utils/tokens.js.map +1 -0
- package/dist/billing/types/index.d.ts +268 -0
- package/dist/billing/types/index.d.ts.map +1 -0
- package/dist/billing/utils/index.d.ts +128 -0
- package/dist/billing/utils/index.d.ts.map +1 -0
- package/dist/dev/main.d.ts +2 -0
- package/dist/dev/main.d.ts.map +1 -0
- package/dist/generated/global-operations.d.ts +9544 -0
- package/dist/generated/global-operations.d.ts.map +1 -0
- package/dist/generated/global-operations.js +3542 -0
- package/dist/generated/global-operations.js.map +1 -0
- package/dist/generated/global-types.d.ts +22208 -0
- package/dist/generated/global-types.d.ts.map +1 -0
- package/dist/generated/global-types.js +12 -0
- package/dist/generated/global-types.js.map +1 -0
- package/dist/generated/wspace-operations.d.ts +61 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -0
- package/dist/generated/wspace-operations.js +35 -0
- package/dist/generated/wspace-operations.js.map +1 -0
- package/dist/generated/wspace-types.d.ts +48578 -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/index.js +2 -0
- package/dist/node_modules/@capacitor/core/dist/index.js +270 -0
- package/dist/node_modules/@capacitor/core/dist/index.js.map +1 -0
- package/dist/utils/nativeBridge.d.ts +3 -0
- package/dist/utils/nativeBridge.d.ts.map +1 -0
- package/dist/utils/nativeBridge.js +2 -0
- package/package.json +112 -0
|
@@ -0,0 +1,1074 @@
|
|
|
1
|
+
import { AccessDenied as e } from "../../../shared/components/AccessDenied.js";
|
|
2
|
+
import { PageHeader as t } from "../../../shared/components/PageHeader.js";
|
|
3
|
+
import { statusTokens as n } from "../../../shared/utils/tokens.js";
|
|
4
|
+
import { EmptyState as r } from "../../../shared/components/EmptyState.js";
|
|
5
|
+
import { ServerError as i } from "../../../shared/components/ServerError.js";
|
|
6
|
+
import "../../../shared/components/index.js";
|
|
7
|
+
import { formatCurrency as a, formatDateTime as o } from "../../../shared/utils/format.js";
|
|
8
|
+
import { isServerError as s } from "../../../shared/utils/error.js";
|
|
9
|
+
import "../../../shared/utils/index.js";
|
|
10
|
+
import { useBillingPermissions as c } from "../../../hooks/useBillingPermissions.js";
|
|
11
|
+
import { GetTransactionDocument as l } from "../../../../generated/global-operations.js";
|
|
12
|
+
import { useRefunds as u } from "../hooks/useRefunds.js";
|
|
13
|
+
import "../hooks/index.js";
|
|
14
|
+
import { useCallback as d, useEffect as f, useMemo as p, useRef as m, useState as h } from "react";
|
|
15
|
+
import { AlertTriangle as g, Ban as _, CheckCircle as v, ChevronLeft as y, ChevronRight as b, Clock as x, Download as S, Eye as C, Filter as w, Loader2 as T, MoreHorizontal as E, Play as ee, Plus as te, RefreshCw as D, RotateCcw as O, Search as k, SkipForward as A, X as j, XCircle as M } from "lucide-react";
|
|
16
|
+
import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
|
|
17
|
+
import { useI18n as ne } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
18
|
+
import { useApolloClient as I } from "@apollo/client/react";
|
|
19
|
+
//#region src/billing/modules/billing/pages/RefundsPage.tsx
|
|
20
|
+
var L = {
|
|
21
|
+
PENDING: {
|
|
22
|
+
label: "Pending",
|
|
23
|
+
color: "yellow",
|
|
24
|
+
icon: x
|
|
25
|
+
},
|
|
26
|
+
PROCESSING: {
|
|
27
|
+
label: "Processing",
|
|
28
|
+
color: "blue",
|
|
29
|
+
icon: T
|
|
30
|
+
},
|
|
31
|
+
COMPLETED: {
|
|
32
|
+
label: "Completed",
|
|
33
|
+
color: "green",
|
|
34
|
+
icon: v
|
|
35
|
+
},
|
|
36
|
+
FAILED: {
|
|
37
|
+
label: "Failed",
|
|
38
|
+
color: "red",
|
|
39
|
+
icon: M
|
|
40
|
+
},
|
|
41
|
+
SKIPPED: {
|
|
42
|
+
label: "Skipped",
|
|
43
|
+
color: "gray",
|
|
44
|
+
icon: _
|
|
45
|
+
}
|
|
46
|
+
}, R = {
|
|
47
|
+
MANUAL: "Manual",
|
|
48
|
+
WEBHOOK_RECOVERY: "Webhook Recovery",
|
|
49
|
+
SUBSCRIPTION_CANCEL: "Subscription Cancel",
|
|
50
|
+
DUPLICATE_PAYMENT: "Duplicate Payment"
|
|
51
|
+
}, re = ["stripe", "razorpay"], z = (e) => {
|
|
52
|
+
let t = {
|
|
53
|
+
yellow: `${n.warning.bg} ${n.warning.text}`,
|
|
54
|
+
blue: `${n.info.bg} ${n.info.text}`,
|
|
55
|
+
green: `${n.success.bg} ${n.success.text}`,
|
|
56
|
+
red: `${n.error.bg} ${n.error.text}`,
|
|
57
|
+
gray: `${n.neutral.bg} ${n.neutral.text}`
|
|
58
|
+
};
|
|
59
|
+
return t[e] || t.gray;
|
|
60
|
+
}, ie = ({ record: e, onViewDetails: t, onProcess: r, onSkip: i, onRetry: a, isProcessing: o }) => {
|
|
61
|
+
let [s, c] = h(!1), l = m(null);
|
|
62
|
+
f(() => {
|
|
63
|
+
let e = (e) => {
|
|
64
|
+
l.current && !l.current.contains(e.target) && c(!1);
|
|
65
|
+
};
|
|
66
|
+
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
67
|
+
}, []);
|
|
68
|
+
let u = e.status === "PENDING", d = e.status === "PENDING", p = e.status === "FAILED";
|
|
69
|
+
return /* @__PURE__ */ F("div", {
|
|
70
|
+
className: "relative",
|
|
71
|
+
ref: l,
|
|
72
|
+
children: [/* @__PURE__ */ P("button", {
|
|
73
|
+
onClick: () => c(!s),
|
|
74
|
+
disabled: o,
|
|
75
|
+
className: "p-1.5 rounded-md hover:bg-muted/50 transition-colors disabled:opacity-50",
|
|
76
|
+
"aria-label": "Refund actions",
|
|
77
|
+
children: o ? /* @__PURE__ */ P(T, { className: "w-4 h-4 animate-spin text-muted-foreground" }) : /* @__PURE__ */ P(E, { className: "w-4 h-4 text-muted-foreground" })
|
|
78
|
+
}), s && /* @__PURE__ */ F("div", {
|
|
79
|
+
className: "absolute right-0 top-full mt-1 z-50 min-w-[160px] bg-popover border border-border rounded-md shadow-lg py-1",
|
|
80
|
+
children: [
|
|
81
|
+
/* @__PURE__ */ F("button", {
|
|
82
|
+
onClick: () => {
|
|
83
|
+
t(), c(!1);
|
|
84
|
+
},
|
|
85
|
+
className: "w-full flex items-center gap-2 px-3 py-2 text-sm text-foreground hover:bg-muted/50 transition-colors",
|
|
86
|
+
children: [/* @__PURE__ */ P(C, { className: "w-4 h-4" }), "View Details"]
|
|
87
|
+
}),
|
|
88
|
+
u && /* @__PURE__ */ F("button", {
|
|
89
|
+
onClick: () => {
|
|
90
|
+
r(), c(!1);
|
|
91
|
+
},
|
|
92
|
+
className: `w-full flex items-center gap-2 px-3 py-2 text-sm ${n.success.text} hover:bg-muted/50 transition-colors`,
|
|
93
|
+
children: [/* @__PURE__ */ P(ee, { className: "w-4 h-4" }), "Process Refund"]
|
|
94
|
+
}),
|
|
95
|
+
d && /* @__PURE__ */ F("button", {
|
|
96
|
+
onClick: () => {
|
|
97
|
+
i(), c(!1);
|
|
98
|
+
},
|
|
99
|
+
className: `w-full flex items-center gap-2 px-3 py-2 text-sm ${n.warning.text} hover:bg-muted/50 transition-colors`,
|
|
100
|
+
children: [/* @__PURE__ */ P(A, { className: "w-4 h-4" }), "Skip Refund"]
|
|
101
|
+
}),
|
|
102
|
+
p && /* @__PURE__ */ F("button", {
|
|
103
|
+
onClick: () => {
|
|
104
|
+
a(), c(!1);
|
|
105
|
+
},
|
|
106
|
+
className: `w-full flex items-center gap-2 px-3 py-2 text-sm ${n.info.text} hover:bg-muted/50 transition-colors`,
|
|
107
|
+
children: [/* @__PURE__ */ P(O, { className: "w-4 h-4" }), "Retry Refund"]
|
|
108
|
+
})
|
|
109
|
+
]
|
|
110
|
+
})]
|
|
111
|
+
});
|
|
112
|
+
}, B = {
|
|
113
|
+
provider: "stripe",
|
|
114
|
+
gatewayPaymentId: "",
|
|
115
|
+
amount: 0,
|
|
116
|
+
currency: "USD"
|
|
117
|
+
}, ae = ({ isOpen: e, onClose: t, onSubmit: n, isSubmitting: r }) => {
|
|
118
|
+
let i = I(), [o, s] = h(""), [c, u] = h(null), [f, p] = h(null), [m, g] = h(!1), [_, y] = h(B), b = () => {
|
|
119
|
+
s(""), u(null), p(null), y(B);
|
|
120
|
+
}, x = () => {
|
|
121
|
+
b(), t();
|
|
122
|
+
}, S = d(async (e) => {
|
|
123
|
+
let t = e.trim();
|
|
124
|
+
if (t) {
|
|
125
|
+
g(!0), p(null), u(null);
|
|
126
|
+
try {
|
|
127
|
+
let { data: e } = await i.query({
|
|
128
|
+
query: l,
|
|
129
|
+
variables: { id: t },
|
|
130
|
+
fetchPolicy: "network-only"
|
|
131
|
+
}), n = e?.getTransaction ?? null;
|
|
132
|
+
if (!n) {
|
|
133
|
+
p("Transaction not found. Check the ID and try again."), y(B);
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
let r = n.metadata, a = typeof r?.total == "number" ? r.total : n.amount;
|
|
137
|
+
u({
|
|
138
|
+
id: n.id,
|
|
139
|
+
billingAccountId: n.billingAccountId,
|
|
140
|
+
amount: n.amount,
|
|
141
|
+
totalAmount: a,
|
|
142
|
+
currency: n.currency,
|
|
143
|
+
description: n.description ?? null,
|
|
144
|
+
razorpayPaymentId: n.razorpayPaymentId ?? null,
|
|
145
|
+
stripePaymentId: n.stripePaymentId ?? null,
|
|
146
|
+
metadata: n.metadata ?? null
|
|
147
|
+
});
|
|
148
|
+
let o = n.razorpayPaymentId ? "razorpay" : "stripe", s = n.razorpayPaymentId ?? n.stripePaymentId ?? "", c = r?.purchaseType ?? "", d = n.description ?? "";
|
|
149
|
+
y({
|
|
150
|
+
transactionId: n.id,
|
|
151
|
+
billingAccountId: n.billingAccountId,
|
|
152
|
+
provider: o,
|
|
153
|
+
gatewayPaymentId: s,
|
|
154
|
+
currency: n.currency,
|
|
155
|
+
amount: a,
|
|
156
|
+
purchaseType: c,
|
|
157
|
+
purchaseDetail: d,
|
|
158
|
+
reason: "",
|
|
159
|
+
notes: ""
|
|
160
|
+
});
|
|
161
|
+
} catch {
|
|
162
|
+
p("Failed to look up transaction. Ensure the ID is correct."), y(B);
|
|
163
|
+
} finally {
|
|
164
|
+
g(!1);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}, [i]), C = async (e) => {
|
|
168
|
+
e.preventDefault(), await n(_), b();
|
|
169
|
+
};
|
|
170
|
+
if (!e) return null;
|
|
171
|
+
let w = c?.totalAmount ?? void 0, E = w !== void 0 && _.amount > w + .01;
|
|
172
|
+
return /* @__PURE__ */ F("div", {
|
|
173
|
+
className: "fixed inset-0 z-50 flex items-center justify-center",
|
|
174
|
+
children: [/* @__PURE__ */ P("div", {
|
|
175
|
+
className: "absolute inset-0 bg-overlay-scrim",
|
|
176
|
+
onClick: x
|
|
177
|
+
}), /* @__PURE__ */ F("div", {
|
|
178
|
+
className: "relative bg-background border border-border rounded-lg shadow-xl max-w-lg w-full mx-4 max-h-[90vh] overflow-auto",
|
|
179
|
+
children: [/* @__PURE__ */ F("div", {
|
|
180
|
+
className: "flex items-center justify-between p-4 border-b border-border",
|
|
181
|
+
children: [/* @__PURE__ */ P("h2", {
|
|
182
|
+
className: "text-lg font-semibold",
|
|
183
|
+
children: "Create Manual Refund"
|
|
184
|
+
}), /* @__PURE__ */ P("button", {
|
|
185
|
+
onClick: x,
|
|
186
|
+
className: "p-1 rounded-md hover:bg-muted/50 transition-colors",
|
|
187
|
+
children: /* @__PURE__ */ P(j, { className: "w-5 h-5" })
|
|
188
|
+
})]
|
|
189
|
+
}), /* @__PURE__ */ F("form", {
|
|
190
|
+
onSubmit: C,
|
|
191
|
+
className: "p-4 space-y-4",
|
|
192
|
+
children: [
|
|
193
|
+
/* @__PURE__ */ F("div", { children: [
|
|
194
|
+
/* @__PURE__ */ P("label", {
|
|
195
|
+
className: "block text-sm font-medium mb-1",
|
|
196
|
+
children: "Transaction ID *"
|
|
197
|
+
}),
|
|
198
|
+
/* @__PURE__ */ F("div", {
|
|
199
|
+
className: "flex gap-2",
|
|
200
|
+
children: [/* @__PURE__ */ P("input", {
|
|
201
|
+
type: "text",
|
|
202
|
+
value: o,
|
|
203
|
+
onChange: (e) => {
|
|
204
|
+
s(e.target.value), u(null), p(null);
|
|
205
|
+
},
|
|
206
|
+
onBlur: () => S(o),
|
|
207
|
+
className: "flex-1 px-3 py-2 border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary",
|
|
208
|
+
placeholder: "Paste transaction UUID...",
|
|
209
|
+
required: !0
|
|
210
|
+
}), /* @__PURE__ */ P("button", {
|
|
211
|
+
type: "button",
|
|
212
|
+
onClick: () => S(o),
|
|
213
|
+
disabled: !o.trim() || m,
|
|
214
|
+
className: "px-3 py-2 border border-border rounded-md hover:bg-muted/50 transition-colors disabled:opacity-50 flex items-center gap-1 text-sm",
|
|
215
|
+
children: m ? /* @__PURE__ */ P(T, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ P(k, { className: "w-4 h-4" })
|
|
216
|
+
})]
|
|
217
|
+
}),
|
|
218
|
+
f && /* @__PURE__ */ P("p", {
|
|
219
|
+
className: "text-xs text-status-error-text mt-1",
|
|
220
|
+
children: f
|
|
221
|
+
}),
|
|
222
|
+
m && /* @__PURE__ */ P("p", {
|
|
223
|
+
className: "text-xs text-muted-foreground mt-1",
|
|
224
|
+
children: "Looking up transaction..."
|
|
225
|
+
})
|
|
226
|
+
] }),
|
|
227
|
+
c && /* @__PURE__ */ F(N, { children: [
|
|
228
|
+
/* @__PURE__ */ F("div", {
|
|
229
|
+
className: "p-3 bg-status-success-bg-subtle border border-border-subtle rounded-md text-sm space-y-1",
|
|
230
|
+
children: [/* @__PURE__ */ F("div", {
|
|
231
|
+
className: "flex items-center gap-2 text-status-success-text font-medium",
|
|
232
|
+
children: [/* @__PURE__ */ P(v, { className: "w-4 h-4" }), "Transaction found"]
|
|
233
|
+
}), /* @__PURE__ */ F("div", {
|
|
234
|
+
className: "text-muted-foreground grid grid-cols-2 gap-x-4 gap-y-0.5 mt-1",
|
|
235
|
+
children: [
|
|
236
|
+
/* @__PURE__ */ F("span", { children: [
|
|
237
|
+
"Account:",
|
|
238
|
+
" ",
|
|
239
|
+
/* @__PURE__ */ F("span", {
|
|
240
|
+
className: "text-foreground font-mono text-xs",
|
|
241
|
+
children: [c.billingAccountId.slice(0, 16), "…"]
|
|
242
|
+
})
|
|
243
|
+
] }),
|
|
244
|
+
/* @__PURE__ */ F("span", { children: [
|
|
245
|
+
"Paid:",
|
|
246
|
+
" ",
|
|
247
|
+
/* @__PURE__ */ P("span", {
|
|
248
|
+
className: "text-foreground",
|
|
249
|
+
children: a(c.totalAmount, c.currency)
|
|
250
|
+
})
|
|
251
|
+
] }),
|
|
252
|
+
/* @__PURE__ */ F("span", { children: [
|
|
253
|
+
"Provider:",
|
|
254
|
+
" ",
|
|
255
|
+
/* @__PURE__ */ P("span", {
|
|
256
|
+
className: "text-foreground capitalize",
|
|
257
|
+
children: _.provider
|
|
258
|
+
})
|
|
259
|
+
] }),
|
|
260
|
+
/* @__PURE__ */ F("span", { children: ["Currency: ", /* @__PURE__ */ P("span", {
|
|
261
|
+
className: "text-foreground",
|
|
262
|
+
children: c.currency
|
|
263
|
+
})] })
|
|
264
|
+
]
|
|
265
|
+
})]
|
|
266
|
+
}),
|
|
267
|
+
/* @__PURE__ */ F("div", {
|
|
268
|
+
className: "grid grid-cols-2 gap-3",
|
|
269
|
+
children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
|
|
270
|
+
className: "block text-xs font-medium text-muted-foreground mb-1",
|
|
271
|
+
children: "Provider"
|
|
272
|
+
}), /* @__PURE__ */ P("div", {
|
|
273
|
+
className: "px-3 py-2 border border-border rounded-md bg-muted/30 text-sm capitalize",
|
|
274
|
+
children: _.provider
|
|
275
|
+
})] }), /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
|
|
276
|
+
className: "block text-xs font-medium text-muted-foreground mb-1",
|
|
277
|
+
children: "Currency"
|
|
278
|
+
}), /* @__PURE__ */ P("div", {
|
|
279
|
+
className: "px-3 py-2 border border-border rounded-md bg-muted/30 text-sm",
|
|
280
|
+
children: _.currency
|
|
281
|
+
})] })]
|
|
282
|
+
}),
|
|
283
|
+
/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
|
|
284
|
+
className: "block text-xs font-medium text-muted-foreground mb-1",
|
|
285
|
+
children: "Gateway Payment ID"
|
|
286
|
+
}), /* @__PURE__ */ P("div", {
|
|
287
|
+
className: "px-3 py-2 border border-border rounded-md bg-muted/30 text-sm font-mono truncate",
|
|
288
|
+
children: _.gatewayPaymentId
|
|
289
|
+
})] }),
|
|
290
|
+
_.purchaseType && /* @__PURE__ */ F("div", {
|
|
291
|
+
className: "grid grid-cols-2 gap-3",
|
|
292
|
+
children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
|
|
293
|
+
className: "block text-xs font-medium text-muted-foreground mb-1",
|
|
294
|
+
children: "Purchase Type"
|
|
295
|
+
}), /* @__PURE__ */ P("div", {
|
|
296
|
+
className: "px-3 py-2 border border-border rounded-md bg-muted/30 text-sm",
|
|
297
|
+
children: _.purchaseType
|
|
298
|
+
})] }), /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
|
|
299
|
+
className: "block text-xs font-medium text-muted-foreground mb-1",
|
|
300
|
+
children: "Purchase Detail"
|
|
301
|
+
}), /* @__PURE__ */ P("div", {
|
|
302
|
+
className: "px-3 py-2 border border-border rounded-md bg-muted/30 text-sm truncate",
|
|
303
|
+
children: _.purchaseDetail || "—"
|
|
304
|
+
})] })]
|
|
305
|
+
}),
|
|
306
|
+
/* @__PURE__ */ F("div", { children: [
|
|
307
|
+
/* @__PURE__ */ F("label", {
|
|
308
|
+
className: "block text-sm font-medium mb-1",
|
|
309
|
+
children: ["Refund Amount *", /* @__PURE__ */ F("span", {
|
|
310
|
+
className: "text-xs text-muted-foreground ml-1",
|
|
311
|
+
children: [
|
|
312
|
+
"(max ",
|
|
313
|
+
a(w, _.currency),
|
|
314
|
+
")"
|
|
315
|
+
]
|
|
316
|
+
})]
|
|
317
|
+
}),
|
|
318
|
+
/* @__PURE__ */ P("input", {
|
|
319
|
+
type: "number",
|
|
320
|
+
step: "0.01",
|
|
321
|
+
min: "0.01",
|
|
322
|
+
max: w,
|
|
323
|
+
value: _.amount,
|
|
324
|
+
onChange: (e) => y({
|
|
325
|
+
..._,
|
|
326
|
+
amount: parseFloat(e.target.value) || 0
|
|
327
|
+
}),
|
|
328
|
+
className: `w-full px-3 py-2 border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary ${E ? "border-status-error-text" : "border-border"}`,
|
|
329
|
+
required: !0
|
|
330
|
+
}),
|
|
331
|
+
E && /* @__PURE__ */ F("p", {
|
|
332
|
+
className: "text-xs text-status-error-text mt-1",
|
|
333
|
+
children: [
|
|
334
|
+
"Amount cannot exceed the original payment of",
|
|
335
|
+
" ",
|
|
336
|
+
a(w, _.currency)
|
|
337
|
+
]
|
|
338
|
+
})
|
|
339
|
+
] }),
|
|
340
|
+
/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
|
|
341
|
+
className: "block text-sm font-medium mb-1",
|
|
342
|
+
children: "Reason"
|
|
343
|
+
}), /* @__PURE__ */ P("input", {
|
|
344
|
+
type: "text",
|
|
345
|
+
value: _.reason || "",
|
|
346
|
+
onChange: (e) => y({
|
|
347
|
+
..._,
|
|
348
|
+
reason: e.target.value
|
|
349
|
+
}),
|
|
350
|
+
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary",
|
|
351
|
+
placeholder: "Reason for refund"
|
|
352
|
+
})] }),
|
|
353
|
+
/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
|
|
354
|
+
className: "block text-sm font-medium mb-1",
|
|
355
|
+
children: "Notes"
|
|
356
|
+
}), /* @__PURE__ */ P("textarea", {
|
|
357
|
+
value: _.notes || "",
|
|
358
|
+
onChange: (e) => y({
|
|
359
|
+
..._,
|
|
360
|
+
notes: e.target.value
|
|
361
|
+
}),
|
|
362
|
+
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary resize-none",
|
|
363
|
+
rows: 2,
|
|
364
|
+
placeholder: "Internal notes"
|
|
365
|
+
})] })
|
|
366
|
+
] }),
|
|
367
|
+
/* @__PURE__ */ F("div", {
|
|
368
|
+
className: "flex gap-2 pt-2",
|
|
369
|
+
children: [/* @__PURE__ */ P("button", {
|
|
370
|
+
type: "button",
|
|
371
|
+
onClick: x,
|
|
372
|
+
className: "flex-1 py-2 px-4 border border-border rounded-md hover:bg-muted/50 transition-colors",
|
|
373
|
+
children: "Cancel"
|
|
374
|
+
}), /* @__PURE__ */ F("button", {
|
|
375
|
+
type: "submit",
|
|
376
|
+
disabled: r || !c || !_.gatewayPaymentId || _.amount <= 0 || E,
|
|
377
|
+
className: "flex-1 py-2 px-4 bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2",
|
|
378
|
+
children: [r && /* @__PURE__ */ P(T, { className: "w-4 h-4 animate-spin" }), "Create Refund"]
|
|
379
|
+
})]
|
|
380
|
+
})
|
|
381
|
+
]
|
|
382
|
+
})]
|
|
383
|
+
})]
|
|
384
|
+
});
|
|
385
|
+
}, oe = ({ isOpen: e, record: t, onClose: r, onSubmit: i, isSubmitting: o }) => {
|
|
386
|
+
let [s, c] = h("");
|
|
387
|
+
return !e || !t ? null : /* @__PURE__ */ F("div", {
|
|
388
|
+
className: "fixed inset-0 z-50 flex items-center justify-center",
|
|
389
|
+
children: [/* @__PURE__ */ P("div", {
|
|
390
|
+
className: "absolute inset-0 bg-overlay-scrim",
|
|
391
|
+
onClick: r
|
|
392
|
+
}), /* @__PURE__ */ F("div", {
|
|
393
|
+
className: "relative bg-background border border-border rounded-lg shadow-xl max-w-md w-full mx-4",
|
|
394
|
+
children: [/* @__PURE__ */ F("div", {
|
|
395
|
+
className: "flex items-center justify-between p-4 border-b border-border",
|
|
396
|
+
children: [/* @__PURE__ */ P("h2", {
|
|
397
|
+
className: "text-lg font-semibold",
|
|
398
|
+
children: "Skip Refund"
|
|
399
|
+
}), /* @__PURE__ */ P("button", {
|
|
400
|
+
onClick: r,
|
|
401
|
+
className: "p-1 rounded-md hover:bg-muted/50 transition-colors",
|
|
402
|
+
children: /* @__PURE__ */ P(j, { className: "w-5 h-5" })
|
|
403
|
+
})]
|
|
404
|
+
}), /* @__PURE__ */ F("form", {
|
|
405
|
+
onSubmit: async (e) => {
|
|
406
|
+
e.preventDefault(), await i(s), c("");
|
|
407
|
+
},
|
|
408
|
+
className: "p-4 space-y-4",
|
|
409
|
+
children: [
|
|
410
|
+
/* @__PURE__ */ P("div", {
|
|
411
|
+
className: `p-3 ${n.warning.bg} border ${n.warning.border} rounded-md`,
|
|
412
|
+
children: /* @__PURE__ */ F("div", {
|
|
413
|
+
className: "flex items-start gap-2",
|
|
414
|
+
children: [/* @__PURE__ */ P(g, { className: `w-5 h-5 ${n.warning.icon} mt-0.5` }), /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
|
|
415
|
+
className: `text-sm font-medium ${n.warning.text}`,
|
|
416
|
+
children: "You are about to skip this refund"
|
|
417
|
+
}), /* @__PURE__ */ F("p", {
|
|
418
|
+
className: `text-sm ${n.warning.text} mt-1`,
|
|
419
|
+
children: ["Amount: ", a(t.amount, t.currency)]
|
|
420
|
+
})] })]
|
|
421
|
+
})
|
|
422
|
+
}),
|
|
423
|
+
/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
|
|
424
|
+
className: "block text-sm font-medium mb-1",
|
|
425
|
+
children: "Reason for skipping *"
|
|
426
|
+
}), /* @__PURE__ */ P("textarea", {
|
|
427
|
+
value: s,
|
|
428
|
+
onChange: (e) => c(e.target.value),
|
|
429
|
+
className: "w-full px-3 py-2 border border-border rounded-md bg-background resize-none",
|
|
430
|
+
rows: 3,
|
|
431
|
+
placeholder: "Explain why this refund is being skipped...",
|
|
432
|
+
required: !0
|
|
433
|
+
})] }),
|
|
434
|
+
/* @__PURE__ */ F("div", {
|
|
435
|
+
className: "flex gap-2",
|
|
436
|
+
children: [/* @__PURE__ */ P("button", {
|
|
437
|
+
type: "button",
|
|
438
|
+
onClick: r,
|
|
439
|
+
className: "flex-1 py-2 px-4 border border-border rounded-md hover:bg-muted/50 transition-colors",
|
|
440
|
+
children: "Cancel"
|
|
441
|
+
}), /* @__PURE__ */ F("button", {
|
|
442
|
+
type: "submit",
|
|
443
|
+
disabled: o || !s.trim(),
|
|
444
|
+
className: `flex-1 py-2 px-4 ${n.warning.dot} text-primary-foreground rounded-md hover:opacity-90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2`,
|
|
445
|
+
children: [o && /* @__PURE__ */ P(T, { className: "w-4 h-4 animate-spin" }), "Skip Refund"]
|
|
446
|
+
})]
|
|
447
|
+
})
|
|
448
|
+
]
|
|
449
|
+
})]
|
|
450
|
+
})]
|
|
451
|
+
});
|
|
452
|
+
}, se = ({ record: e, onClose: t }) => {
|
|
453
|
+
if (!e) return null;
|
|
454
|
+
let r = L[e.status].icon;
|
|
455
|
+
return /* @__PURE__ */ F("div", {
|
|
456
|
+
className: "fixed inset-0 z-50 flex items-center justify-center",
|
|
457
|
+
children: [/* @__PURE__ */ P("div", {
|
|
458
|
+
className: "absolute inset-0 bg-overlay-scrim",
|
|
459
|
+
onClick: t
|
|
460
|
+
}), /* @__PURE__ */ F("div", {
|
|
461
|
+
className: "relative bg-background border border-border rounded-lg shadow-xl max-w-lg w-full mx-4 max-h-[90vh] overflow-auto",
|
|
462
|
+
children: [
|
|
463
|
+
/* @__PURE__ */ F("div", {
|
|
464
|
+
className: "flex items-center justify-between p-4 border-b border-border",
|
|
465
|
+
children: [/* @__PURE__ */ P("h2", {
|
|
466
|
+
className: "text-lg font-semibold",
|
|
467
|
+
children: "Refund Details"
|
|
468
|
+
}), /* @__PURE__ */ P("button", {
|
|
469
|
+
onClick: t,
|
|
470
|
+
className: "p-1 rounded-md hover:bg-muted/50 transition-colors",
|
|
471
|
+
children: /* @__PURE__ */ P(j, { className: "w-5 h-5" })
|
|
472
|
+
})]
|
|
473
|
+
}),
|
|
474
|
+
/* @__PURE__ */ F("div", {
|
|
475
|
+
className: "p-4 space-y-4",
|
|
476
|
+
children: [
|
|
477
|
+
/* @__PURE__ */ F("div", {
|
|
478
|
+
className: `flex items-center gap-2 p-3 rounded-md ${z(L[e.status].color)}`,
|
|
479
|
+
children: [/* @__PURE__ */ P(r, { className: "w-5 h-5" }), /* @__PURE__ */ P("span", {
|
|
480
|
+
className: "font-medium",
|
|
481
|
+
children: L[e.status].label
|
|
482
|
+
})]
|
|
483
|
+
}),
|
|
484
|
+
/* @__PURE__ */ F("div", {
|
|
485
|
+
className: "grid grid-cols-2 gap-4",
|
|
486
|
+
children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
|
|
487
|
+
className: "text-xs text-muted-foreground mb-1",
|
|
488
|
+
children: "Refund ID"
|
|
489
|
+
}), /* @__PURE__ */ P("p", {
|
|
490
|
+
className: "text-sm font-mono break-all",
|
|
491
|
+
children: e.id
|
|
492
|
+
})] }), /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
|
|
493
|
+
className: "text-xs text-muted-foreground mb-1",
|
|
494
|
+
children: "Source"
|
|
495
|
+
}), /* @__PURE__ */ P("p", {
|
|
496
|
+
className: "text-sm",
|
|
497
|
+
children: R[e.source]
|
|
498
|
+
})] })]
|
|
499
|
+
}),
|
|
500
|
+
/* @__PURE__ */ F("div", {
|
|
501
|
+
className: "grid grid-cols-2 gap-4",
|
|
502
|
+
children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
|
|
503
|
+
className: "text-xs text-muted-foreground mb-1",
|
|
504
|
+
children: "Amount"
|
|
505
|
+
}), /* @__PURE__ */ P("p", {
|
|
506
|
+
className: "text-lg font-semibold",
|
|
507
|
+
children: a(e.amount, e.currency)
|
|
508
|
+
})] }), /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
|
|
509
|
+
className: "text-xs text-muted-foreground mb-1",
|
|
510
|
+
children: "Provider"
|
|
511
|
+
}), /* @__PURE__ */ P("p", {
|
|
512
|
+
className: "text-sm capitalize",
|
|
513
|
+
children: e.provider
|
|
514
|
+
})] })]
|
|
515
|
+
}),
|
|
516
|
+
/* @__PURE__ */ F("div", {
|
|
517
|
+
className: "grid grid-cols-2 gap-4",
|
|
518
|
+
children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
|
|
519
|
+
className: "text-xs text-muted-foreground mb-1",
|
|
520
|
+
children: "Gateway Payment ID"
|
|
521
|
+
}), /* @__PURE__ */ P("p", {
|
|
522
|
+
className: "text-sm font-mono break-all",
|
|
523
|
+
children: e.gatewayPaymentId
|
|
524
|
+
})] }), e.gatewayOrderId && /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
|
|
525
|
+
className: "text-xs text-muted-foreground mb-1",
|
|
526
|
+
children: "Gateway Order ID"
|
|
527
|
+
}), /* @__PURE__ */ P("p", {
|
|
528
|
+
className: "text-sm font-mono break-all",
|
|
529
|
+
children: e.gatewayOrderId
|
|
530
|
+
})] })]
|
|
531
|
+
}),
|
|
532
|
+
e.gatewayRefundId && /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
|
|
533
|
+
className: "text-xs text-muted-foreground mb-1",
|
|
534
|
+
children: "Gateway Refund ID"
|
|
535
|
+
}), /* @__PURE__ */ P("p", {
|
|
536
|
+
className: "text-sm font-mono break-all",
|
|
537
|
+
children: e.gatewayRefundId
|
|
538
|
+
})] }),
|
|
539
|
+
(e.purchaseType || e.purchaseDetail) && /* @__PURE__ */ F("div", {
|
|
540
|
+
className: "grid grid-cols-2 gap-4",
|
|
541
|
+
children: [e.purchaseType && /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
|
|
542
|
+
className: "text-xs text-muted-foreground mb-1",
|
|
543
|
+
children: "Purchase Type"
|
|
544
|
+
}), /* @__PURE__ */ P("p", {
|
|
545
|
+
className: "text-sm",
|
|
546
|
+
children: e.purchaseType
|
|
547
|
+
})] }), e.purchaseDetail && /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
|
|
548
|
+
className: "text-xs text-muted-foreground mb-1",
|
|
549
|
+
children: "Purchase Detail"
|
|
550
|
+
}), /* @__PURE__ */ P("p", {
|
|
551
|
+
className: "text-sm",
|
|
552
|
+
children: e.purchaseDetail
|
|
553
|
+
})] })]
|
|
554
|
+
}),
|
|
555
|
+
e.reason && /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
|
|
556
|
+
className: "text-xs text-muted-foreground mb-1",
|
|
557
|
+
children: "Reason"
|
|
558
|
+
}), /* @__PURE__ */ P("p", {
|
|
559
|
+
className: "text-sm",
|
|
560
|
+
children: e.reason
|
|
561
|
+
})] }),
|
|
562
|
+
e.notes && /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
|
|
563
|
+
className: "text-xs text-muted-foreground mb-1",
|
|
564
|
+
children: "Notes"
|
|
565
|
+
}), /* @__PURE__ */ P("p", {
|
|
566
|
+
className: "text-sm",
|
|
567
|
+
children: e.notes
|
|
568
|
+
})] }),
|
|
569
|
+
e.errorMessage && /* @__PURE__ */ F("div", {
|
|
570
|
+
className: `p-3 ${n.error.bg} border ${n.error.border} rounded-md`,
|
|
571
|
+
children: [/* @__PURE__ */ P("p", {
|
|
572
|
+
className: `text-xs ${n.error.text} mb-1`,
|
|
573
|
+
children: "Error Message"
|
|
574
|
+
}), /* @__PURE__ */ P("p", {
|
|
575
|
+
className: `text-sm ${n.error.text}`,
|
|
576
|
+
children: e.errorMessage
|
|
577
|
+
})]
|
|
578
|
+
}),
|
|
579
|
+
/* @__PURE__ */ F("div", {
|
|
580
|
+
className: "grid grid-cols-2 gap-4 pt-2 border-t border-border",
|
|
581
|
+
children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
|
|
582
|
+
className: "text-xs text-muted-foreground mb-1",
|
|
583
|
+
children: "Created At"
|
|
584
|
+
}), /* @__PURE__ */ P("p", {
|
|
585
|
+
className: "text-sm",
|
|
586
|
+
children: o(e.createdAt)
|
|
587
|
+
})] }), e.processedAt && /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
|
|
588
|
+
className: "text-xs text-muted-foreground mb-1",
|
|
589
|
+
children: "Processed At"
|
|
590
|
+
}), /* @__PURE__ */ P("p", {
|
|
591
|
+
className: "text-sm",
|
|
592
|
+
children: o(e.processedAt)
|
|
593
|
+
})] })]
|
|
594
|
+
}),
|
|
595
|
+
e.retryCount > 0 && /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
|
|
596
|
+
className: "text-xs text-muted-foreground mb-1",
|
|
597
|
+
children: "Retry Count"
|
|
598
|
+
}), /* @__PURE__ */ P("p", {
|
|
599
|
+
className: "text-sm",
|
|
600
|
+
children: e.retryCount
|
|
601
|
+
})] })
|
|
602
|
+
]
|
|
603
|
+
}),
|
|
604
|
+
/* @__PURE__ */ P("div", {
|
|
605
|
+
className: "p-4 border-t border-border",
|
|
606
|
+
children: /* @__PURE__ */ P("button", {
|
|
607
|
+
onClick: t,
|
|
608
|
+
className: "w-full py-2 px-4 bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",
|
|
609
|
+
children: "Close"
|
|
610
|
+
})
|
|
611
|
+
})
|
|
612
|
+
]
|
|
613
|
+
})]
|
|
614
|
+
});
|
|
615
|
+
}, V = {
|
|
616
|
+
PENDING: {
|
|
617
|
+
label: "Pending",
|
|
618
|
+
status: "PENDING"
|
|
619
|
+
},
|
|
620
|
+
COMPLETED: {
|
|
621
|
+
label: "Completed",
|
|
622
|
+
status: "COMPLETED"
|
|
623
|
+
},
|
|
624
|
+
FAILED: {
|
|
625
|
+
label: "Failed",
|
|
626
|
+
status: "FAILED"
|
|
627
|
+
},
|
|
628
|
+
ALL: {
|
|
629
|
+
label: "All",
|
|
630
|
+
status: void 0
|
|
631
|
+
}
|
|
632
|
+
}, H = () => {
|
|
633
|
+
let { t: l } = ne(), d = (e, t) => {
|
|
634
|
+
let n = l(e);
|
|
635
|
+
return n === e ? t : n;
|
|
636
|
+
}, f = c(), [m, g] = h("PENDING"), [_, v] = h(""), [x, C] = h({}), [E, ee] = h(!1), [O, A] = h(null), [M, N] = h(!1), [I, B] = h(!1), [H, U] = h(null), [ce, W] = h(null), { records: G, stats: K, pagination: q, isLoading: le, recordsError: J, unprocessedWebhooks: Y, refetch: X, goToNextPage: ue, goToPreviousPage: de, setFilters: Z, createRefundRecord: fe, processRefund: pe, skipRefund: me, retryRefund: he, createRefundRecordsFromFailedWebhooks: ge, isCreating: _e, isProcessing: ve, isCreatingFromWebhooks: Q } = u({ filters: p(() => ({
|
|
637
|
+
...x,
|
|
638
|
+
status: V[m].status
|
|
639
|
+
}), [
|
|
640
|
+
m,
|
|
641
|
+
x.source,
|
|
642
|
+
x.provider,
|
|
643
|
+
x.billingAccountId,
|
|
644
|
+
x.fromDate,
|
|
645
|
+
x.toDate
|
|
646
|
+
]) });
|
|
647
|
+
if (!f.canViewPayments) return /* @__PURE__ */ P(e, { message: "You don't have permission to view refunds." });
|
|
648
|
+
if (J && s(J)) return /* @__PURE__ */ P("div", {
|
|
649
|
+
className: "p-6",
|
|
650
|
+
children: /* @__PURE__ */ P(i, {
|
|
651
|
+
title: "Server Unavailable",
|
|
652
|
+
message: "Unable to load refunds. The server might be down or experiencing issues.",
|
|
653
|
+
onRetry: () => X(),
|
|
654
|
+
showRetry: !0
|
|
655
|
+
})
|
|
656
|
+
});
|
|
657
|
+
let ye = (e) => {
|
|
658
|
+
g(e), C({}), v("");
|
|
659
|
+
}, $ = (e, t) => {
|
|
660
|
+
if (e === "status") return;
|
|
661
|
+
let n = {
|
|
662
|
+
...x,
|
|
663
|
+
[e]: t || void 0
|
|
664
|
+
};
|
|
665
|
+
C(n), Z({
|
|
666
|
+
...n,
|
|
667
|
+
status: V[m].status
|
|
668
|
+
});
|
|
669
|
+
}, be = async (e) => {
|
|
670
|
+
try {
|
|
671
|
+
await fe(e), N(!1);
|
|
672
|
+
} catch (e) {
|
|
673
|
+
console.error("Failed to create refund:", e);
|
|
674
|
+
}
|
|
675
|
+
}, xe = async (e) => {
|
|
676
|
+
W(e.id);
|
|
677
|
+
try {
|
|
678
|
+
let t = await pe(e.id);
|
|
679
|
+
!t.success && t.error && console.error("Refund processing failed:", t.error);
|
|
680
|
+
} catch (e) {
|
|
681
|
+
console.error("Failed to process refund:", e);
|
|
682
|
+
} finally {
|
|
683
|
+
W(null);
|
|
684
|
+
}
|
|
685
|
+
}, Se = async (e) => {
|
|
686
|
+
if (H) try {
|
|
687
|
+
await me(H.id, e), B(!1), U(null);
|
|
688
|
+
} catch (e) {
|
|
689
|
+
console.error("Failed to skip refund:", e);
|
|
690
|
+
}
|
|
691
|
+
}, Ce = async (e) => {
|
|
692
|
+
W(e.id);
|
|
693
|
+
try {
|
|
694
|
+
let t = await he(e.id);
|
|
695
|
+
!t.success && t.error && console.error("Refund retry failed:", t.error);
|
|
696
|
+
} catch (e) {
|
|
697
|
+
console.error("Failed to retry refund:", e);
|
|
698
|
+
} finally {
|
|
699
|
+
W(null);
|
|
700
|
+
}
|
|
701
|
+
}, we = async () => {
|
|
702
|
+
try {
|
|
703
|
+
await ge();
|
|
704
|
+
} catch (e) {
|
|
705
|
+
console.error("Failed to create refunds from webhooks:", e);
|
|
706
|
+
}
|
|
707
|
+
}, Te = _ ? G.filter((e) => e.gatewayPaymentId.toLowerCase().includes(_.toLowerCase()) || e.gatewayOrderId?.toLowerCase().includes(_.toLowerCase()) || e.reason?.toLowerCase().includes(_.toLowerCase())) : G;
|
|
708
|
+
return le ? /* @__PURE__ */ F("div", {
|
|
709
|
+
className: "space-y-6 p-6",
|
|
710
|
+
children: [
|
|
711
|
+
/* @__PURE__ */ P("div", { className: "h-8 w-48 bg-muted animate-pulse rounded" }),
|
|
712
|
+
/* @__PURE__ */ P("div", {
|
|
713
|
+
className: "grid grid-cols-5 gap-4",
|
|
714
|
+
children: [
|
|
715
|
+
1,
|
|
716
|
+
2,
|
|
717
|
+
3,
|
|
718
|
+
4,
|
|
719
|
+
5
|
|
720
|
+
].map((e) => /* @__PURE__ */ P("div", { className: "h-24 bg-muted animate-pulse rounded-lg" }, e))
|
|
721
|
+
}),
|
|
722
|
+
/* @__PURE__ */ P("div", {
|
|
723
|
+
className: "space-y-2",
|
|
724
|
+
children: [
|
|
725
|
+
1,
|
|
726
|
+
2,
|
|
727
|
+
3,
|
|
728
|
+
4,
|
|
729
|
+
5
|
|
730
|
+
].map((e) => /* @__PURE__ */ P("div", { className: "h-16 bg-muted animate-pulse rounded" }, e))
|
|
731
|
+
})
|
|
732
|
+
]
|
|
733
|
+
}) : /* @__PURE__ */ F("div", {
|
|
734
|
+
className: "space-y-6 p-6",
|
|
735
|
+
children: [
|
|
736
|
+
/* @__PURE__ */ P(t, {
|
|
737
|
+
title: d("billing.refunds.title", "Refund Management"),
|
|
738
|
+
description: "View and manage refund records",
|
|
739
|
+
actions: /* @__PURE__ */ F("div", {
|
|
740
|
+
className: "flex items-center gap-2",
|
|
741
|
+
children: [
|
|
742
|
+
Y.length > 0 && /* @__PURE__ */ F("button", {
|
|
743
|
+
onClick: we,
|
|
744
|
+
disabled: Q,
|
|
745
|
+
className: `inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md border ${n.warning.border} ${n.warning.bg} ${n.warning.text} hover:opacity-90 transition-colors disabled:opacity-50`,
|
|
746
|
+
children: [
|
|
747
|
+
Q ? /* @__PURE__ */ P(T, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ P(S, { className: "w-4 h-4" }),
|
|
748
|
+
"Import ",
|
|
749
|
+
Y.length,
|
|
750
|
+
" Failed Webhooks"
|
|
751
|
+
]
|
|
752
|
+
}),
|
|
753
|
+
/* @__PURE__ */ F("button", {
|
|
754
|
+
onClick: () => X(),
|
|
755
|
+
className: "inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md border border-border bg-background hover:bg-muted/50 transition-colors",
|
|
756
|
+
children: [/* @__PURE__ */ P(D, { className: "w-4 h-4" }), "Refresh"]
|
|
757
|
+
}),
|
|
758
|
+
/* @__PURE__ */ F("button", {
|
|
759
|
+
onClick: () => N(!0),
|
|
760
|
+
className: "inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",
|
|
761
|
+
children: [/* @__PURE__ */ P(te, { className: "w-4 h-4" }), "Create Manual Refund"]
|
|
762
|
+
})
|
|
763
|
+
]
|
|
764
|
+
})
|
|
765
|
+
}),
|
|
766
|
+
/* @__PURE__ */ P("div", {
|
|
767
|
+
className: "border-b border-border",
|
|
768
|
+
children: /* @__PURE__ */ P("div", {
|
|
769
|
+
className: "flex flex-wrap gap-2 sm:gap-0",
|
|
770
|
+
children: Object.keys(V).map((e) => {
|
|
771
|
+
let t = m === e, n = K ? e === "PENDING" ? K.pending : e === "COMPLETED" ? K.completed : e === "FAILED" ? K.failed : K.pending + K.processing + K.completed + K.failed + K.skipped : 0;
|
|
772
|
+
return /* @__PURE__ */ F("button", {
|
|
773
|
+
onClick: () => ye(e),
|
|
774
|
+
className: `flex items-center gap-2 px-4 py-3 text-sm font-medium border-b-2 transition-colors whitespace-nowrap ${t ? "border-primary text-primary" : "border-transparent text-muted-foreground hover:text-foreground hover:border-border"}`,
|
|
775
|
+
children: [V[e].label, K && /* @__PURE__ */ P("span", {
|
|
776
|
+
className: `px-2 py-0.5 text-xs rounded-full ${t ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground"}`,
|
|
777
|
+
children: n
|
|
778
|
+
})]
|
|
779
|
+
}, e);
|
|
780
|
+
})
|
|
781
|
+
})
|
|
782
|
+
}),
|
|
783
|
+
/* @__PURE__ */ F("div", {
|
|
784
|
+
className: "flex flex-col sm:flex-row gap-4",
|
|
785
|
+
children: [
|
|
786
|
+
/* @__PURE__ */ F("div", {
|
|
787
|
+
className: "relative flex-1",
|
|
788
|
+
children: [/* @__PURE__ */ P(k, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ P("input", {
|
|
789
|
+
type: "text",
|
|
790
|
+
placeholder: "Search by payment ID, order ID, or reason...",
|
|
791
|
+
value: _,
|
|
792
|
+
onChange: (e) => v(e.target.value),
|
|
793
|
+
className: "w-full pl-[3.25rem] pr-4 py-2 border border-border rounded-md bg-background"
|
|
794
|
+
})]
|
|
795
|
+
}),
|
|
796
|
+
/* @__PURE__ */ F("button", {
|
|
797
|
+
onClick: () => ee(!E),
|
|
798
|
+
className: `inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md border transition-colors ${E ? "border-primary bg-primary/10 text-primary" : "border-border bg-background hover:bg-muted/50"}`,
|
|
799
|
+
children: [
|
|
800
|
+
/* @__PURE__ */ P(w, { className: "w-4 h-4" }),
|
|
801
|
+
"Filters",
|
|
802
|
+
Object.values(x).filter(Boolean).length > 0 && /* @__PURE__ */ P("span", {
|
|
803
|
+
className: "px-1.5 py-0.5 text-xs rounded-full bg-primary text-primary-foreground",
|
|
804
|
+
children: Object.values(x).filter(Boolean).length
|
|
805
|
+
})
|
|
806
|
+
]
|
|
807
|
+
}),
|
|
808
|
+
Object.values(x).filter(Boolean).length > 0 && /* @__PURE__ */ F("button", {
|
|
809
|
+
onClick: () => {
|
|
810
|
+
C({}), Z({});
|
|
811
|
+
},
|
|
812
|
+
className: "inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md text-muted-foreground hover:text-foreground transition-colors",
|
|
813
|
+
children: [/* @__PURE__ */ P(j, { className: "w-4 h-4" }), "Clear"]
|
|
814
|
+
})
|
|
815
|
+
]
|
|
816
|
+
}),
|
|
817
|
+
E && /* @__PURE__ */ F("div", {
|
|
818
|
+
className: "p-4 border border-border rounded-lg bg-muted/30 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
819
|
+
children: [
|
|
820
|
+
/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
|
|
821
|
+
className: "block text-sm font-medium mb-1",
|
|
822
|
+
children: "Source"
|
|
823
|
+
}), /* @__PURE__ */ F("select", {
|
|
824
|
+
value: x.source || "",
|
|
825
|
+
onChange: (e) => $("source", e.target.value),
|
|
826
|
+
className: "w-full px-3 py-2 border border-border rounded-md bg-background",
|
|
827
|
+
children: [/* @__PURE__ */ P("option", {
|
|
828
|
+
value: "",
|
|
829
|
+
children: "All Sources"
|
|
830
|
+
}), Object.entries(R).map(([e, t]) => /* @__PURE__ */ P("option", {
|
|
831
|
+
value: e,
|
|
832
|
+
children: t
|
|
833
|
+
}, e))]
|
|
834
|
+
})] }),
|
|
835
|
+
/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
|
|
836
|
+
className: "block text-sm font-medium mb-1",
|
|
837
|
+
children: "Provider"
|
|
838
|
+
}), /* @__PURE__ */ F("select", {
|
|
839
|
+
value: x.provider || "",
|
|
840
|
+
onChange: (e) => $("provider", e.target.value),
|
|
841
|
+
className: "w-full px-3 py-2 border border-border rounded-md bg-background",
|
|
842
|
+
children: [/* @__PURE__ */ P("option", {
|
|
843
|
+
value: "",
|
|
844
|
+
children: "All Providers"
|
|
845
|
+
}), re.map((e) => /* @__PURE__ */ P("option", {
|
|
846
|
+
value: e,
|
|
847
|
+
children: e.charAt(0).toUpperCase() + e.slice(1)
|
|
848
|
+
}, e))]
|
|
849
|
+
})] }),
|
|
850
|
+
/* @__PURE__ */ F("div", {
|
|
851
|
+
className: "sm:col-span-2 lg:col-span-1",
|
|
852
|
+
children: [/* @__PURE__ */ P("label", {
|
|
853
|
+
className: "block text-sm font-medium mb-1",
|
|
854
|
+
children: "Date Range"
|
|
855
|
+
}), /* @__PURE__ */ F("div", {
|
|
856
|
+
className: "flex flex-col sm:flex-row items-start sm:items-center gap-2",
|
|
857
|
+
children: [
|
|
858
|
+
/* @__PURE__ */ P("input", {
|
|
859
|
+
type: "date",
|
|
860
|
+
value: x.fromDate ? x.fromDate.split("T")[0] : "",
|
|
861
|
+
onChange: (e) => $("fromDate", e.target.value ? new Date(e.target.value).toISOString() : void 0),
|
|
862
|
+
className: "w-full sm:flex-1 px-2 py-2 border border-border rounded-md bg-background text-sm"
|
|
863
|
+
}),
|
|
864
|
+
/* @__PURE__ */ P("span", {
|
|
865
|
+
className: "text-muted-foreground hidden sm:inline",
|
|
866
|
+
children: "-"
|
|
867
|
+
}),
|
|
868
|
+
/* @__PURE__ */ P("input", {
|
|
869
|
+
type: "date",
|
|
870
|
+
value: x.toDate ? x.toDate.split("T")[0] : "",
|
|
871
|
+
onChange: (e) => $("toDate", e.target.value ? new Date(e.target.value).toISOString() : void 0),
|
|
872
|
+
className: "w-full sm:flex-1 px-2 py-2 border border-border rounded-md bg-background text-sm"
|
|
873
|
+
})
|
|
874
|
+
]
|
|
875
|
+
})]
|
|
876
|
+
})
|
|
877
|
+
]
|
|
878
|
+
}),
|
|
879
|
+
Te.length === 0 ? /* @__PURE__ */ P(r, {
|
|
880
|
+
icon: /* @__PURE__ */ P(D, { className: "w-6 h-6 text-muted-foreground" }),
|
|
881
|
+
title: "No refund records found",
|
|
882
|
+
description: Object.values(x).filter(Boolean).length > 0 ? "Try adjusting your filters." : m === "PENDING" ? "No pending refunds to process." : "Refund records will appear here when created."
|
|
883
|
+
}) : /* @__PURE__ */ P("div", {
|
|
884
|
+
className: "border border-border rounded-lg overflow-hidden",
|
|
885
|
+
children: /* @__PURE__ */ P("div", {
|
|
886
|
+
className: "overflow-x-auto",
|
|
887
|
+
children: /* @__PURE__ */ F("table", {
|
|
888
|
+
className: "w-full min-w-[640px]",
|
|
889
|
+
children: [/* @__PURE__ */ P("thead", {
|
|
890
|
+
className: "bg-muted/50",
|
|
891
|
+
children: /* @__PURE__ */ F("tr", { children: [
|
|
892
|
+
/* @__PURE__ */ P("th", {
|
|
893
|
+
className: "text-left text-sm font-medium text-muted-foreground px-3 py-2 whitespace-nowrap",
|
|
894
|
+
children: "Date"
|
|
895
|
+
}),
|
|
896
|
+
/* @__PURE__ */ P("th", {
|
|
897
|
+
className: "text-left text-sm font-medium text-muted-foreground px-3 py-2 whitespace-nowrap",
|
|
898
|
+
children: "Status"
|
|
899
|
+
}),
|
|
900
|
+
/* @__PURE__ */ P("th", {
|
|
901
|
+
className: "text-left text-sm font-medium text-muted-foreground px-3 py-2 whitespace-nowrap hidden sm:table-cell",
|
|
902
|
+
children: "Source"
|
|
903
|
+
}),
|
|
904
|
+
/* @__PURE__ */ P("th", {
|
|
905
|
+
className: "text-left text-sm font-medium text-muted-foreground px-3 py-2 whitespace-nowrap hidden md:table-cell",
|
|
906
|
+
children: "Provider"
|
|
907
|
+
}),
|
|
908
|
+
/* @__PURE__ */ P("th", {
|
|
909
|
+
className: "text-left text-sm font-medium text-muted-foreground px-3 py-2 whitespace-nowrap",
|
|
910
|
+
children: "Payment ID"
|
|
911
|
+
}),
|
|
912
|
+
/* @__PURE__ */ P("th", {
|
|
913
|
+
className: "text-right text-sm font-medium text-muted-foreground px-3 py-2 whitespace-nowrap",
|
|
914
|
+
children: "Amount"
|
|
915
|
+
}),
|
|
916
|
+
/* @__PURE__ */ P("th", {
|
|
917
|
+
className: "text-left text-sm font-medium text-muted-foreground px-3 py-2 whitespace-nowrap hidden lg:table-cell",
|
|
918
|
+
children: "Reason"
|
|
919
|
+
}),
|
|
920
|
+
/* @__PURE__ */ P("th", { className: "px-2 py-2 w-10" })
|
|
921
|
+
] })
|
|
922
|
+
}), /* @__PURE__ */ P("tbody", {
|
|
923
|
+
className: "divide-y divide-border",
|
|
924
|
+
children: Te.map((e) => {
|
|
925
|
+
let t = L[e.status].icon;
|
|
926
|
+
return /* @__PURE__ */ F("tr", {
|
|
927
|
+
className: "hover:bg-muted/30 transition-colors",
|
|
928
|
+
children: [
|
|
929
|
+
/* @__PURE__ */ P("td", {
|
|
930
|
+
className: "px-3 py-2 text-sm text-foreground whitespace-nowrap",
|
|
931
|
+
children: /* @__PURE__ */ F("div", {
|
|
932
|
+
className: "flex flex-col",
|
|
933
|
+
children: [/* @__PURE__ */ P("span", { children: o(e.createdAt).split(" ")[0] }), /* @__PURE__ */ P("span", {
|
|
934
|
+
className: "text-xs text-muted-foreground",
|
|
935
|
+
children: o(e.createdAt).split(" ")[1]
|
|
936
|
+
})]
|
|
937
|
+
})
|
|
938
|
+
}),
|
|
939
|
+
/* @__PURE__ */ P("td", {
|
|
940
|
+
className: "px-3 py-2 whitespace-nowrap",
|
|
941
|
+
children: /* @__PURE__ */ F("span", {
|
|
942
|
+
className: `inline-flex items-center gap-1 px-2 py-0.5 text-xs font-medium rounded ${z(L[e.status].color)}`,
|
|
943
|
+
children: [/* @__PURE__ */ P(t, { className: "w-3 h-3" }), /* @__PURE__ */ P("span", {
|
|
944
|
+
className: "hidden sm:inline",
|
|
945
|
+
children: L[e.status].label
|
|
946
|
+
})]
|
|
947
|
+
})
|
|
948
|
+
}),
|
|
949
|
+
/* @__PURE__ */ P("td", {
|
|
950
|
+
className: "px-3 py-2 text-sm text-muted-foreground whitespace-nowrap hidden sm:table-cell",
|
|
951
|
+
children: R[e.source]
|
|
952
|
+
}),
|
|
953
|
+
/* @__PURE__ */ P("td", {
|
|
954
|
+
className: "px-3 py-2 text-sm text-foreground capitalize whitespace-nowrap hidden md:table-cell",
|
|
955
|
+
children: e.provider
|
|
956
|
+
}),
|
|
957
|
+
/* @__PURE__ */ P("td", {
|
|
958
|
+
className: "px-3 py-2 text-sm font-mono text-muted-foreground whitespace-nowrap max-w-[120px] sm:max-w-[200px] truncate",
|
|
959
|
+
children: e.gatewayPaymentId
|
|
960
|
+
}),
|
|
961
|
+
/* @__PURE__ */ P("td", {
|
|
962
|
+
className: "px-3 py-2 text-sm text-right font-medium whitespace-nowrap",
|
|
963
|
+
children: a(e.amount, e.currency)
|
|
964
|
+
}),
|
|
965
|
+
/* @__PURE__ */ P("td", {
|
|
966
|
+
className: "px-3 py-2 text-sm text-muted-foreground max-w-[200px] truncate hidden lg:table-cell",
|
|
967
|
+
children: e.reason || "-"
|
|
968
|
+
}),
|
|
969
|
+
/* @__PURE__ */ P("td", {
|
|
970
|
+
className: "px-2 py-2 text-center",
|
|
971
|
+
children: /* @__PURE__ */ P(ie, {
|
|
972
|
+
record: e,
|
|
973
|
+
onViewDetails: () => A(e),
|
|
974
|
+
onProcess: () => xe(e),
|
|
975
|
+
onSkip: () => {
|
|
976
|
+
U(e), B(!0);
|
|
977
|
+
},
|
|
978
|
+
onRetry: () => Ce(e),
|
|
979
|
+
isProcessing: ce === e.id
|
|
980
|
+
})
|
|
981
|
+
})
|
|
982
|
+
]
|
|
983
|
+
}, e.id);
|
|
984
|
+
})
|
|
985
|
+
})]
|
|
986
|
+
})
|
|
987
|
+
})
|
|
988
|
+
}),
|
|
989
|
+
q.totalCount > 0 && /* @__PURE__ */ F("div", {
|
|
990
|
+
className: "flex flex-col sm:flex-row items-center justify-between gap-4 border-t border-border pt-4",
|
|
991
|
+
children: [/* @__PURE__ */ F("p", {
|
|
992
|
+
className: "text-sm text-muted-foreground text-center sm:text-left",
|
|
993
|
+
children: [
|
|
994
|
+
"Showing ",
|
|
995
|
+
q.page * q.pageSize + 1,
|
|
996
|
+
" to",
|
|
997
|
+
" ",
|
|
998
|
+
Math.min((q.page + 1) * q.pageSize, q.totalCount),
|
|
999
|
+
" of",
|
|
1000
|
+
" ",
|
|
1001
|
+
q.totalCount,
|
|
1002
|
+
" refunds"
|
|
1003
|
+
]
|
|
1004
|
+
}), /* @__PURE__ */ F("div", {
|
|
1005
|
+
className: "flex items-center gap-2",
|
|
1006
|
+
children: [
|
|
1007
|
+
/* @__PURE__ */ F("button", {
|
|
1008
|
+
onClick: de,
|
|
1009
|
+
disabled: !q.hasPrevious,
|
|
1010
|
+
className: "inline-flex items-center gap-1 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-muted/50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
|
|
1011
|
+
children: [/* @__PURE__ */ P(y, { className: "w-4 h-4" }), /* @__PURE__ */ P("span", {
|
|
1012
|
+
className: "hidden sm:inline",
|
|
1013
|
+
children: "Previous"
|
|
1014
|
+
})]
|
|
1015
|
+
}),
|
|
1016
|
+
/* @__PURE__ */ F("span", {
|
|
1017
|
+
className: "text-sm text-muted-foreground px-2",
|
|
1018
|
+
children: [
|
|
1019
|
+
/* @__PURE__ */ P("span", {
|
|
1020
|
+
className: "hidden sm:inline",
|
|
1021
|
+
children: "Page "
|
|
1022
|
+
}),
|
|
1023
|
+
q.page + 1,
|
|
1024
|
+
" ",
|
|
1025
|
+
/* @__PURE__ */ P("span", {
|
|
1026
|
+
className: "hidden sm:inline",
|
|
1027
|
+
children: "of"
|
|
1028
|
+
}),
|
|
1029
|
+
/* @__PURE__ */ P("span", {
|
|
1030
|
+
className: "sm:hidden",
|
|
1031
|
+
children: "/"
|
|
1032
|
+
}),
|
|
1033
|
+
" ",
|
|
1034
|
+
Math.ceil(q.totalCount / q.pageSize)
|
|
1035
|
+
]
|
|
1036
|
+
}),
|
|
1037
|
+
/* @__PURE__ */ F("button", {
|
|
1038
|
+
onClick: ue,
|
|
1039
|
+
disabled: !q.hasMore,
|
|
1040
|
+
className: "inline-flex items-center gap-1 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-muted/50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
|
|
1041
|
+
children: [/* @__PURE__ */ P("span", {
|
|
1042
|
+
className: "hidden sm:inline",
|
|
1043
|
+
children: "Next"
|
|
1044
|
+
}), /* @__PURE__ */ P(b, { className: "w-4 h-4" })]
|
|
1045
|
+
})
|
|
1046
|
+
]
|
|
1047
|
+
})]
|
|
1048
|
+
}),
|
|
1049
|
+
/* @__PURE__ */ P(ae, {
|
|
1050
|
+
isOpen: M,
|
|
1051
|
+
onClose: () => N(!1),
|
|
1052
|
+
onSubmit: be,
|
|
1053
|
+
isSubmitting: _e
|
|
1054
|
+
}),
|
|
1055
|
+
/* @__PURE__ */ P(oe, {
|
|
1056
|
+
isOpen: I,
|
|
1057
|
+
record: H,
|
|
1058
|
+
onClose: () => {
|
|
1059
|
+
B(!1), U(null);
|
|
1060
|
+
},
|
|
1061
|
+
onSubmit: Se,
|
|
1062
|
+
isSubmitting: ve
|
|
1063
|
+
}),
|
|
1064
|
+
/* @__PURE__ */ P(se, {
|
|
1065
|
+
record: O,
|
|
1066
|
+
onClose: () => A(null)
|
|
1067
|
+
})
|
|
1068
|
+
]
|
|
1069
|
+
});
|
|
1070
|
+
};
|
|
1071
|
+
//#endregion
|
|
1072
|
+
export { H as RefundsPage };
|
|
1073
|
+
|
|
1074
|
+
//# sourceMappingURL=RefundsPage.js.map
|