@burdenoff/microfe-billing 2026.1031.1 → 2026.1108.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (439) hide show
  1. package/dist/billing/BillingAdminRoutes.d.ts +6 -0
  2. package/dist/billing/BillingAdminRoutes.d.ts.map +1 -0
  3. package/dist/billing/BillingRoot.d.ts +36 -0
  4. package/dist/billing/BillingRoot.d.ts.map +1 -0
  5. package/dist/billing/BillingUserRoutes.d.ts +7 -0
  6. package/dist/billing/BillingUserRoutes.d.ts.map +1 -0
  7. package/dist/billing/hooks/useBillingAccountSelection.d.ts +36 -0
  8. package/dist/billing/hooks/useBillingAccountSelection.d.ts.map +1 -0
  9. package/dist/billing/hooks/useBillingEventEmitter.d.ts +7 -0
  10. package/dist/billing/hooks/useBillingEventEmitter.d.ts.map +1 -0
  11. package/dist/billing/hooks/useBillingNavigate.d.ts +30 -0
  12. package/dist/billing/hooks/useBillingNavigate.d.ts.map +1 -0
  13. package/dist/billing/hooks/useBillingPermissions.d.ts +106 -0
  14. package/dist/billing/hooks/useBillingPermissions.d.ts.map +1 -0
  15. package/dist/billing/hooks/useDefaultBillingCurrency.d.ts +14 -0
  16. package/dist/billing/hooks/useDefaultBillingCurrency.d.ts.map +1 -0
  17. package/dist/billing/hooks/useProducts.d.ts +18 -0
  18. package/dist/billing/hooks/useProducts.d.ts.map +1 -0
  19. package/dist/billing/index.d.ts +31 -0
  20. package/dist/billing/index.d.ts.map +1 -0
  21. package/dist/billing/lib/native-purchases.d.ts +10 -0
  22. package/dist/billing/lib/native-purchases.d.ts.map +1 -0
  23. package/dist/billing/modules/addons/components/FloatingCartDrawer.d.ts +3 -0
  24. package/dist/billing/modules/addons/components/FloatingCartDrawer.d.ts.map +1 -0
  25. package/dist/billing/modules/addons/hooks/index.d.ts +8 -0
  26. package/dist/billing/modules/addons/hooks/index.d.ts.map +1 -0
  27. package/dist/billing/modules/addons/hooks/useAddonPurchaseEligibility.d.ts +23 -0
  28. package/dist/billing/modules/addons/hooks/useAddonPurchaseEligibility.d.ts.map +1 -0
  29. package/dist/billing/modules/addons/hooks/useAddons.d.ts +54 -0
  30. package/dist/billing/modules/addons/hooks/useAddons.d.ts.map +1 -0
  31. package/dist/billing/modules/addons/index.d.ts +7 -0
  32. package/dist/billing/modules/addons/index.d.ts.map +1 -0
  33. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.d.ts +3 -0
  34. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.d.ts.map +1 -0
  35. package/dist/billing/modules/addons/pages/AddonCreatePage.d.ts +3 -0
  36. package/dist/billing/modules/addons/pages/AddonCreatePage.d.ts.map +1 -0
  37. package/dist/billing/modules/addons/pages/AddonDetailPage.d.ts +3 -0
  38. package/dist/billing/modules/addons/pages/AddonDetailPage.d.ts.map +1 -0
  39. package/dist/billing/modules/addons/pages/AddonEditPage.d.ts +3 -0
  40. package/dist/billing/modules/addons/pages/AddonEditPage.d.ts.map +1 -0
  41. package/dist/billing/modules/addons/pages/AddonsBrowsePage.d.ts +3 -0
  42. package/dist/billing/modules/addons/pages/AddonsBrowsePage.d.ts.map +1 -0
  43. package/dist/billing/modules/addons/pages/AddonsListPage.d.ts +3 -0
  44. package/dist/billing/modules/addons/pages/AddonsListPage.d.ts.map +1 -0
  45. package/dist/billing/modules/addons/pages/index.d.ts +11 -0
  46. package/dist/billing/modules/addons/pages/index.d.ts.map +1 -0
  47. package/dist/billing/modules/addons/store/addonCartStore.d.ts +37 -0
  48. package/dist/billing/modules/addons/store/addonCartStore.d.ts.map +1 -0
  49. package/dist/billing/modules/affiliate/api.d.ts +101 -0
  50. package/dist/billing/modules/affiliate/api.d.ts.map +1 -0
  51. package/dist/billing/modules/affiliate/index.d.ts +2 -0
  52. package/dist/billing/modules/affiliate/index.d.ts.map +1 -0
  53. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.d.ts +3 -0
  54. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.d.ts.map +1 -0
  55. package/dist/billing/modules/analytics/index.d.ts +5 -0
  56. package/dist/billing/modules/analytics/index.d.ts.map +1 -0
  57. package/dist/billing/modules/analytics/pages/AnalyticsPage.d.ts +3 -0
  58. package/dist/billing/modules/analytics/pages/AnalyticsPage.d.ts.map +1 -0
  59. package/dist/billing/modules/analytics/pages/index.d.ts +5 -0
  60. package/dist/billing/modules/analytics/pages/index.d.ts.map +1 -0
  61. package/dist/billing/modules/billing/hooks/index.d.ts +12 -0
  62. package/dist/billing/modules/billing/hooks/index.d.ts.map +1 -0
  63. package/dist/billing/modules/billing/hooks/useInvoices.d.ts +76 -0
  64. package/dist/billing/modules/billing/hooks/useInvoices.d.ts.map +1 -0
  65. package/dist/billing/modules/billing/hooks/useOrderCallbacks.d.ts +57 -0
  66. package/dist/billing/modules/billing/hooks/useOrderCallbacks.d.ts.map +1 -0
  67. package/dist/billing/modules/billing/hooks/usePayments.d.ts +61 -0
  68. package/dist/billing/modules/billing/hooks/usePayments.d.ts.map +1 -0
  69. package/dist/billing/modules/billing/hooks/useRefunds.d.ts +216 -0
  70. package/dist/billing/modules/billing/hooks/useRefunds.d.ts.map +1 -0
  71. package/dist/billing/modules/billing/hooks/useTransactions.d.ts +40 -0
  72. package/dist/billing/modules/billing/hooks/useTransactions.d.ts.map +1 -0
  73. package/dist/billing/modules/billing/index.d.ts +7 -0
  74. package/dist/billing/modules/billing/index.d.ts.map +1 -0
  75. package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.d.ts +3 -0
  76. package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.d.ts.map +1 -0
  77. package/dist/billing/modules/billing/pages/InvoiceDetailPage.d.ts +3 -0
  78. package/dist/billing/modules/billing/pages/InvoiceDetailPage.d.ts.map +1 -0
  79. package/dist/billing/modules/billing/pages/InvoicesListPage.d.ts +3 -0
  80. package/dist/billing/modules/billing/pages/InvoicesListPage.d.ts.map +1 -0
  81. package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.d.ts +3 -0
  82. package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.d.ts.map +1 -0
  83. package/dist/billing/modules/billing/pages/PaymentMethodsPage.d.ts +3 -0
  84. package/dist/billing/modules/billing/pages/PaymentMethodsPage.d.ts.map +1 -0
  85. package/dist/billing/modules/billing/pages/RefundIssueLogsPage.d.ts +3 -0
  86. package/dist/billing/modules/billing/pages/RefundIssueLogsPage.d.ts.map +1 -0
  87. package/dist/billing/modules/billing/pages/RefundsPage.d.ts +3 -0
  88. package/dist/billing/modules/billing/pages/RefundsPage.d.ts.map +1 -0
  89. package/dist/billing/modules/billing/pages/TransactionsPage.d.ts +3 -0
  90. package/dist/billing/modules/billing/pages/TransactionsPage.d.ts.map +1 -0
  91. package/dist/billing/modules/billing/pages/UserRefundsPage.d.ts +3 -0
  92. package/dist/billing/modules/billing/pages/UserRefundsPage.d.ts.map +1 -0
  93. package/dist/billing/modules/billing/pages/index.d.ts +14 -0
  94. package/dist/billing/modules/billing/pages/index.d.ts.map +1 -0
  95. package/dist/billing/modules/checkout/components/AutoPayToggle.d.ts +13 -0
  96. package/dist/billing/modules/checkout/components/AutoPayToggle.d.ts.map +1 -0
  97. package/dist/billing/modules/checkout/components/BillingAccountSelector.d.ts +13 -0
  98. package/dist/billing/modules/checkout/components/BillingAccountSelector.d.ts.map +1 -0
  99. package/dist/billing/modules/checkout/components/CompactAutoPayToggle.d.ts +13 -0
  100. package/dist/billing/modules/checkout/components/CompactAutoPayToggle.d.ts.map +1 -0
  101. package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.d.ts +23 -0
  102. package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.d.ts.map +1 -0
  103. package/dist/billing/modules/checkout/components/CreditsAmountInput.d.ts +13 -0
  104. package/dist/billing/modules/checkout/components/CreditsAmountInput.d.ts.map +1 -0
  105. package/dist/billing/modules/checkout/components/CreditsPaymentOption.d.ts +15 -0
  106. package/dist/billing/modules/checkout/components/CreditsPaymentOption.d.ts.map +1 -0
  107. package/dist/billing/modules/checkout/components/CurrencySelector.d.ts +18 -0
  108. package/dist/billing/modules/checkout/components/CurrencySelector.d.ts.map +1 -0
  109. package/dist/billing/modules/checkout/components/NativeCheckoutView.d.ts +13 -0
  110. package/dist/billing/modules/checkout/components/NativeCheckoutView.d.ts.map +1 -0
  111. package/dist/billing/modules/checkout/components/OrderSummary.d.ts +36 -0
  112. package/dist/billing/modules/checkout/components/OrderSummary.d.ts.map +1 -0
  113. package/dist/billing/modules/checkout/components/PaymentProviderSelector.d.ts +18 -0
  114. package/dist/billing/modules/checkout/components/PaymentProviderSelector.d.ts.map +1 -0
  115. package/dist/billing/modules/checkout/components/PromoCodeInput.d.ts +18 -0
  116. package/dist/billing/modules/checkout/components/PromoCodeInput.d.ts.map +1 -0
  117. package/dist/billing/modules/checkout/components/RazorpayPaymentButton.d.ts +34 -0
  118. package/dist/billing/modules/checkout/components/RazorpayPaymentButton.d.ts.map +1 -0
  119. package/dist/billing/modules/checkout/components/SavedCardSelector.d.ts +12 -0
  120. package/dist/billing/modules/checkout/components/SavedCardSelector.d.ts.map +1 -0
  121. package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.d.ts +12 -0
  122. package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.d.ts.map +1 -0
  123. package/dist/billing/modules/checkout/components/StoreShippingSection.d.ts +17 -0
  124. package/dist/billing/modules/checkout/components/StoreShippingSection.d.ts.map +1 -0
  125. package/dist/billing/modules/checkout/components/StripePaymentForm.d.ts +15 -0
  126. package/dist/billing/modules/checkout/components/StripePaymentForm.d.ts.map +1 -0
  127. package/dist/billing/modules/checkout/components/SubscriptionSelector.d.ts +25 -0
  128. package/dist/billing/modules/checkout/components/SubscriptionSelector.d.ts.map +1 -0
  129. package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.d.ts +28 -0
  130. package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.d.ts.map +1 -0
  131. package/dist/billing/modules/checkout/components/WebCheckoutRedirectView.d.ts +11 -0
  132. package/dist/billing/modules/checkout/components/WebCheckoutRedirectView.d.ts.map +1 -0
  133. package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.d.ts +30 -0
  134. package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.d.ts.map +1 -0
  135. package/dist/billing/modules/checkout/components/index.d.ts +24 -0
  136. package/dist/billing/modules/checkout/components/index.d.ts.map +1 -0
  137. package/dist/billing/modules/checkout/hooks/index.d.ts +9 -0
  138. package/dist/billing/modules/checkout/hooks/index.d.ts.map +1 -0
  139. package/dist/billing/modules/checkout/hooks/useCheckout.d.ts +78 -0
  140. package/dist/billing/modules/checkout/hooks/useCheckout.d.ts.map +1 -0
  141. package/dist/billing/modules/checkout/hooks/useNativeCheckout.d.ts +25 -0
  142. package/dist/billing/modules/checkout/hooks/useNativeCheckout.d.ts.map +1 -0
  143. package/dist/billing/modules/checkout/hooks/usePaymentProviders.d.ts +19 -0
  144. package/dist/billing/modules/checkout/hooks/usePaymentProviders.d.ts.map +1 -0
  145. package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.d.ts +59 -0
  146. package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.d.ts.map +1 -0
  147. package/dist/billing/modules/checkout/hooks/useStoreShipping.d.ts +122 -0
  148. package/dist/billing/modules/checkout/hooks/useStoreShipping.d.ts.map +1 -0
  149. package/dist/billing/modules/checkout/index.d.ts +24 -0
  150. package/dist/billing/modules/checkout/index.d.ts.map +1 -0
  151. package/dist/billing/modules/checkout/pages/CheckoutPage.d.ts +3 -0
  152. package/dist/billing/modules/checkout/pages/CheckoutPage.d.ts.map +1 -0
  153. package/dist/billing/modules/checkout/pages/index.d.ts +5 -0
  154. package/dist/billing/modules/checkout/pages/index.d.ts.map +1 -0
  155. package/dist/billing/modules/checkout/types/index.d.ts +279 -0
  156. package/dist/billing/modules/checkout/types/index.d.ts.map +1 -0
  157. package/dist/billing/modules/checkout/utils/storeOrder.d.ts +19 -0
  158. package/dist/billing/modules/checkout/utils/storeOrder.d.ts.map +1 -0
  159. package/dist/billing/modules/coupons/index.d.ts +5 -0
  160. package/dist/billing/modules/coupons/index.d.ts.map +1 -0
  161. package/dist/billing/modules/coupons/pages/CouponDetailPage.d.ts +3 -0
  162. package/dist/billing/modules/coupons/pages/CouponDetailPage.d.ts.map +1 -0
  163. package/dist/billing/modules/coupons/pages/CouponsListPage.d.ts +3 -0
  164. package/dist/billing/modules/coupons/pages/CouponsListPage.d.ts.map +1 -0
  165. package/dist/billing/modules/coupons/pages/CreateCouponPage.d.ts +3 -0
  166. package/dist/billing/modules/coupons/pages/CreateCouponPage.d.ts.map +1 -0
  167. package/dist/billing/modules/coupons/pages/EditCouponPage.d.ts +3 -0
  168. package/dist/billing/modules/coupons/pages/EditCouponPage.d.ts.map +1 -0
  169. package/dist/billing/modules/coupons/pages/index.d.ts +8 -0
  170. package/dist/billing/modules/coupons/pages/index.d.ts.map +1 -0
  171. package/dist/billing/modules/credits/hooks/index.d.ts +5 -0
  172. package/dist/billing/modules/credits/hooks/index.d.ts.map +1 -0
  173. package/dist/billing/modules/credits/hooks/useCredits.d.ts +74 -0
  174. package/dist/billing/modules/credits/hooks/useCredits.d.ts.map +1 -0
  175. package/dist/billing/modules/credits/index.d.ts +6 -0
  176. package/dist/billing/modules/credits/index.d.ts.map +1 -0
  177. package/dist/billing/modules/credits/pages/AdminCreditsPage.d.ts +3 -0
  178. package/dist/billing/modules/credits/pages/AdminCreditsPage.d.ts.map +1 -0
  179. package/dist/billing/modules/credits/pages/CreditTransactionsPage.d.ts +3 -0
  180. package/dist/billing/modules/credits/pages/CreditTransactionsPage.d.ts.map +1 -0
  181. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.d.ts +3 -0
  182. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.d.ts.map +1 -0
  183. package/dist/billing/modules/credits/pages/CreditsPage.d.ts +3 -0
  184. package/dist/billing/modules/credits/pages/CreditsPage.d.ts.map +1 -0
  185. package/dist/billing/modules/credits/pages/index.d.ts +8 -0
  186. package/dist/billing/modules/credits/pages/index.d.ts.map +1 -0
  187. package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.d.ts +15 -0
  188. package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.d.ts.map +1 -0
  189. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.d.ts +71 -0
  190. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.d.ts.map +1 -0
  191. package/dist/billing/modules/dashboard/components/BillingAccountCard.d.ts +17 -0
  192. package/dist/billing/modules/dashboard/components/BillingAccountCard.d.ts.map +1 -0
  193. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.d.ts +12 -0
  194. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.d.ts.map +1 -0
  195. package/dist/billing/modules/dashboard/components/PaymentMethodsSection.d.ts +16 -0
  196. package/dist/billing/modules/dashboard/components/PaymentMethodsSection.d.ts.map +1 -0
  197. package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.d.ts +28 -0
  198. package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.d.ts.map +1 -0
  199. package/dist/billing/modules/dashboard/components/index.d.ts +10 -0
  200. package/dist/billing/modules/dashboard/components/index.d.ts.map +1 -0
  201. package/dist/billing/modules/dashboard/hooks/index.d.ts +6 -0
  202. package/dist/billing/modules/dashboard/hooks/index.d.ts.map +1 -0
  203. package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.d.ts +16 -0
  204. package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.d.ts.map +1 -0
  205. package/dist/billing/modules/dashboard/hooks/useDashboard.d.ts +144 -0
  206. package/dist/billing/modules/dashboard/hooks/useDashboard.d.ts.map +1 -0
  207. package/dist/billing/modules/dashboard/index.d.ts +8 -0
  208. package/dist/billing/modules/dashboard/index.d.ts.map +1 -0
  209. package/dist/billing/modules/dashboard/pages/OverviewPage.d.ts +3 -0
  210. package/dist/billing/modules/dashboard/pages/OverviewPage.d.ts.map +1 -0
  211. package/dist/billing/modules/dashboard/pages/index.d.ts +5 -0
  212. package/dist/billing/modules/dashboard/pages/index.d.ts.map +1 -0
  213. package/dist/billing/modules/discounts/index.d.ts +6 -0
  214. package/dist/billing/modules/discounts/index.d.ts.map +1 -0
  215. package/dist/billing/modules/discounts/pages/DiscountsListPage.d.ts +3 -0
  216. package/dist/billing/modules/discounts/pages/DiscountsListPage.d.ts.map +1 -0
  217. package/dist/billing/modules/discounts/pages/index.d.ts +6 -0
  218. package/dist/billing/modules/discounts/pages/index.d.ts.map +1 -0
  219. package/dist/billing/modules/earnings/api.d.ts +226 -0
  220. package/dist/billing/modules/earnings/api.d.ts.map +1 -0
  221. package/dist/billing/modules/earnings/api.js +2 -2
  222. package/dist/billing/modules/earnings/api.js.map +1 -1
  223. package/dist/billing/modules/earnings/index.d.ts +6 -0
  224. package/dist/billing/modules/earnings/index.d.ts.map +1 -0
  225. package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.d.ts +3 -0
  226. package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.d.ts.map +1 -0
  227. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.d.ts +3 -0
  228. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.d.ts.map +1 -0
  229. package/dist/billing/modules/earnings/pages/EarningsPage.d.ts +3 -0
  230. package/dist/billing/modules/earnings/pages/EarningsPage.d.ts.map +1 -0
  231. package/dist/billing/modules/earnings/pages/PayoutAdminPage.d.ts +3 -0
  232. package/dist/billing/modules/earnings/pages/PayoutAdminPage.d.ts.map +1 -0
  233. package/dist/billing/modules/earnings/pages/PayoutsPage.d.ts +3 -0
  234. package/dist/billing/modules/earnings/pages/PayoutsPage.d.ts.map +1 -0
  235. package/dist/billing/modules/earnings/pages/PayoutsPage.js +240 -202
  236. package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
  237. package/dist/billing/modules/earnings/payoutAccountStatus.d.ts +28 -0
  238. package/dist/billing/modules/earnings/payoutAccountStatus.d.ts.map +1 -0
  239. package/dist/billing/modules/earnings/payoutAccountStatus.js +47 -0
  240. package/dist/billing/modules/earnings/payoutAccountStatus.js.map +1 -0
  241. package/dist/billing/modules/plans/constants/enterprise.d.ts +20 -0
  242. package/dist/billing/modules/plans/constants/enterprise.d.ts.map +1 -0
  243. package/dist/billing/modules/plans/constants/featuredQuotas.d.ts +10 -0
  244. package/dist/billing/modules/plans/constants/featuredQuotas.d.ts.map +1 -0
  245. package/dist/billing/modules/plans/hooks/index.d.ts +7 -0
  246. package/dist/billing/modules/plans/hooks/index.d.ts.map +1 -0
  247. package/dist/billing/modules/plans/hooks/usePlans.d.ts +45 -0
  248. package/dist/billing/modules/plans/hooks/usePlans.d.ts.map +1 -0
  249. package/dist/billing/modules/plans/hooks/useQuotas.d.ts +26 -0
  250. package/dist/billing/modules/plans/hooks/useQuotas.d.ts.map +1 -0
  251. package/dist/billing/modules/plans/index.d.ts +7 -0
  252. package/dist/billing/modules/plans/index.d.ts.map +1 -0
  253. package/dist/billing/modules/plans/pages/PlanAssignFreePage.d.ts +3 -0
  254. package/dist/billing/modules/plans/pages/PlanAssignFreePage.d.ts.map +1 -0
  255. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.d.ts +3 -0
  256. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.d.ts.map +1 -0
  257. package/dist/billing/modules/plans/pages/PlanCreatePage.d.ts +3 -0
  258. package/dist/billing/modules/plans/pages/PlanCreatePage.d.ts.map +1 -0
  259. package/dist/billing/modules/plans/pages/PlanDetailPage.d.ts +3 -0
  260. package/dist/billing/modules/plans/pages/PlanDetailPage.d.ts.map +1 -0
  261. package/dist/billing/modules/plans/pages/PlanEditPage.d.ts +3 -0
  262. package/dist/billing/modules/plans/pages/PlanEditPage.d.ts.map +1 -0
  263. package/dist/billing/modules/plans/pages/PlansBrowsePage.d.ts +3 -0
  264. package/dist/billing/modules/plans/pages/PlansBrowsePage.d.ts.map +1 -0
  265. package/dist/billing/modules/plans/pages/PlansListPage.d.ts +3 -0
  266. package/dist/billing/modules/plans/pages/PlansListPage.d.ts.map +1 -0
  267. package/dist/billing/modules/plans/pages/index.d.ts +12 -0
  268. package/dist/billing/modules/plans/pages/index.d.ts.map +1 -0
  269. package/dist/billing/modules/plans/utils/currencyPriceOverrides.d.ts +3 -0
  270. package/dist/billing/modules/plans/utils/currencyPriceOverrides.d.ts.map +1 -0
  271. package/dist/billing/modules/plans/utils/planSelector.d.ts +3 -0
  272. package/dist/billing/modules/plans/utils/planSelector.d.ts.map +1 -0
  273. package/dist/billing/modules/promotions/index.d.ts +2 -0
  274. package/dist/billing/modules/promotions/index.d.ts.map +1 -0
  275. package/dist/billing/modules/promotions/pages/CreatePromotionPage.d.ts +3 -0
  276. package/dist/billing/modules/promotions/pages/CreatePromotionPage.d.ts.map +1 -0
  277. package/dist/billing/modules/promotions/pages/PromotionsListPage.d.ts +3 -0
  278. package/dist/billing/modules/promotions/pages/PromotionsListPage.d.ts.map +1 -0
  279. package/dist/billing/modules/promotions/pages/index.d.ts +3 -0
  280. package/dist/billing/modules/promotions/pages/index.d.ts.map +1 -0
  281. package/dist/billing/modules/quota/hooks/index.d.ts +6 -0
  282. package/dist/billing/modules/quota/hooks/index.d.ts.map +1 -0
  283. package/dist/billing/modules/quota/hooks/useQuota.d.ts +132 -0
  284. package/dist/billing/modules/quota/hooks/useQuota.d.ts.map +1 -0
  285. package/dist/billing/modules/quota/hooks/useQuotaTemplates.d.ts +38 -0
  286. package/dist/billing/modules/quota/hooks/useQuotaTemplates.d.ts.map +1 -0
  287. package/dist/billing/modules/quota/index.d.ts +6 -0
  288. package/dist/billing/modules/quota/index.d.ts.map +1 -0
  289. package/dist/billing/modules/quota/pages/QuotaAssignFreePage.d.ts +3 -0
  290. package/dist/billing/modules/quota/pages/QuotaAssignFreePage.d.ts.map +1 -0
  291. package/dist/billing/modules/quota/pages/QuotaPage.d.ts +3 -0
  292. package/dist/billing/modules/quota/pages/QuotaPage.d.ts.map +1 -0
  293. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.d.ts +3 -0
  294. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.d.ts.map +1 -0
  295. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.d.ts +3 -0
  296. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.d.ts.map +1 -0
  297. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.d.ts +3 -0
  298. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.d.ts.map +1 -0
  299. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.d.ts +3 -0
  300. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.d.ts.map +1 -0
  301. package/dist/billing/modules/quota/pages/index.d.ts +10 -0
  302. package/dist/billing/modules/quota/pages/index.d.ts.map +1 -0
  303. package/dist/billing/modules/quota/utils/quotaSelector.d.ts +4 -0
  304. package/dist/billing/modules/quota/utils/quotaSelector.d.ts.map +1 -0
  305. package/dist/billing/modules/settings/index.d.ts +5 -0
  306. package/dist/billing/modules/settings/index.d.ts.map +1 -0
  307. package/dist/billing/modules/settings/pages/SettingsPage.d.ts +3 -0
  308. package/dist/billing/modules/settings/pages/SettingsPage.d.ts.map +1 -0
  309. package/dist/billing/modules/settings/pages/TeamPermissionsPage.d.ts +3 -0
  310. package/dist/billing/modules/settings/pages/TeamPermissionsPage.d.ts.map +1 -0
  311. package/dist/billing/modules/settings/pages/index.d.ts +6 -0
  312. package/dist/billing/modules/settings/pages/index.d.ts.map +1 -0
  313. package/dist/billing/modules/store/graphql/index.d.ts +6 -0
  314. package/dist/billing/modules/store/graphql/index.d.ts.map +1 -0
  315. package/dist/billing/modules/store/index.d.ts +6 -0
  316. package/dist/billing/modules/store/index.d.ts.map +1 -0
  317. package/dist/billing/modules/store/pages/StoreCheckoutPage.d.ts +10 -0
  318. package/dist/billing/modules/store/pages/StoreCheckoutPage.d.ts.map +1 -0
  319. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.d.ts +11 -0
  320. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.d.ts.map +1 -0
  321. package/dist/billing/modules/subscriptions/hooks/index.d.ts +6 -0
  322. package/dist/billing/modules/subscriptions/hooks/index.d.ts.map +1 -0
  323. package/dist/billing/modules/subscriptions/hooks/useSubscriptions.d.ts +91 -0
  324. package/dist/billing/modules/subscriptions/hooks/useSubscriptions.d.ts.map +1 -0
  325. package/dist/billing/modules/subscriptions/index.d.ts +7 -0
  326. package/dist/billing/modules/subscriptions/index.d.ts.map +1 -0
  327. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.d.ts +3 -0
  328. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.d.ts.map +1 -0
  329. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.d.ts +3 -0
  330. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.d.ts.map +1 -0
  331. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.d.ts +3 -0
  332. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.d.ts.map +1 -0
  333. package/dist/billing/modules/subscriptions/pages/index.d.ts +8 -0
  334. package/dist/billing/modules/subscriptions/pages/index.d.ts.map +1 -0
  335. package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.d.ts +7 -0
  336. package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.d.ts.map +1 -0
  337. package/dist/billing/modules/usage/hooks/index.d.ts +6 -0
  338. package/dist/billing/modules/usage/hooks/index.d.ts.map +1 -0
  339. package/dist/billing/modules/usage/hooks/useUsage.d.ts +316 -0
  340. package/dist/billing/modules/usage/hooks/useUsage.d.ts.map +1 -0
  341. package/dist/billing/modules/usage/hooks/useWorkspaceAiSpend.d.ts +13 -0
  342. package/dist/billing/modules/usage/hooks/useWorkspaceAiSpend.d.ts.map +1 -0
  343. package/dist/billing/modules/usage/index.d.ts +6 -0
  344. package/dist/billing/modules/usage/index.d.ts.map +1 -0
  345. package/dist/billing/modules/usage/pages/UsagePage.d.ts +3 -0
  346. package/dist/billing/modules/usage/pages/UsagePage.d.ts.map +1 -0
  347. package/dist/billing/modules/usage/pages/index.d.ts +5 -0
  348. package/dist/billing/modules/usage/pages/index.d.ts.map +1 -0
  349. package/dist/billing/modules/usage/utils/aiSpend.d.ts +71 -0
  350. package/dist/billing/modules/usage/utils/aiSpend.d.ts.map +1 -0
  351. package/dist/billing/providers/BillingProvider.d.ts +20 -0
  352. package/dist/billing/providers/BillingProvider.d.ts.map +1 -0
  353. package/dist/billing/shared/components/AccessDenied.d.ts +7 -0
  354. package/dist/billing/shared/components/AccessDenied.d.ts.map +1 -0
  355. package/dist/billing/shared/components/ActorIdentity.d.ts +9 -0
  356. package/dist/billing/shared/components/ActorIdentity.d.ts.map +1 -0
  357. package/dist/billing/shared/components/CurrencyPriceOverridesEditor.d.ts +10 -0
  358. package/dist/billing/shared/components/CurrencyPriceOverridesEditor.d.ts.map +1 -0
  359. package/dist/billing/shared/components/EmptyState.d.ts +10 -0
  360. package/dist/billing/shared/components/EmptyState.d.ts.map +1 -0
  361. package/dist/billing/shared/components/GeoPricingOverridesEditor.d.ts +10 -0
  362. package/dist/billing/shared/components/GeoPricingOverridesEditor.d.ts.map +1 -0
  363. package/dist/billing/shared/components/PageHeader.d.ts +10 -0
  364. package/dist/billing/shared/components/PageHeader.d.ts.map +1 -0
  365. package/dist/billing/shared/components/PushPermissionNudge.d.ts +7 -0
  366. package/dist/billing/shared/components/PushPermissionNudge.d.ts.map +1 -0
  367. package/dist/billing/shared/components/ServerError.d.ts +10 -0
  368. package/dist/billing/shared/components/ServerError.d.ts.map +1 -0
  369. package/dist/billing/shared/components/StatCard.d.ts +14 -0
  370. package/dist/billing/shared/components/StatCard.d.ts.map +1 -0
  371. package/dist/billing/shared/components/index.d.ts +13 -0
  372. package/dist/billing/shared/components/index.d.ts.map +1 -0
  373. package/dist/billing/shared/hooks/index.d.ts +4 -0
  374. package/dist/billing/shared/hooks/index.d.ts.map +1 -0
  375. package/dist/billing/shared/hooks/useActorProfiles.d.ts +17 -0
  376. package/dist/billing/shared/hooks/useActorProfiles.d.ts.map +1 -0
  377. package/dist/billing/shared/hooks/useTr.d.ts +17 -0
  378. package/dist/billing/shared/hooks/useTr.d.ts.map +1 -0
  379. package/dist/billing/shared/index.d.ts +9 -0
  380. package/dist/billing/shared/index.d.ts.map +1 -0
  381. package/dist/billing/shared/types/graphql.d.ts +946 -0
  382. package/dist/billing/shared/types/graphql.d.ts.map +1 -0
  383. package/dist/billing/shared/types/index.d.ts +101 -0
  384. package/dist/billing/shared/types/index.d.ts.map +1 -0
  385. package/dist/billing/shared/ui/Card.d.ts +17 -0
  386. package/dist/billing/shared/ui/Card.d.ts.map +1 -0
  387. package/dist/billing/shared/ui/MetricCard.d.ts +20 -0
  388. package/dist/billing/shared/ui/MetricCard.d.ts.map +1 -0
  389. package/dist/billing/shared/ui/ProgressBar.d.ts +15 -0
  390. package/dist/billing/shared/ui/ProgressBar.d.ts.map +1 -0
  391. package/dist/billing/shared/ui/SectionHeader.d.ts +15 -0
  392. package/dist/billing/shared/ui/SectionHeader.d.ts.map +1 -0
  393. package/dist/billing/shared/ui/StatusPill.d.ts +14 -0
  394. package/dist/billing/shared/ui/StatusPill.d.ts.map +1 -0
  395. package/dist/billing/shared/ui/index.d.ts +13 -0
  396. package/dist/billing/shared/ui/index.d.ts.map +1 -0
  397. package/dist/billing/shared/utils/directActivityGraphql.d.ts +12 -0
  398. package/dist/billing/shared/utils/directActivityGraphql.d.ts.map +1 -0
  399. package/dist/billing/shared/utils/directBillingGraphql.d.ts +12 -0
  400. package/dist/billing/shared/utils/directBillingGraphql.d.ts.map +1 -0
  401. package/dist/billing/shared/utils/error.d.ts +30 -0
  402. package/dist/billing/shared/utils/error.d.ts.map +1 -0
  403. package/dist/billing/shared/utils/format.d.ts +33 -0
  404. package/dist/billing/shared/utils/format.d.ts.map +1 -0
  405. package/dist/billing/shared/utils/gatewayGraphql.d.ts +14 -0
  406. package/dist/billing/shared/utils/gatewayGraphql.d.ts.map +1 -0
  407. package/dist/billing/shared/utils/index.d.ts +14 -0
  408. package/dist/billing/shared/utils/index.d.ts.map +1 -0
  409. package/dist/billing/shared/utils/navigation.d.ts +2 -0
  410. package/dist/billing/shared/utils/navigation.d.ts.map +1 -0
  411. package/dist/billing/shared/utils/paymentTheme.d.ts +18 -0
  412. package/dist/billing/shared/utils/paymentTheme.d.ts.map +1 -0
  413. package/dist/billing/shared/utils/planFeatureQuantity.d.ts +40 -0
  414. package/dist/billing/shared/utils/planFeatureQuantity.d.ts.map +1 -0
  415. package/dist/billing/shared/utils/status.d.ts +27 -0
  416. package/dist/billing/shared/utils/status.d.ts.map +1 -0
  417. package/dist/billing/shared/utils/tokens.d.ts +156 -0
  418. package/dist/billing/shared/utils/tokens.d.ts.map +1 -0
  419. package/dist/billing/translations/en.d.ts +534 -0
  420. package/dist/billing/translations/en.d.ts.map +1 -0
  421. package/dist/billing/types/index.d.ts +275 -0
  422. package/dist/billing/types/index.d.ts.map +1 -0
  423. package/dist/dev/main.d.ts +1 -0
  424. package/dist/dev/main.d.ts.map +1 -0
  425. package/dist/generated/global-operations.d.ts +10857 -0
  426. package/dist/generated/global-operations.d.ts.map +1 -0
  427. package/dist/generated/global-operations.js +1 -0
  428. package/dist/generated/global-operations.js.map +1 -1
  429. package/dist/generated/global-types.d.ts +26958 -0
  430. package/dist/generated/global-types.d.ts.map +1 -0
  431. package/dist/generated/wspace-operations.d.ts +261 -0
  432. package/dist/generated/wspace-operations.d.ts.map +1 -0
  433. package/dist/generated/wspace-types.d.ts +49193 -0
  434. package/dist/generated/wspace-types.d.ts.map +1 -0
  435. package/dist/index.d.ts +8 -0
  436. package/dist/index.d.ts.map +1 -0
  437. package/dist/utils/nativeBridge.d.ts +3 -0
  438. package/dist/utils/nativeBridge.d.ts.map +1 -0
  439. package/package.json +2 -2
@@ -0,0 +1,101 @@
1
+ export interface AffiliateRewardRule {
2
+ id: string;
3
+ metric: 'VISIT' | 'SIGNUP' | 'PAID_CONVERSION' | 'STORE_PURCHASE';
4
+ rewardType: 'FIXED_AMOUNT' | 'PERCENTAGE' | 'CREDITS';
5
+ rewardValue: number;
6
+ rewardCredits?: number | null;
7
+ currency: string;
8
+ }
9
+ export interface AffiliateCode {
10
+ id: string;
11
+ ownerUserId: string;
12
+ orgId?: string | null;
13
+ code: string;
14
+ label?: string | null;
15
+ description?: string | null;
16
+ notes?: string | null;
17
+ productSlug: string;
18
+ destinationPath?: string | null;
19
+ destinationUrl?: string | null;
20
+ status: 'ACTIVE' | 'INACTIVE';
21
+ totalVisits: number;
22
+ totalSignups: number;
23
+ totalPaidConversions: number;
24
+ totalStorePurchases: number;
25
+ totalRevenueAmount: number;
26
+ totalRewardAmount: number;
27
+ rewardRules: AffiliateRewardRule[];
28
+ createdAt: string;
29
+ updatedAt: string;
30
+ }
31
+ export interface AffiliateJourney {
32
+ id: string;
33
+ codeId: string;
34
+ codeValue: string;
35
+ anonymousId: string;
36
+ sessionId: string;
37
+ identifiedUserId?: string | null;
38
+ productSlug: string;
39
+ landingPath?: string | null;
40
+ currentPath?: string | null;
41
+ geographyCountry?: string | null;
42
+ mode?: string | null;
43
+ firstVisitedAt: string;
44
+ lastVisitedAt: string;
45
+ status: 'ANONYMOUS' | 'IDENTIFIED' | 'CONVERTED';
46
+ }
47
+ export interface AffiliateAnalyticsSummary {
48
+ totalCodes: number;
49
+ totalVisits: number;
50
+ totalJourneys: number;
51
+ totalSignups: number;
52
+ totalPaidConversions: number;
53
+ totalStorePurchases: number;
54
+ totalRevenueAmount: number;
55
+ totalRewardAmount: number;
56
+ }
57
+ interface GatewayContext {
58
+ apiGatewayUrl?: string;
59
+ authToken?: string;
60
+ orgId?: string;
61
+ }
62
+ export declare function fetchMyAffiliateCodes(_context: GatewayContext): Promise<AffiliateCode[]>;
63
+ export declare function fetchMyAffiliateAnalytics(_context: GatewayContext): Promise<AffiliateAnalyticsSummary>;
64
+ export declare function fetchMyAffiliateJourneys(_context: GatewayContext): Promise<AffiliateJourney[]>;
65
+ export declare function createAffiliateCode(_input: {
66
+ label?: string;
67
+ description?: string;
68
+ notes?: string;
69
+ productSlug: string;
70
+ destinationPath?: string;
71
+ destinationUrl?: string;
72
+ }, _context: GatewayContext): Promise<AffiliateCode>;
73
+ export declare function updateAffiliateCode(_id: string, _input: {
74
+ label?: string;
75
+ description?: string;
76
+ notes?: string;
77
+ destinationPath?: string;
78
+ destinationUrl?: string;
79
+ }, _context: GatewayContext): Promise<AffiliateCode>;
80
+ export declare function deactivateAffiliateCode(_id: string, _context: GatewayContext): Promise<Pick<AffiliateCode, 'id' | 'status'>>;
81
+ export declare function addAffiliateCodeNote(_codeId: string, _note: string, _context: GatewayContext): Promise<{
82
+ id: string;
83
+ }>;
84
+ export declare function recordAffiliateEvent(_input: {
85
+ journeyId?: string;
86
+ codeId?: string;
87
+ eventType: 'VISIT' | 'SIGNUP' | 'PAID_CONVERSION' | 'STORE_PURCHASE';
88
+ productSlug: string;
89
+ actorUserId?: string;
90
+ orderId?: string;
91
+ billingAccountId?: string;
92
+ storeOrderId?: string;
93
+ valueAmount?: number;
94
+ currency?: string;
95
+ mode?: string;
96
+ metadata?: Record<string, unknown>;
97
+ }, _context: GatewayContext): Promise<{
98
+ id: string;
99
+ }>;
100
+ export {};
101
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/billing/modules/affiliate/api.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,OAAO,GAAG,QAAQ,GAAG,iBAAiB,GAAG,gBAAgB,CAAC;IAClE,UAAU,EAAE,cAAc,GAAG,YAAY,GAAG,SAAS,CAAC;IACtD,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ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+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/billing/modules/affiliate/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ export declare const AffiliateDashboardPage: FC;
3
+ //# sourceMappingURL=AffiliateDashboardPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AffiliateDashboardPage.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/affiliate/pages/AffiliateDashboardPage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6C,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AA6C3E,eAAO,MAAM,sBAAsB,EAAE,EAibpC,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Analytics Module
3
+ */
4
+ export * from './pages';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/billing/modules/analytics/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,SAAS,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ export declare const AnalyticsPage: FC;
3
+ //# sourceMappingURL=AnalyticsPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnalyticsPage.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/analytics/pages/AnalyticsPage.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAqB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAuLnD,eAAO,MAAM,aAAa,EAAE,EAsa3B,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Analytics Module - Pages
3
+ */
4
+ export { AnalyticsPage } from './AnalyticsPage';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/analytics/pages/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Billing Module - Hooks
3
+ * Re-exports all hooks for the Billing module
4
+ */
5
+ export { useInvoices, useInvoice, useInvoiceByNumber, useInvoiceMutations } from './useInvoices';
6
+ export { usePayments, usePayment, usePaymentMethods, useDefaultPaymentMethod, usePaymentMethodMutations, } from './usePayments';
7
+ export { useTransactions } from './useTransactions';
8
+ export { useRefunds, useRefundRecords, usePendingRefunds, useRefundStats, useRefundRecord, useUnprocessedFailedWebhooks, useBillingWebhookLogs, useRefundMutations, } from './useRefunds';
9
+ export type { RefundRecord, RefundStats, RefundRecordStatus, RefundSource, RefundRecordFilters, CreateRefundRecordInput, ProcessRefundResult, WebhookLog, BillingWebhookLogFilters, } from './useRefunds';
10
+ export { useOrderCallbacks, useOrderCallbackMutations } from './useOrderCallbacks';
11
+ export type { OrderCallback, OrderCallbackFilters } from './useOrderCallbacks';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/billing/hooks/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEjG,OAAO,EACL,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,4BAA4B,EAC5B,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,EACnB,UAAU,EACV,wBAAwB,GACzB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAEnF,YAAY,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,76 @@
1
+ import { Invoice, InvoiceStatus } from '../../../shared/types';
2
+ interface UseInvoicesOptions {
3
+ status?: InvoiceStatus;
4
+ billingAccountId?: string;
5
+ }
6
+ interface UseInvoicesResult {
7
+ invoices: Invoice[];
8
+ openInvoices: Invoice[];
9
+ paidInvoices: Invoice[];
10
+ isLoading: boolean;
11
+ error: Error | undefined;
12
+ refetch: () => Promise<void>;
13
+ }
14
+ interface UsePaginatedInvoicesOptions {
15
+ status?: InvoiceStatus;
16
+ billingAccountId?: string;
17
+ page?: number;
18
+ pageSize?: number;
19
+ search?: string;
20
+ }
21
+ interface UsePaginatedInvoicesResult {
22
+ invoices: Invoice[];
23
+ totalCount: number;
24
+ hasMore: boolean;
25
+ page: number;
26
+ pageSize: number;
27
+ totalPages: number;
28
+ isLoading: boolean;
29
+ error: Error | undefined;
30
+ refetch: () => Promise<void>;
31
+ }
32
+ interface UseInvoiceResult {
33
+ invoice: Invoice | null;
34
+ isLoading: boolean;
35
+ error: Error | undefined;
36
+ refetch: () => Promise<void>;
37
+ }
38
+ interface UseInvoiceMutationsResult {
39
+ generateInvoice: (subscriptionId: string, billingAccountId: string) => Promise<Invoice>;
40
+ payInvoice: (invoiceId: string, paymentMethodId: string, billingAccountId: string) => Promise<Invoice>;
41
+ voidInvoice: (invoiceId: string, billingAccountId: string) => Promise<Invoice>;
42
+ /**
43
+ * Retry invoice generation for a successful transaction that never got an
44
+ * invoice recorded (a transient Zoho Books/Stripe Invoicing failure at
45
+ * payment time). transactionId comes from getTransactionsByBillingAccount
46
+ * / getTransaction — these transactions never appear in the invoice list,
47
+ * which only shows transactions that already have one.
48
+ */
49
+ retryInvoiceGeneration: (transactionId: string, billingAccountId: string) => Promise<Invoice>;
50
+ isGenerating: boolean;
51
+ isPaying: boolean;
52
+ isVoiding: boolean;
53
+ isRetrying: boolean;
54
+ }
55
+ /**
56
+ * Hook for fetching invoices
57
+ */
58
+ export declare function useInvoices(options?: UseInvoicesOptions): UseInvoicesResult;
59
+ /**
60
+ * Hook for fetching paginated invoices
61
+ */
62
+ export declare function usePaginatedInvoices(options?: UsePaginatedInvoicesOptions): UsePaginatedInvoicesResult;
63
+ /**
64
+ * Hook for fetching a single invoice by ID
65
+ */
66
+ export declare function useInvoice(id: string | undefined, billingAccountId: string | undefined): UseInvoiceResult;
67
+ /**
68
+ * Hook for fetching an invoice by number
69
+ */
70
+ export declare function useInvoiceByNumber(invoiceNumber: string | undefined, billingAccountId: string | undefined): UseInvoiceResult;
71
+ /**
72
+ * Hook for invoice mutations
73
+ */
74
+ export declare function useInvoiceMutations(): UseInvoiceMutationsResult;
75
+ export {};
76
+ //# sourceMappingURL=useInvoices.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useInvoices.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/billing/hooks/useInvoices.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAiBH,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEpE,UAAU,kBAAkB;IAC1B,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,UAAU,iBAAiB;IACzB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,YAAY,EAAE,OAAO,EAAE,CAAC;IACxB,YAAY,EAAE,OAAO,EAAE,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;IACzB,OAAO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E,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9F,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,OAAO,GAAE,kBAAuB,GAAG,iBAAiB,CA8B/E;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,GAAE,2BAAgC,GACxC,0BAA0B,CAuB5B;AAED;;GAEG;AACH,wBAAgB,UAAU,CACxB,EAAE,EAAE,MAAM,GAAG,SAAS,EACtB,gBAAgB,EAAE,MAAM,GAAG,SAAS,GACnC,gBAAgB,CAiBlB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,gBAAgB,EAAE,MAAM,GAAG,SAAS,GACnC,gBAAgB,CAiBlB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,yBAAyB,CAsG/D"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Billing Module - useOrderCallbacks Hook
3
+ * Admin visibility into the billing→external-service (store, etc.) order
4
+ * completion callback — the outbound counterpart to useBillingWebhookLogs'
5
+ * inbound Stripe/Razorpay webhook log. Backs the admin order-callback log
6
+ * viewer so ops can see and retry ANY billing→store handoff without direct
7
+ * DB access (BOFF-7192).
8
+ */
9
+ export interface OrderCallback {
10
+ id: string;
11
+ externalService: string;
12
+ orgId: string;
13
+ billingAccountId: string | null;
14
+ currency: string;
15
+ subtotal: number;
16
+ status: string;
17
+ paymentId: string | null;
18
+ transactionId: string | null;
19
+ callbackStatus: string | null;
20
+ callbackAttempts: number | null;
21
+ callbackLastError: string | null;
22
+ callbackLastAttemptAt: string | null;
23
+ createdAt: string;
24
+ updatedAt: string;
25
+ }
26
+ export interface OrderCallbackFilters {
27
+ callbackStatus?: string;
28
+ externalService?: string;
29
+ hasError?: boolean;
30
+ }
31
+ interface UseOrderCallbacksResult {
32
+ orders: OrderCallback[];
33
+ totalCount: number;
34
+ isLoading: boolean;
35
+ error: Error | undefined;
36
+ refetch: () => Promise<void>;
37
+ }
38
+ /**
39
+ * Hook for the admin order-callback log viewer — paginated, filterable view
40
+ * over ALL BillingOrder callback deliveries (not just FAILED ones).
41
+ */
42
+ export declare function useOrderCallbacks(filters: OrderCallbackFilters, page: number, pageSize: number): UseOrderCallbacksResult;
43
+ interface UseOrderCallbackMutationsResult {
44
+ /** Resolves once the retry attempt completes; throws on failure. Callers
45
+ * should refetch the list afterward rather than trust a stale row. */
46
+ retryOrderCallback: (orderId: string, billingAccountId: string) => Promise<void>;
47
+ isRetrying: boolean;
48
+ }
49
+ /**
50
+ * Manual retry for a stuck/failed order callback — reuses the same
51
+ * retryBillingOrderCallback mutation checkout already exposes to a billing
52
+ * account owner; a super_admin bypasses the billing-account ownership check
53
+ * server-side, so this page can retry any org's order.
54
+ */
55
+ export declare function useOrderCallbackMutations(): UseOrderCallbackMutationsResult;
56
+ export {};
57
+ //# sourceMappingURL=useOrderCallbacks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useOrderCallbacks.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/billing/hooks/useOrderCallbacks.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AASH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,UAAU,uBAAuB;IAC/B,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;IACzB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,oBAAoB,EAC7B,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GACf,uBAAuB,CAuBzB;AAED,UAAU,+BAA+B;IACvC;0EACsE;IACtE,kBAAkB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjF,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,IAAI,+BAA+B,CAc3E"}
@@ -0,0 +1,61 @@
1
+ import { Payment, PaymentMethod, PaymentStatus, CreatePaymentMethodInput } from '../../../shared/types';
2
+ interface UsePaymentsOptions {
3
+ status?: PaymentStatus;
4
+ }
5
+ interface UsePaymentsResult {
6
+ payments: Payment[];
7
+ successfulPayments: Payment[];
8
+ pendingPayments: Payment[];
9
+ failedPayments: Payment[];
10
+ isLoading: boolean;
11
+ error: Error | undefined;
12
+ refetch: () => Promise<void>;
13
+ }
14
+ interface UsePaymentResult {
15
+ payment: Payment | null;
16
+ isLoading: boolean;
17
+ error: Error | undefined;
18
+ refetch: () => Promise<void>;
19
+ }
20
+ interface UsePaymentMethodsResult {
21
+ paymentMethods: PaymentMethod[];
22
+ defaultPaymentMethod: PaymentMethod | null;
23
+ isLoading: boolean;
24
+ error: Error | undefined;
25
+ refetch: () => Promise<void>;
26
+ }
27
+ interface UsePaymentMethodMutationsResult {
28
+ addPaymentMethod: (input: CreatePaymentMethodInput) => Promise<PaymentMethod>;
29
+ setDefaultPaymentMethod: (id: string, billingAccountId: string) => Promise<PaymentMethod>;
30
+ deletePaymentMethod: (id: string, billingAccountId: string) => Promise<boolean>;
31
+ isAdding: boolean;
32
+ isUpdating: boolean;
33
+ isDeleting: boolean;
34
+ }
35
+ /**
36
+ * Hook for fetching payments
37
+ */
38
+ export declare function usePayments(options?: UsePaymentsOptions): UsePaymentsResult;
39
+ /**
40
+ * Hook for fetching a single payment by ID
41
+ */
42
+ export declare function usePayment(id: string | undefined, billingAccountId: string | undefined): UsePaymentResult;
43
+ /**
44
+ * Hook for fetching payment methods
45
+ */
46
+ export declare function usePaymentMethods(billingAccountId: string | undefined): UsePaymentMethodsResult;
47
+ /**
48
+ * Hook for fetching default payment method
49
+ */
50
+ export declare function useDefaultPaymentMethod(billingAccountId: string | undefined): {
51
+ defaultPaymentMethod: any;
52
+ isLoading: boolean;
53
+ error: Error | undefined;
54
+ refetch: () => Promise<void>;
55
+ };
56
+ /**
57
+ * Hook for payment method mutations
58
+ */
59
+ export declare function usePaymentMethodMutations(): UsePaymentMethodMutationsResult;
60
+ export {};
61
+ //# sourceMappingURL=usePayments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePayments.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/billing/hooks/usePayments.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAeH,OAAO,KAAK,EACV,OAAO,EACP,aAAa,EACb,aAAa,EACb,wBAAwB,EACzB,MAAM,uBAAuB,CAAC;AAE/B,UAAU,kBAAkB;I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AAO,GAAE,kBAAuB,GAAG,iBAAiB,CAmC/E;AAED;;GAEG;AACH,wBAAgB,UAAU,CACxB,EAAE,EAAE,MAAM,GAAG,SAAS,EACtB,gBAAgB,EAAE,MAAM,GAAG,SAAS,GACnC,gBAAgB,CAiBlB;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,gBAAgB,EAAE,MAAM,GAAG,SAAS,GAAG,uBAAuB,CA0B/F;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,gBAAgB,EAAE,MAAM,GAAG,SAAS;;;WAcxD,KAAK,GAAG,SAAS;;EAGpC;AAED;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,+BAA+B,CAiE3E"}
@@ -0,0 +1,216 @@
1
+ /**
2
+ * Billing Module - useRefunds Hook
3
+ * Provides access to refund records, statistics, and mutations
4
+ */
5
+ export type RefundRecordStatus = 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED' | 'SKIPPED';
6
+ export type RefundSource = 'MANUAL' | 'WEBHOOK_RECOVERY' | 'SUBSCRIPTION_CANCEL' | 'DUPLICATE_PAYMENT';
7
+ export interface RefundRecord {
8
+ id: string;
9
+ orgId: string;
10
+ billingAccountId: string | null;
11
+ source: RefundSource;
12
+ status: RefundRecordStatus;
13
+ provider: string;
14
+ gatewayPaymentId: string;
15
+ gatewayOrderId: string | null;
16
+ amount: number;
17
+ currency: string;
18
+ purchaseType: string | null;
19
+ purchaseDetail: string | null;
20
+ reason: string | null;
21
+ notes: string | null;
22
+ webhookLogId: string | null;
23
+ transactionId: string | null;
24
+ processedBy: string | null;
25
+ processedAt: string | null;
26
+ gatewayRefundId: string | null;
27
+ errorMessage: string | null;
28
+ retryCount: number;
29
+ metadata: Record<string, unknown> | null;
30
+ createdAt: string;
31
+ updatedAt: string;
32
+ }
33
+ export interface RefundStats {
34
+ pending: number;
35
+ processing: number;
36
+ completed: number;
37
+ failed: number;
38
+ skipped: number;
39
+ totalPendingAmount: number;
40
+ totalCompletedAmount: number;
41
+ }
42
+ export interface WebhookLog {
43
+ id: string;
44
+ event: string;
45
+ provider: string;
46
+ payload: Record<string, unknown>;
47
+ processed: boolean;
48
+ error: string | null;
49
+ createdAt: string;
50
+ }
51
+ export interface RefundRecordFilters {
52
+ status?: RefundRecordStatus;
53
+ source?: RefundSource;
54
+ provider?: string;
55
+ billingAccountId?: string;
56
+ fromDate?: string;
57
+ toDate?: string;
58
+ /** true → only refunds carrying a non-null errorMessage (an unresolved
59
+ * accounting/reconciliation issue). Powers the admin refund issue log. */
60
+ hasError?: boolean;
61
+ /** Free-text, matched against the refund id, the originating transaction
62
+ * id, the gateway payment id, and the gateway refund id — lets an admin
63
+ * find the refund/issue that belongs to a specific transaction. */
64
+ search?: string;
65
+ }
66
+ export interface CreateRefundRecordInput {
67
+ billingAccountId?: string;
68
+ provider: string;
69
+ gatewayPaymentId: string;
70
+ gatewayOrderId?: string;
71
+ amount: number;
72
+ currency: string;
73
+ purchaseType?: string;
74
+ purchaseDetail?: string;
75
+ reason?: string;
76
+ notes?: string;
77
+ transactionId?: string;
78
+ metadata?: Record<string, unknown>;
79
+ }
80
+ export interface ProcessRefundResult {
81
+ success: boolean;
82
+ refundRecord: RefundRecord | null;
83
+ gatewayRefundId: string | null;
84
+ error: string | null;
85
+ }
86
+ interface PaginationInfo {
87
+ totalCount: number;
88
+ hasMore: boolean;
89
+ page: number;
90
+ pageSize: number;
91
+ hasPrevious: boolean;
92
+ }
93
+ interface UseRefundRecordsOptions {
94
+ pageSize?: number;
95
+ filters?: RefundRecordFilters;
96
+ }
97
+ interface UseRefundRecordsResult {
98
+ records: RefundRecord[];
99
+ pagination: PaginationInfo;
100
+ isLoading: boolean;
101
+ error: Error | undefined;
102
+ refetch: () => Promise<void>;
103
+ goToNextPage: () => void;
104
+ goToPreviousPage: () => void;
105
+ goToPage: (page: number) => void;
106
+ setFilters: (filters: RefundRecordFilters) => void;
107
+ }
108
+ interface UseRefundStatsResult {
109
+ stats: RefundStats | null;
110
+ isLoading: boolean;
111
+ error: Error | undefined;
112
+ refetch: () => Promise<void>;
113
+ }
114
+ interface UseRefundRecordResult {
115
+ record: RefundRecord | null;
116
+ isLoading: boolean;
117
+ error: Error | undefined;
118
+ refetch: () => Promise<void>;
119
+ }
120
+ interface UseUnprocessedWebhooksResult {
121
+ webhooks: WebhookLog[];
122
+ isLoading: boolean;
123
+ error: Error | undefined;
124
+ refetch: () => Promise<void>;
125
+ }
126
+ export interface BillingWebhookLogFilters {
127
+ processed?: boolean;
128
+ provider?: string;
129
+ hasError?: boolean;
130
+ }
131
+ interface UseBillingWebhookLogsResult {
132
+ logs: WebhookLog[];
133
+ totalCount: number;
134
+ isLoading: boolean;
135
+ error: Error | undefined;
136
+ refetch: () => Promise<void>;
137
+ }
138
+ interface UseRefundMutationsResult {
139
+ createRefundRecord: (input: CreateRefundRecordInput) => Promise<RefundRecord>;
140
+ processRefund: (id: string, notes?: string) => Promise<ProcessRefundResult>;
141
+ skipRefund: (id: string, reason: string) => Promise<RefundRecord>;
142
+ retryRefund: (id: string) => Promise<ProcessRefundResult>;
143
+ createRefundRecordsFromFailedWebhooks: () => Promise<RefundRecord[]>;
144
+ createRefundRecordFromWebhook: (webhookLogId: string) => Promise<RefundRecord | null>;
145
+ isCreating: boolean;
146
+ isProcessing: boolean;
147
+ isSkipping: boolean;
148
+ isRetrying: boolean;
149
+ isCreatingFromWebhooks: boolean;
150
+ isCreatingFromWebhook: boolean;
151
+ }
152
+ /**
153
+ * Hook for fetching paginated refund records with filters
154
+ */
155
+ export declare function useRefundRecords(options?: UseRefundRecordsOptions): UseRefundRecordsResult;
156
+ /**
157
+ * Hook for fetching pending refund records (shortcut)
158
+ */
159
+ export declare function usePendingRefunds(pageSize?: number): UseRefundRecordsResult;
160
+ /**
161
+ * Hook for fetching refund statistics
162
+ */
163
+ export declare function useRefundStats(): UseRefundStatsResult;
164
+ /**
165
+ * Hook for fetching a single refund record by ID
166
+ */
167
+ export declare function useRefundRecord(id: string | undefined): UseRefundRecordResult;
168
+ /**
169
+ * Hook for fetching unprocessed failed webhooks
170
+ */
171
+ export declare function useUnprocessedFailedWebhooks(): UseUnprocessedWebhooksResult;
172
+ /**
173
+ * Hook for the admin billing-webhook-log viewer — paginated, filterable view
174
+ * over ALL webhook log rows (unlike useUnprocessedFailedWebhooks, which only
175
+ * scans the narrow refund-candidate subset).
176
+ */
177
+ export declare function useBillingWebhookLogs(filters: BillingWebhookLogFilters, page: number, pageSize: number): UseBillingWebhookLogsResult;
178
+ /**
179
+ * Hook for refund mutations
180
+ */
181
+ export declare function useRefundMutations(): UseRefundMutationsResult;
182
+ /**
183
+ * Combined hook for refund page with all data and mutations
184
+ */
185
+ export declare function useRefunds(options?: UseRefundRecordsOptions): {
186
+ refetch: () => Promise<void>;
187
+ refetchRecords: () => Promise<void>;
188
+ refetchStats: () => Promise<void>;
189
+ refetchWebhooks: () => Promise<void>;
190
+ createRefundRecord: (input: CreateRefundRecordInput) => Promise<RefundRecord>;
191
+ processRefund: (id: string, notes?: string) => Promise<ProcessRefundResult>;
192
+ skipRefund: (id: string, reason: string) => Promise<RefundRecord>;
193
+ retryRefund: (id: string) => Promise<ProcessRefundResult>;
194
+ createRefundRecordsFromFailedWebhooks: () => Promise<RefundRecord[]>;
195
+ createRefundRecordFromWebhook: (webhookLogId: string) => Promise<RefundRecord | null>;
196
+ isCreating: boolean;
197
+ isProcessing: boolean;
198
+ isSkipping: boolean;
199
+ isRetrying: boolean;
200
+ isCreatingFromWebhooks: boolean;
201
+ isCreatingFromWebhook: boolean;
202
+ records: RefundRecord[];
203
+ pagination: PaginationInfo;
204
+ goToNextPage: () => void;
205
+ goToPreviousPage: () => void;
206
+ goToPage: (page: number) => void;
207
+ setFilters: (filters: RefundRecordFilters) => void;
208
+ stats: RefundStats | null;
209
+ unprocessedWebhooks: WebhookLog[];
210
+ webhooksLoading: boolean;
211
+ isLoading: boolean;
212
+ recordsError: Error | undefined;
213
+ statsError: Error | undefined;
214
+ };
215
+ export {};
216
+ //# sourceMappingURL=useRefunds.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRefunds.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/billing/hooks/useRefunds.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA4BH,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,YAAY,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AAC/F,MAAM,MAAM,YAAY,GACpB,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,CAAC;AAExB,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,MAAM,EAAE,YAAY,CAAC;IACrB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACz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M,KAAK,OAAO,CAAC,YAAY,CAAC;iBACpD,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,mBAAmB,CAAC;2CAClB,MAAM,OAAO,CAAC,YAAY,EAAE,CAAC;mCACrC,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;gBACzE,OAAO;kBACL,OAAO;gBACT,OAAO;gBACP,OAAO;4BACK,OAAO;2BACR,OAAO;;;wBArDV,IAAI;4BACA,IAAI;qBACX,MAAM,KAAK,IAAI;0BACV,mBAAmB,KAAK,IAAI;;;;;;;EAkcnD"}
@@ -0,0 +1,40 @@
1
+ import { Transaction } from '../../../shared/types';
2
+ interface BillingAccountInfo {
3
+ id: string;
4
+ name: string;
5
+ email: string;
6
+ billingEmail: string | null;
7
+ currency: string;
8
+ creditAmount: number;
9
+ isActive: boolean;
10
+ taxId: string | null;
11
+ createdAt: string;
12
+ }
13
+ interface PaginationInfo {
14
+ totalCount: number;
15
+ hasMore: boolean;
16
+ page: number;
17
+ pageSize: number;
18
+ hasPrevious: boolean;
19
+ }
20
+ interface UseTransactionsOptions {
21
+ pageSize?: number;
22
+ }
23
+ interface UseTransactionsResult {
24
+ billingAccount: BillingAccountInfo | null;
25
+ transactions: Transaction[];
26
+ pagination: PaginationInfo;
27
+ isLoading: boolean;
28
+ error: Error | undefined;
29
+ refetch: () => Promise<void>;
30
+ goToNextPage: () => void;
31
+ goToPreviousPage: () => void;
32
+ goToPage: (page: number) => void;
33
+ }
34
+ /**
35
+ * Hook for fetching paginated transactions for a billing account
36
+ * Uses the optimized getTransactionsByBillingAccount query
37
+ */
38
+ export declare function useTransactions(billingAccountId: string | undefined, options?: UseTransactionsOptions): UseTransactionsResult;
39
+ export {};
40
+ //# sourceMappingURL=useTransactions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTransactions.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/billing/hooks/useTransactions.ts"],"names":[],"mappings":"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