@burdenoff/microfe-billing 2026.1108.1 → 2026.1108.2

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 (769) hide show
  1. package/dist/billing/BillingAdminRoutes.d.ts +1 -2
  2. package/dist/billing/BillingAdminRoutes.js +11 -12
  3. package/dist/billing/BillingAdminRoutes.js.map +1 -1
  4. package/dist/billing/BillingRoot.d.ts +0 -1
  5. package/dist/billing/BillingRoot.js +10 -9
  6. package/dist/billing/BillingRoot.js.map +1 -1
  7. package/dist/billing/BillingUserRoutes.d.ts +1 -2
  8. package/dist/billing/BillingUserRoutes.js +13 -14
  9. package/dist/billing/BillingUserRoutes.js.map +1 -1
  10. package/dist/billing/hooks/useBillingAccountSelection.d.ts +0 -1
  11. package/dist/billing/hooks/useBillingAccountSelection.js +7 -5
  12. package/dist/billing/hooks/useBillingAccountSelection.js.map +1 -1
  13. package/dist/billing/hooks/useBillingEventEmitter.d.ts +0 -1
  14. package/dist/billing/hooks/useBillingEventEmitter.js +1 -2
  15. package/dist/billing/hooks/useBillingEventEmitter.js.map +1 -1
  16. package/dist/billing/hooks/useBillingNavigate.d.ts +0 -1
  17. package/dist/billing/hooks/useBillingNavigate.js +1 -2
  18. package/dist/billing/hooks/useBillingNavigate.js.map +1 -1
  19. package/dist/billing/hooks/useBillingPermissions.d.ts +0 -1
  20. package/dist/billing/hooks/useBillingPermissions.js +2 -3
  21. package/dist/billing/hooks/useBillingPermissions.js.map +1 -1
  22. package/dist/billing/hooks/useDefaultBillingCurrency.d.ts +0 -1
  23. package/dist/billing/hooks/useDefaultBillingCurrency.js +1 -2
  24. package/dist/billing/hooks/useDefaultBillingCurrency.js.map +1 -1
  25. package/dist/billing/hooks/useProducts.d.ts +0 -1
  26. package/dist/billing/hooks/useProducts.js +1 -2
  27. package/dist/billing/hooks/useProducts.js.map +1 -1
  28. package/dist/billing/index.d.ts +0 -1
  29. package/dist/billing/lib/native-purchases.d.ts +0 -1
  30. package/dist/billing/lib/native-purchases.js +1 -2
  31. package/dist/billing/lib/native-purchases.js.map +1 -1
  32. package/dist/billing/modules/addons/components/FloatingCartDrawer.d.ts +0 -1
  33. package/dist/billing/modules/addons/components/FloatingCartDrawer.js +4 -5
  34. package/dist/billing/modules/addons/components/FloatingCartDrawer.js.map +1 -1
  35. package/dist/billing/modules/addons/hooks/index.d.ts +0 -1
  36. package/dist/billing/modules/addons/hooks/index.js +3 -2
  37. package/dist/billing/modules/addons/hooks/useAddonPurchaseEligibility.d.ts +0 -1
  38. package/dist/billing/modules/addons/hooks/useAddonPurchaseEligibility.js +1 -2
  39. package/dist/billing/modules/addons/hooks/useAddonPurchaseEligibility.js.map +1 -1
  40. package/dist/billing/modules/addons/hooks/useAddons.d.ts +0 -1
  41. package/dist/billing/modules/addons/hooks/useAddons.js +1 -2
  42. package/dist/billing/modules/addons/hooks/useAddons.js.map +1 -1
  43. package/dist/billing/modules/addons/index.d.ts +0 -1
  44. package/dist/billing/modules/addons/index.js +10 -10
  45. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.d.ts +0 -1
  46. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js +15 -16
  47. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js.map +1 -1
  48. package/dist/billing/modules/addons/pages/AddonCreatePage.d.ts +0 -1
  49. package/dist/billing/modules/addons/pages/AddonCreatePage.js +11 -12
  50. package/dist/billing/modules/addons/pages/AddonCreatePage.js.map +1 -1
  51. package/dist/billing/modules/addons/pages/AddonDetailPage.d.ts +0 -1
  52. package/dist/billing/modules/addons/pages/AddonDetailPage.js +16 -17
  53. package/dist/billing/modules/addons/pages/AddonDetailPage.js.map +1 -1
  54. package/dist/billing/modules/addons/pages/AddonEditPage.d.ts +0 -1
  55. package/dist/billing/modules/addons/pages/AddonEditPage.js +16 -17
  56. package/dist/billing/modules/addons/pages/AddonEditPage.js.map +1 -1
  57. package/dist/billing/modules/addons/pages/AddonsBrowsePage.d.ts +0 -1
  58. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +111 -106
  59. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js.map +1 -1
  60. package/dist/billing/modules/addons/pages/AddonsListPage.d.ts +0 -1
  61. package/dist/billing/modules/addons/pages/AddonsListPage.js +105 -100
  62. package/dist/billing/modules/addons/pages/AddonsListPage.js.map +1 -1
  63. package/dist/billing/modules/addons/pages/index.d.ts +0 -1
  64. package/dist/billing/modules/addons/pages/index.js +7 -6
  65. package/dist/billing/modules/addons/store/addonCartStore.d.ts +0 -1
  66. package/dist/billing/modules/addons/store/addonCartStore.js +2 -7
  67. package/dist/billing/modules/addons/store/addonCartStore.js.map +1 -1
  68. package/dist/billing/modules/affiliate/api.d.ts +0 -1
  69. package/dist/billing/modules/affiliate/api.js +1 -2
  70. package/dist/billing/modules/affiliate/api.js.map +1 -1
  71. package/dist/billing/modules/affiliate/index.d.ts +0 -1
  72. package/dist/billing/modules/affiliate/index.js +1 -2
  73. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.d.ts +0 -1
  74. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +29 -28
  75. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
  76. package/dist/billing/modules/analytics/index.d.ts +0 -1
  77. package/dist/billing/modules/analytics/index.js +1 -2
  78. package/dist/billing/modules/analytics/pages/AnalyticsPage.d.ts +0 -1
  79. package/dist/billing/modules/analytics/pages/AnalyticsPage.js +8 -9
  80. package/dist/billing/modules/analytics/pages/AnalyticsPage.js.map +1 -1
  81. package/dist/billing/modules/analytics/pages/index.d.ts +0 -1
  82. package/dist/billing/modules/analytics/pages/index.js +1 -1
  83. package/dist/billing/modules/billing/hooks/index.d.ts +0 -1
  84. package/dist/billing/modules/billing/hooks/index.js +5 -4
  85. package/dist/billing/modules/billing/hooks/useInvoices.d.ts +0 -1
  86. package/dist/billing/modules/billing/hooks/useInvoices.js +1 -2
  87. package/dist/billing/modules/billing/hooks/useInvoices.js.map +1 -1
  88. package/dist/billing/modules/billing/hooks/useOrderCallbacks.d.ts +0 -1
  89. package/dist/billing/modules/billing/hooks/useOrderCallbacks.js +1 -2
  90. package/dist/billing/modules/billing/hooks/useOrderCallbacks.js.map +1 -1
  91. package/dist/billing/modules/billing/hooks/usePayments.d.ts +0 -1
  92. package/dist/billing/modules/billing/hooks/useRefunds.d.ts +0 -1
  93. package/dist/billing/modules/billing/hooks/useRefunds.js +1 -2
  94. package/dist/billing/modules/billing/hooks/useRefunds.js.map +1 -1
  95. package/dist/billing/modules/billing/hooks/useTransactions.d.ts +0 -1
  96. package/dist/billing/modules/billing/hooks/useTransactions.js +30 -31
  97. package/dist/billing/modules/billing/hooks/useTransactions.js.map +1 -1
  98. package/dist/billing/modules/billing/index.d.ts +0 -1
  99. package/dist/billing/modules/billing/index.js +15 -15
  100. package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.d.ts +0 -1
  101. package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.js +11 -12
  102. package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.js.map +1 -1
  103. package/dist/billing/modules/billing/pages/InvoiceDetailPage.d.ts +0 -1
  104. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +53 -59
  105. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
  106. package/dist/billing/modules/billing/pages/InvoicesListPage.d.ts +0 -1
  107. package/dist/billing/modules/billing/pages/InvoicesListPage.js +81 -87
  108. package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -1
  109. package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.d.ts +0 -1
  110. package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.js +11 -12
  111. package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.js.map +1 -1
  112. package/dist/billing/modules/billing/pages/PaymentMethodsPage.d.ts +0 -1
  113. package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +51 -54
  114. package/dist/billing/modules/billing/pages/PaymentMethodsPage.js.map +1 -1
  115. package/dist/billing/modules/billing/pages/RefundIssueLogsPage.d.ts +0 -1
  116. package/dist/billing/modules/billing/pages/RefundIssueLogsPage.js +33 -34
  117. package/dist/billing/modules/billing/pages/RefundIssueLogsPage.js.map +1 -1
  118. package/dist/billing/modules/billing/pages/RefundsPage.d.ts +0 -1
  119. package/dist/billing/modules/billing/pages/RefundsPage.js +92 -93
  120. package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
  121. package/dist/billing/modules/billing/pages/TransactionsPage.d.ts +0 -1
  122. package/dist/billing/modules/billing/pages/TransactionsPage.js +38 -39
  123. package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
  124. package/dist/billing/modules/billing/pages/UserRefundsPage.d.ts +0 -1
  125. package/dist/billing/modules/billing/pages/UserRefundsPage.js +24 -30
  126. package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
  127. package/dist/billing/modules/billing/pages/index.d.ts +0 -1
  128. package/dist/billing/modules/billing/pages/index.js +10 -9
  129. package/dist/billing/modules/checkout/components/AutoPayToggle.d.ts +0 -1
  130. package/dist/billing/modules/checkout/components/BillingAccountSelector.d.ts +0 -1
  131. package/dist/billing/modules/checkout/components/BillingAccountSelector.js +1 -2
  132. package/dist/billing/modules/checkout/components/BillingAccountSelector.js.map +1 -1
  133. package/dist/billing/modules/checkout/components/CompactAutoPayToggle.d.ts +0 -1
  134. package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.d.ts +0 -1
  135. package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js +1 -2
  136. package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js.map +1 -1
  137. package/dist/billing/modules/checkout/components/CreditsAmountInput.d.ts +0 -1
  138. package/dist/billing/modules/checkout/components/CreditsAmountInput.js +1 -2
  139. package/dist/billing/modules/checkout/components/CreditsAmountInput.js.map +1 -1
  140. package/dist/billing/modules/checkout/components/CreditsPaymentOption.d.ts +0 -1
  141. package/dist/billing/modules/checkout/components/CurrencySelector.d.ts +0 -1
  142. package/dist/billing/modules/checkout/components/NativeCheckoutView.d.ts +0 -1
  143. package/dist/billing/modules/checkout/components/NativeCheckoutView.js +1 -2
  144. package/dist/billing/modules/checkout/components/NativeCheckoutView.js.map +1 -1
  145. package/dist/billing/modules/checkout/components/OrderSummary.d.ts +0 -1
  146. package/dist/billing/modules/checkout/components/OrderSummary.js +35 -32
  147. package/dist/billing/modules/checkout/components/OrderSummary.js.map +1 -1
  148. package/dist/billing/modules/checkout/components/PaymentProviderSelector.d.ts +0 -1
  149. package/dist/billing/modules/checkout/components/PromoCodeInput.d.ts +0 -1
  150. package/dist/billing/modules/checkout/components/PromoCodeInput.js +1 -2
  151. package/dist/billing/modules/checkout/components/PromoCodeInput.js.map +1 -1
  152. package/dist/billing/modules/checkout/components/RazorpayPaymentButton.d.ts +0 -1
  153. package/dist/billing/modules/checkout/components/RazorpayPaymentButton.js +1 -2
  154. package/dist/billing/modules/checkout/components/RazorpayPaymentButton.js.map +1 -1
  155. package/dist/billing/modules/checkout/components/SavedCardSelector.d.ts +0 -1
  156. package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.d.ts +0 -1
  157. package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.js +1 -2
  158. package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.js.map +1 -1
  159. package/dist/billing/modules/checkout/components/StoreShippingSection.d.ts +0 -1
  160. package/dist/billing/modules/checkout/components/StoreShippingSection.js +5 -3
  161. package/dist/billing/modules/checkout/components/StoreShippingSection.js.map +1 -1
  162. package/dist/billing/modules/checkout/components/StripePaymentForm.d.ts +0 -1
  163. package/dist/billing/modules/checkout/components/StripePaymentForm.js +35 -41
  164. package/dist/billing/modules/checkout/components/StripePaymentForm.js.map +1 -1
  165. package/dist/billing/modules/checkout/components/SubscriptionSelector.d.ts +0 -1
  166. package/dist/billing/modules/checkout/components/SubscriptionSelector.js +1 -2
  167. package/dist/billing/modules/checkout/components/SubscriptionSelector.js.map +1 -1
  168. package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.d.ts +0 -1
  169. package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.js +1 -2
  170. package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.js.map +1 -1
  171. package/dist/billing/modules/checkout/components/WebCheckoutRedirectView.d.ts +0 -1
  172. package/dist/billing/modules/checkout/components/WebCheckoutRedirectView.js +5 -6
  173. package/dist/billing/modules/checkout/components/WebCheckoutRedirectView.js.map +1 -1
  174. package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.d.ts +0 -1
  175. package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js +7 -8
  176. package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js.map +1 -1
  177. package/dist/billing/modules/checkout/components/index.d.ts +0 -1
  178. package/dist/billing/modules/checkout/components/index.js +12 -11
  179. package/dist/billing/modules/checkout/hooks/index.d.ts +0 -1
  180. package/dist/billing/modules/checkout/hooks/index.js +5 -4
  181. package/dist/billing/modules/checkout/hooks/useCheckout.d.ts +0 -1
  182. package/dist/billing/modules/checkout/hooks/useCheckout.js +182 -195
  183. package/dist/billing/modules/checkout/hooks/useCheckout.js.map +1 -1
  184. package/dist/billing/modules/checkout/hooks/useNativeCheckout.d.ts +0 -1
  185. package/dist/billing/modules/checkout/hooks/useNativeCheckout.js +33 -32
  186. package/dist/billing/modules/checkout/hooks/useNativeCheckout.js.map +1 -1
  187. package/dist/billing/modules/checkout/hooks/usePaymentProviders.d.ts +0 -1
  188. package/dist/billing/modules/checkout/hooks/usePaymentProviders.js +1 -2
  189. package/dist/billing/modules/checkout/hooks/usePaymentProviders.js.map +1 -1
  190. package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.d.ts +0 -1
  191. package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.js +1 -2
  192. package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.js.map +1 -1
  193. package/dist/billing/modules/checkout/hooks/useStoreShipping.d.ts +4 -8
  194. package/dist/billing/modules/checkout/hooks/useStoreShipping.js +1 -2
  195. package/dist/billing/modules/checkout/hooks/useStoreShipping.js.map +1 -1
  196. package/dist/billing/modules/checkout/index.d.ts +0 -1
  197. package/dist/billing/modules/checkout/index.js +19 -19
  198. package/dist/billing/modules/checkout/pages/CheckoutPage.d.ts +0 -1
  199. package/dist/billing/modules/checkout/pages/CheckoutPage.js +730 -732
  200. package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -1
  201. package/dist/billing/modules/checkout/pages/index.d.ts +0 -1
  202. package/dist/billing/modules/checkout/pages/index.js +1 -1
  203. package/dist/billing/modules/checkout/types/index.d.ts +0 -1
  204. package/dist/billing/modules/checkout/utils/storeOrder.d.ts +0 -1
  205. package/dist/billing/modules/checkout/utils/storeOrder.js +0 -1
  206. package/dist/billing/modules/checkout/utils/storeOrder.js.map +1 -1
  207. package/dist/billing/modules/coupons/index.d.ts +0 -1
  208. package/dist/billing/modules/coupons/pages/CouponDetailPage.d.ts +0 -1
  209. package/dist/billing/modules/coupons/pages/CouponDetailPage.js +5 -6
  210. package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -1
  211. package/dist/billing/modules/coupons/pages/CouponsListPage.d.ts +0 -1
  212. package/dist/billing/modules/coupons/pages/CouponsListPage.js +15 -13
  213. package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
  214. package/dist/billing/modules/coupons/pages/CreateCouponPage.d.ts +0 -1
  215. package/dist/billing/modules/coupons/pages/CreateCouponPage.js +12 -10
  216. package/dist/billing/modules/coupons/pages/CreateCouponPage.js.map +1 -1
  217. package/dist/billing/modules/coupons/pages/EditCouponPage.d.ts +0 -1
  218. package/dist/billing/modules/coupons/pages/EditCouponPage.js +7 -11
  219. package/dist/billing/modules/coupons/pages/EditCouponPage.js.map +1 -1
  220. package/dist/billing/modules/coupons/pages/index.d.ts +0 -1
  221. package/dist/billing/modules/coupons/pages/index.js +5 -4
  222. package/dist/billing/modules/credits/hooks/index.d.ts +0 -1
  223. package/dist/billing/modules/credits/hooks/useCredits.d.ts +0 -1
  224. package/dist/billing/modules/credits/hooks/useCredits.js +20 -21
  225. package/dist/billing/modules/credits/hooks/useCredits.js.map +1 -1
  226. package/dist/billing/modules/credits/index.d.ts +0 -1
  227. package/dist/billing/modules/credits/pages/AdminCreditsPage.d.ts +0 -1
  228. package/dist/billing/modules/credits/pages/AdminCreditsPage.js +19 -24
  229. package/dist/billing/modules/credits/pages/AdminCreditsPage.js.map +1 -1
  230. package/dist/billing/modules/credits/pages/CreditTransactionsPage.d.ts +0 -1
  231. package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +26 -27
  232. package/dist/billing/modules/credits/pages/CreditTransactionsPage.js.map +1 -1
  233. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.d.ts +0 -1
  234. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +54 -52
  235. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js.map +1 -1
  236. package/dist/billing/modules/credits/pages/CreditsPage.d.ts +0 -1
  237. package/dist/billing/modules/credits/pages/CreditsPage.js +37 -38
  238. package/dist/billing/modules/credits/pages/CreditsPage.js.map +1 -1
  239. package/dist/billing/modules/credits/pages/index.d.ts +0 -1
  240. package/dist/billing/modules/credits/pages/index.js +5 -4
  241. package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.d.ts +0 -1
  242. package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js +2 -3
  243. package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js.map +1 -1
  244. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.d.ts +0 -1
  245. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js +35 -43
  246. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js.map +1 -1
  247. package/dist/billing/modules/dashboard/components/BillingAccountCard.d.ts +0 -1
  248. package/dist/billing/modules/dashboard/components/BillingAccountCard.js +1 -2
  249. package/dist/billing/modules/dashboard/components/BillingAccountCard.js.map +1 -1
  250. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.d.ts +0 -1
  251. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js +1 -2
  252. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js.map +1 -1
  253. package/dist/billing/modules/dashboard/components/PaymentMethodsSection.d.ts +0 -1
  254. package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js +2 -5
  255. package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js.map +1 -1
  256. package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.d.ts +0 -1
  257. package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js +1 -2
  258. package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js.map +1 -1
  259. package/dist/billing/modules/dashboard/components/index.d.ts +0 -1
  260. package/dist/billing/modules/dashboard/components/index.js +7 -6
  261. package/dist/billing/modules/dashboard/hooks/index.d.ts +0 -1
  262. package/dist/billing/modules/dashboard/hooks/index.js +3 -2
  263. package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.d.ts +0 -1
  264. package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.js +2 -3
  265. package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.js.map +1 -1
  266. package/dist/billing/modules/dashboard/hooks/useDashboard.d.ts +0 -1
  267. package/dist/billing/modules/dashboard/hooks/useDashboard.js +2 -3
  268. package/dist/billing/modules/dashboard/hooks/useDashboard.js.map +1 -1
  269. package/dist/billing/modules/dashboard/index.d.ts +0 -1
  270. package/dist/billing/modules/dashboard/index.js +11 -10
  271. package/dist/billing/modules/dashboard/pages/OverviewPage.d.ts +0 -1
  272. package/dist/billing/modules/dashboard/pages/OverviewPage.js +266 -264
  273. package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
  274. package/dist/billing/modules/dashboard/pages/index.d.ts +0 -1
  275. package/dist/billing/modules/dashboard/pages/index.js +1 -1
  276. package/dist/billing/modules/discounts/index.d.ts +0 -1
  277. package/dist/billing/modules/discounts/index.js +1 -2
  278. package/dist/billing/modules/discounts/pages/DiscountsListPage.d.ts +0 -1
  279. package/dist/billing/modules/discounts/pages/DiscountsListPage.js +169 -176
  280. package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
  281. package/dist/billing/modules/discounts/pages/index.d.ts +0 -1
  282. package/dist/billing/modules/discounts/pages/index.js +1 -1
  283. package/dist/billing/modules/earnings/api.d.ts +0 -1
  284. package/dist/billing/modules/earnings/api.js +66 -67
  285. package/dist/billing/modules/earnings/api.js.map +1 -1
  286. package/dist/billing/modules/earnings/index.d.ts +0 -1
  287. package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.d.ts +0 -1
  288. package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js +17 -17
  289. package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js.map +1 -1
  290. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.d.ts +0 -1
  291. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js +188 -189
  292. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js.map +1 -1
  293. package/dist/billing/modules/earnings/pages/EarningsPage.d.ts +0 -1
  294. package/dist/billing/modules/earnings/pages/EarningsPage.js +111 -111
  295. package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
  296. package/dist/billing/modules/earnings/pages/PayoutAdminPage.d.ts +0 -1
  297. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +29 -30
  298. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
  299. package/dist/billing/modules/earnings/pages/PayoutsPage.d.ts +0 -1
  300. package/dist/billing/modules/earnings/pages/PayoutsPage.js +103 -104
  301. package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
  302. package/dist/billing/modules/earnings/payoutAccountStatus.d.ts +0 -1
  303. package/dist/billing/modules/earnings/payoutAccountStatus.js +1 -2
  304. package/dist/billing/modules/earnings/payoutAccountStatus.js.map +1 -1
  305. package/dist/billing/modules/plans/constants/enterprise.d.ts +0 -1
  306. package/dist/billing/modules/plans/constants/enterprise.js +1 -2
  307. package/dist/billing/modules/plans/constants/enterprise.js.map +1 -1
  308. package/dist/billing/modules/plans/constants/featuredQuotas.d.ts +0 -1
  309. package/dist/billing/modules/plans/constants/featuredQuotas.js +1 -2
  310. package/dist/billing/modules/plans/constants/featuredQuotas.js.map +1 -1
  311. package/dist/billing/modules/plans/hooks/index.d.ts +0 -1
  312. package/dist/billing/modules/plans/hooks/index.js +3 -2
  313. package/dist/billing/modules/plans/hooks/usePlans.d.ts +0 -1
  314. package/dist/billing/modules/plans/hooks/usePlans.js +1 -2
  315. package/dist/billing/modules/plans/hooks/usePlans.js.map +1 -1
  316. package/dist/billing/modules/plans/hooks/useQuotas.d.ts +0 -1
  317. package/dist/billing/modules/plans/hooks/useQuotas.js +1 -2
  318. package/dist/billing/modules/plans/hooks/useQuotas.js.map +1 -1
  319. package/dist/billing/modules/plans/index.d.ts +0 -1
  320. package/dist/billing/modules/plans/index.js +11 -11
  321. package/dist/billing/modules/plans/pages/PlanAssignFreePage.d.ts +0 -1
  322. package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +12 -15
  323. package/dist/billing/modules/plans/pages/PlanAssignFreePage.js.map +1 -1
  324. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.d.ts +0 -1
  325. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +38 -39
  326. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js.map +1 -1
  327. package/dist/billing/modules/plans/pages/PlanCreatePage.d.ts +0 -1
  328. package/dist/billing/modules/plans/pages/PlanCreatePage.js +10 -11
  329. package/dist/billing/modules/plans/pages/PlanCreatePage.js.map +1 -1
  330. package/dist/billing/modules/plans/pages/PlanDetailPage.d.ts +0 -1
  331. package/dist/billing/modules/plans/pages/PlanDetailPage.js +40 -41
  332. package/dist/billing/modules/plans/pages/PlanDetailPage.js.map +1 -1
  333. package/dist/billing/modules/plans/pages/PlanEditPage.d.ts +0 -1
  334. package/dist/billing/modules/plans/pages/PlanEditPage.js +15 -16
  335. package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
  336. package/dist/billing/modules/plans/pages/PlansBrowsePage.d.ts +0 -1
  337. package/dist/billing/modules/plans/pages/PlansBrowsePage.js +18 -19
  338. package/dist/billing/modules/plans/pages/PlansBrowsePage.js.map +1 -1
  339. package/dist/billing/modules/plans/pages/PlansListPage.d.ts +0 -1
  340. package/dist/billing/modules/plans/pages/PlansListPage.js +100 -101
  341. package/dist/billing/modules/plans/pages/PlansListPage.js.map +1 -1
  342. package/dist/billing/modules/plans/pages/index.d.ts +0 -1
  343. package/dist/billing/modules/plans/pages/index.js +8 -7
  344. package/dist/billing/modules/plans/utils/currencyPriceOverrides.d.ts +0 -1
  345. package/dist/billing/modules/plans/utils/currencyPriceOverrides.js +1 -2
  346. package/dist/billing/modules/plans/utils/currencyPriceOverrides.js.map +1 -1
  347. package/dist/billing/modules/plans/utils/planSelector.d.ts +0 -1
  348. package/dist/billing/modules/plans/utils/planSelector.js +1 -2
  349. package/dist/billing/modules/plans/utils/planSelector.js.map +1 -1
  350. package/dist/billing/modules/promotions/index.d.ts +0 -1
  351. package/dist/billing/modules/promotions/pages/CreatePromotionPage.d.ts +0 -1
  352. package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +5 -6
  353. package/dist/billing/modules/promotions/pages/CreatePromotionPage.js.map +1 -1
  354. package/dist/billing/modules/promotions/pages/PromotionsListPage.d.ts +0 -1
  355. package/dist/billing/modules/promotions/pages/PromotionsListPage.js +5 -6
  356. package/dist/billing/modules/promotions/pages/PromotionsListPage.js.map +1 -1
  357. package/dist/billing/modules/promotions/pages/index.d.ts +0 -1
  358. package/dist/billing/modules/promotions/pages/index.js +3 -2
  359. package/dist/billing/modules/quota/hooks/index.d.ts +0 -1
  360. package/dist/billing/modules/quota/hooks/index.js +1 -1
  361. package/dist/billing/modules/quota/hooks/useQuota.d.ts +0 -1
  362. package/dist/billing/modules/quota/hooks/useQuotaTemplates.d.ts +0 -1
  363. package/dist/billing/modules/quota/hooks/useQuotaTemplates.js +1 -2
  364. package/dist/billing/modules/quota/hooks/useQuotaTemplates.js.map +1 -1
  365. package/dist/billing/modules/quota/index.d.ts +0 -1
  366. package/dist/billing/modules/quota/index.js +8 -8
  367. package/dist/billing/modules/quota/pages/QuotaAssignFreePage.d.ts +0 -1
  368. package/dist/billing/modules/quota/pages/QuotaAssignFreePage.js +12 -15
  369. package/dist/billing/modules/quota/pages/QuotaAssignFreePage.js.map +1 -1
  370. package/dist/billing/modules/quota/pages/QuotaPage.d.ts +0 -1
  371. package/dist/billing/modules/quota/pages/QuotaPage.js +3 -3
  372. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.d.ts +0 -1
  373. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +13 -14
  374. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js.map +1 -1
  375. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.d.ts +0 -1
  376. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +9 -10
  377. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js.map +1 -1
  378. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.d.ts +0 -1
  379. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +12 -13
  380. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js.map +1 -1
  381. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.d.ts +0 -1
  382. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +16 -17
  383. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js.map +1 -1
  384. package/dist/billing/modules/quota/pages/index.d.ts +0 -1
  385. package/dist/billing/modules/quota/pages/index.js +6 -5
  386. package/dist/billing/modules/quota/utils/quotaSelector.d.ts +0 -1
  387. package/dist/billing/modules/quota/utils/quotaSelector.js +1 -2
  388. package/dist/billing/modules/quota/utils/quotaSelector.js.map +1 -1
  389. package/dist/billing/modules/settings/index.d.ts +0 -1
  390. package/dist/billing/modules/settings/pages/SettingsPage.d.ts +0 -1
  391. package/dist/billing/modules/settings/pages/SettingsPage.js +12 -13
  392. package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
  393. package/dist/billing/modules/settings/pages/TeamPermissionsPage.d.ts +0 -1
  394. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +32 -32
  395. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
  396. package/dist/billing/modules/settings/pages/index.d.ts +0 -1
  397. package/dist/billing/modules/settings/pages/index.js +3 -2
  398. package/dist/billing/modules/store/graphql/index.d.ts +0 -1
  399. package/dist/billing/modules/store/index.d.ts +0 -1
  400. package/dist/billing/modules/store/index.js +1 -2
  401. package/dist/billing/modules/store/pages/StoreCheckoutPage.d.ts +0 -1
  402. package/dist/billing/modules/store/pages/StoreCheckoutPage.js +1 -2
  403. package/dist/billing/modules/store/pages/StoreCheckoutPage.js.map +1 -1
  404. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.d.ts +0 -1
  405. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js +9 -11
  406. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js.map +1 -1
  407. package/dist/billing/modules/subscriptions/hooks/index.d.ts +0 -1
  408. package/dist/billing/modules/subscriptions/hooks/index.js +1 -1
  409. package/dist/billing/modules/subscriptions/hooks/useSubscriptions.d.ts +0 -1
  410. package/dist/billing/modules/subscriptions/hooks/useSubscriptions.js +1 -2
  411. package/dist/billing/modules/subscriptions/hooks/useSubscriptions.js.map +1 -1
  412. package/dist/billing/modules/subscriptions/index.d.ts +0 -1
  413. package/dist/billing/modules/subscriptions/index.js +6 -6
  414. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.d.ts +0 -1
  415. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +311 -312
  416. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
  417. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.d.ts +0 -1
  418. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +61 -62
  419. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js.map +1 -1
  420. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.d.ts +0 -1
  421. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js +30 -31
  422. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -1
  423. package/dist/billing/modules/subscriptions/pages/index.d.ts +0 -1
  424. package/dist/billing/modules/subscriptions/pages/index.js +4 -3
  425. package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.d.ts +0 -1
  426. package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.js +17 -18
  427. package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.js.map +1 -1
  428. package/dist/billing/modules/usage/hooks/index.d.ts +0 -1
  429. package/dist/billing/modules/usage/hooks/useUsage.d.ts +0 -1
  430. package/dist/billing/modules/usage/hooks/useUsage.js +72 -73
  431. package/dist/billing/modules/usage/hooks/useUsage.js.map +1 -1
  432. package/dist/billing/modules/usage/hooks/useWorkspaceAiSpend.d.ts +0 -1
  433. package/dist/billing/modules/usage/hooks/useWorkspaceAiSpend.js +12 -13
  434. package/dist/billing/modules/usage/hooks/useWorkspaceAiSpend.js.map +1 -1
  435. package/dist/billing/modules/usage/index.d.ts +0 -1
  436. package/dist/billing/modules/usage/index.js +1 -2
  437. package/dist/billing/modules/usage/pages/UsagePage.d.ts +0 -1
  438. package/dist/billing/modules/usage/pages/UsagePage.js +229 -227
  439. package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
  440. package/dist/billing/modules/usage/pages/index.d.ts +0 -1
  441. package/dist/billing/modules/usage/pages/index.js +1 -1
  442. package/dist/billing/modules/usage/utils/aiSpend.d.ts +0 -1
  443. package/dist/billing/modules/usage/utils/aiSpend.js +2 -3
  444. package/dist/billing/modules/usage/utils/aiSpend.js.map +1 -1
  445. package/dist/billing/providers/BillingProvider.d.ts +0 -1
  446. package/dist/billing/providers/BillingProvider.js +3 -4
  447. package/dist/billing/providers/BillingProvider.js.map +1 -1
  448. package/dist/billing/shared/components/AccessDenied.d.ts +0 -1
  449. package/dist/billing/shared/components/AccessDenied.js +1 -2
  450. package/dist/billing/shared/components/AccessDenied.js.map +1 -1
  451. package/dist/billing/shared/components/ActorIdentity.d.ts +0 -1
  452. package/dist/billing/shared/components/ActorIdentity.js +2 -3
  453. package/dist/billing/shared/components/ActorIdentity.js.map +1 -1
  454. package/dist/billing/shared/components/CurrencyPriceOverridesEditor.d.ts +0 -1
  455. package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js +1 -2
  456. package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js.map +1 -1
  457. package/dist/billing/shared/components/EmptyState.d.ts +0 -1
  458. package/dist/billing/shared/components/EmptyState.js +1 -2
  459. package/dist/billing/shared/components/EmptyState.js.map +1 -1
  460. package/dist/billing/shared/components/GeoPricingOverridesEditor.d.ts +0 -1
  461. package/dist/billing/shared/components/PageHeader.d.ts +0 -1
  462. package/dist/billing/shared/components/PageHeader.js +1 -2
  463. package/dist/billing/shared/components/PageHeader.js.map +1 -1
  464. package/dist/billing/shared/components/PushPermissionNudge.d.ts +0 -1
  465. package/dist/billing/shared/components/PushPermissionNudge.js +2 -3
  466. package/dist/billing/shared/components/PushPermissionNudge.js.map +1 -1
  467. package/dist/billing/shared/components/ServerError.d.ts +0 -1
  468. package/dist/billing/shared/components/ServerError.js +1 -2
  469. package/dist/billing/shared/components/ServerError.js.map +1 -1
  470. package/dist/billing/shared/components/StatCard.d.ts +0 -1
  471. package/dist/billing/shared/components/StatCard.js +1 -2
  472. package/dist/billing/shared/components/StatCard.js.map +1 -1
  473. package/dist/billing/shared/components/index.d.ts +0 -1
  474. package/dist/billing/shared/components/index.js +8 -7
  475. package/dist/billing/shared/hooks/index.d.ts +0 -1
  476. package/dist/billing/shared/hooks/index.js +1 -1
  477. package/dist/billing/shared/hooks/useActorProfiles.d.ts +0 -1
  478. package/dist/billing/shared/hooks/useActorProfiles.js +4 -8
  479. package/dist/billing/shared/hooks/useActorProfiles.js.map +1 -1
  480. package/dist/billing/shared/hooks/useTr.d.ts +0 -1
  481. package/dist/billing/shared/hooks/useTr.js +1 -2
  482. package/dist/billing/shared/hooks/useTr.js.map +1 -1
  483. package/dist/billing/shared/index.d.ts +0 -1
  484. package/dist/billing/shared/types/graphql.d.ts +0 -1
  485. package/dist/billing/shared/types/graphql.js +1 -2
  486. package/dist/billing/shared/types/graphql.js.map +1 -1
  487. package/dist/billing/shared/types/index.d.ts +0 -1
  488. package/dist/billing/shared/ui/Card.d.ts +1 -2
  489. package/dist/billing/shared/ui/Card.js +1 -2
  490. package/dist/billing/shared/ui/Card.js.map +1 -1
  491. package/dist/billing/shared/ui/MetricCard.d.ts +1 -2
  492. package/dist/billing/shared/ui/MetricCard.js +1 -2
  493. package/dist/billing/shared/ui/MetricCard.js.map +1 -1
  494. package/dist/billing/shared/ui/ProgressBar.d.ts +1 -2
  495. package/dist/billing/shared/ui/ProgressBar.js +1 -2
  496. package/dist/billing/shared/ui/ProgressBar.js.map +1 -1
  497. package/dist/billing/shared/ui/SectionHeader.d.ts +1 -2
  498. package/dist/billing/shared/ui/StatusPill.d.ts +1 -2
  499. package/dist/billing/shared/ui/StatusPill.js +1 -2
  500. package/dist/billing/shared/ui/StatusPill.js.map +1 -1
  501. package/dist/billing/shared/ui/index.d.ts +0 -1
  502. package/dist/billing/shared/ui/index.js +5 -4
  503. package/dist/billing/shared/utils/directActivityGraphql.d.ts +0 -1
  504. package/dist/billing/shared/utils/directBillingGraphql.d.ts +0 -1
  505. package/dist/billing/shared/utils/directBillingGraphql.js +1 -2
  506. package/dist/billing/shared/utils/directBillingGraphql.js.map +1 -1
  507. package/dist/billing/shared/utils/error.d.ts +0 -1
  508. package/dist/billing/shared/utils/error.js +1 -2
  509. package/dist/billing/shared/utils/error.js.map +1 -1
  510. package/dist/billing/shared/utils/format.d.ts +0 -1
  511. package/dist/billing/shared/utils/format.js +1 -2
  512. package/dist/billing/shared/utils/format.js.map +1 -1
  513. package/dist/billing/shared/utils/gatewayGraphql.d.ts +0 -1
  514. package/dist/billing/shared/utils/gatewayGraphql.js +2 -3
  515. package/dist/billing/shared/utils/gatewayGraphql.js.map +1 -1
  516. package/dist/billing/shared/utils/index.d.ts +0 -1
  517. package/dist/billing/shared/utils/index.js +9 -8
  518. package/dist/billing/shared/utils/navigation.d.ts +0 -1
  519. package/dist/billing/shared/utils/navigation.js +1 -2
  520. package/dist/billing/shared/utils/navigation.js.map +1 -1
  521. package/dist/billing/shared/utils/paymentTheme.d.ts +0 -1
  522. package/dist/billing/shared/utils/paymentTheme.js +2 -3
  523. package/dist/billing/shared/utils/paymentTheme.js.map +1 -1
  524. package/dist/billing/shared/utils/planFeatureQuantity.d.ts +0 -1
  525. package/dist/billing/shared/utils/planFeatureQuantity.js +2 -3
  526. package/dist/billing/shared/utils/planFeatureQuantity.js.map +1 -1
  527. package/dist/billing/shared/utils/status.d.ts +0 -1
  528. package/dist/billing/shared/utils/status.js +24 -25
  529. package/dist/billing/shared/utils/status.js.map +1 -1
  530. package/dist/billing/shared/utils/tokens.d.ts +0 -1
  531. package/dist/billing/shared/utils/tokens.js +1 -2
  532. package/dist/billing/shared/utils/tokens.js.map +1 -1
  533. package/dist/billing/translations/en.d.ts +0 -1
  534. package/dist/billing/types/index.d.ts +0 -1
  535. package/dist/dev/main.d.ts +0 -1
  536. package/dist/generated/global-operations.d.ts +3252 -3206
  537. package/dist/generated/global-operations.js +445 -422
  538. package/dist/generated/global-operations.js.map +1 -1
  539. package/dist/generated/global-types.d.ts +2 -22
  540. package/dist/generated/global-types.js +1 -2
  541. package/dist/generated/global-types.js.map +1 -1
  542. package/dist/generated/wspace-operations.d.ts +76 -47
  543. package/dist/generated/wspace-operations.js +2 -3
  544. package/dist/generated/wspace-operations.js.map +1 -1
  545. package/dist/generated/wspace-types.d.ts +4 -24
  546. package/dist/index.d.ts +0 -1
  547. package/dist/index.js +1 -2
  548. package/dist/node_modules/@capacitor/core/dist/index.js +12 -14
  549. package/dist/node_modules/@capacitor/core/dist/index.js.map +1 -1
  550. package/dist/node_modules/sonner/dist/index.js +75 -69
  551. package/dist/node_modules/sonner/dist/index.js.map +1 -1
  552. package/dist/utils/nativeBridge.d.ts +0 -1
  553. package/dist/utils/nativeBridge.js +1 -2
  554. package/package.json +65 -54
  555. package/dist/billing/BillingAdminRoutes.d.ts.map +0 -1
  556. package/dist/billing/BillingRoot.d.ts.map +0 -1
  557. package/dist/billing/BillingUserRoutes.d.ts.map +0 -1
  558. package/dist/billing/hooks/useBillingAccountSelection.d.ts.map +0 -1
  559. package/dist/billing/hooks/useBillingEventEmitter.d.ts.map +0 -1
  560. package/dist/billing/hooks/useBillingNavigate.d.ts.map +0 -1
  561. package/dist/billing/hooks/useBillingPermissions.d.ts.map +0 -1
  562. package/dist/billing/hooks/useDefaultBillingCurrency.d.ts.map +0 -1
  563. package/dist/billing/hooks/useProducts.d.ts.map +0 -1
  564. package/dist/billing/index.d.ts.map +0 -1
  565. package/dist/billing/lib/native-purchases.d.ts.map +0 -1
  566. package/dist/billing/modules/addons/components/FloatingCartDrawer.d.ts.map +0 -1
  567. package/dist/billing/modules/addons/hooks/index.d.ts.map +0 -1
  568. package/dist/billing/modules/addons/hooks/useAddonPurchaseEligibility.d.ts.map +0 -1
  569. package/dist/billing/modules/addons/hooks/useAddons.d.ts.map +0 -1
  570. package/dist/billing/modules/addons/index.d.ts.map +0 -1
  571. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.d.ts.map +0 -1
  572. package/dist/billing/modules/addons/pages/AddonCreatePage.d.ts.map +0 -1
  573. package/dist/billing/modules/addons/pages/AddonDetailPage.d.ts.map +0 -1
  574. package/dist/billing/modules/addons/pages/AddonEditPage.d.ts.map +0 -1
  575. package/dist/billing/modules/addons/pages/AddonsBrowsePage.d.ts.map +0 -1
  576. package/dist/billing/modules/addons/pages/AddonsListPage.d.ts.map +0 -1
  577. package/dist/billing/modules/addons/pages/index.d.ts.map +0 -1
  578. package/dist/billing/modules/addons/store/addonCartStore.d.ts.map +0 -1
  579. package/dist/billing/modules/affiliate/api.d.ts.map +0 -1
  580. package/dist/billing/modules/affiliate/index.d.ts.map +0 -1
  581. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.d.ts.map +0 -1
  582. package/dist/billing/modules/analytics/index.d.ts.map +0 -1
  583. package/dist/billing/modules/analytics/pages/AnalyticsPage.d.ts.map +0 -1
  584. package/dist/billing/modules/analytics/pages/index.d.ts.map +0 -1
  585. package/dist/billing/modules/billing/hooks/index.d.ts.map +0 -1
  586. package/dist/billing/modules/billing/hooks/useInvoices.d.ts.map +0 -1
  587. package/dist/billing/modules/billing/hooks/useOrderCallbacks.d.ts.map +0 -1
  588. package/dist/billing/modules/billing/hooks/usePayments.d.ts.map +0 -1
  589. package/dist/billing/modules/billing/hooks/useRefunds.d.ts.map +0 -1
  590. package/dist/billing/modules/billing/hooks/useTransactions.d.ts.map +0 -1
  591. package/dist/billing/modules/billing/index.d.ts.map +0 -1
  592. package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.d.ts.map +0 -1
  593. package/dist/billing/modules/billing/pages/InvoiceDetailPage.d.ts.map +0 -1
  594. package/dist/billing/modules/billing/pages/InvoicesListPage.d.ts.map +0 -1
  595. package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.d.ts.map +0 -1
  596. package/dist/billing/modules/billing/pages/PaymentMethodsPage.d.ts.map +0 -1
  597. package/dist/billing/modules/billing/pages/RefundIssueLogsPage.d.ts.map +0 -1
  598. package/dist/billing/modules/billing/pages/RefundsPage.d.ts.map +0 -1
  599. package/dist/billing/modules/billing/pages/TransactionsPage.d.ts.map +0 -1
  600. package/dist/billing/modules/billing/pages/UserRefundsPage.d.ts.map +0 -1
  601. package/dist/billing/modules/billing/pages/index.d.ts.map +0 -1
  602. package/dist/billing/modules/checkout/components/AutoPayToggle.d.ts.map +0 -1
  603. package/dist/billing/modules/checkout/components/BillingAccountSelector.d.ts.map +0 -1
  604. package/dist/billing/modules/checkout/components/CompactAutoPayToggle.d.ts.map +0 -1
  605. package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.d.ts.map +0 -1
  606. package/dist/billing/modules/checkout/components/CreditsAmountInput.d.ts.map +0 -1
  607. package/dist/billing/modules/checkout/components/CreditsPaymentOption.d.ts.map +0 -1
  608. package/dist/billing/modules/checkout/components/CurrencySelector.d.ts.map +0 -1
  609. package/dist/billing/modules/checkout/components/NativeCheckoutView.d.ts.map +0 -1
  610. package/dist/billing/modules/checkout/components/OrderSummary.d.ts.map +0 -1
  611. package/dist/billing/modules/checkout/components/PaymentProviderSelector.d.ts.map +0 -1
  612. package/dist/billing/modules/checkout/components/PromoCodeInput.d.ts.map +0 -1
  613. package/dist/billing/modules/checkout/components/RazorpayPaymentButton.d.ts.map +0 -1
  614. package/dist/billing/modules/checkout/components/SavedCardSelector.d.ts.map +0 -1
  615. package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.d.ts.map +0 -1
  616. package/dist/billing/modules/checkout/components/StoreShippingSection.d.ts.map +0 -1
  617. package/dist/billing/modules/checkout/components/StripePaymentForm.d.ts.map +0 -1
  618. package/dist/billing/modules/checkout/components/SubscriptionSelector.d.ts.map +0 -1
  619. package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.d.ts.map +0 -1
  620. package/dist/billing/modules/checkout/components/WebCheckoutRedirectView.d.ts.map +0 -1
  621. package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.d.ts.map +0 -1
  622. package/dist/billing/modules/checkout/components/index.d.ts.map +0 -1
  623. package/dist/billing/modules/checkout/hooks/index.d.ts.map +0 -1
  624. package/dist/billing/modules/checkout/hooks/useCheckout.d.ts.map +0 -1
  625. package/dist/billing/modules/checkout/hooks/useNativeCheckout.d.ts.map +0 -1
  626. package/dist/billing/modules/checkout/hooks/usePaymentProviders.d.ts.map +0 -1
  627. package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.d.ts.map +0 -1
  628. package/dist/billing/modules/checkout/hooks/useStoreShipping.d.ts.map +0 -1
  629. package/dist/billing/modules/checkout/index.d.ts.map +0 -1
  630. package/dist/billing/modules/checkout/pages/CheckoutPage.d.ts.map +0 -1
  631. package/dist/billing/modules/checkout/pages/index.d.ts.map +0 -1
  632. package/dist/billing/modules/checkout/types/index.d.ts.map +0 -1
  633. package/dist/billing/modules/checkout/utils/storeOrder.d.ts.map +0 -1
  634. package/dist/billing/modules/coupons/index.d.ts.map +0 -1
  635. package/dist/billing/modules/coupons/pages/CouponDetailPage.d.ts.map +0 -1
  636. package/dist/billing/modules/coupons/pages/CouponsListPage.d.ts.map +0 -1
  637. package/dist/billing/modules/coupons/pages/CreateCouponPage.d.ts.map +0 -1
  638. package/dist/billing/modules/coupons/pages/EditCouponPage.d.ts.map +0 -1
  639. package/dist/billing/modules/coupons/pages/index.d.ts.map +0 -1
  640. package/dist/billing/modules/credits/hooks/index.d.ts.map +0 -1
  641. package/dist/billing/modules/credits/hooks/useCredits.d.ts.map +0 -1
  642. package/dist/billing/modules/credits/index.d.ts.map +0 -1
  643. package/dist/billing/modules/credits/pages/AdminCreditsPage.d.ts.map +0 -1
  644. package/dist/billing/modules/credits/pages/CreditTransactionsPage.d.ts.map +0 -1
  645. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.d.ts.map +0 -1
  646. package/dist/billing/modules/credits/pages/CreditsPage.d.ts.map +0 -1
  647. package/dist/billing/modules/credits/pages/index.d.ts.map +0 -1
  648. package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.d.ts.map +0 -1
  649. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.d.ts.map +0 -1
  650. package/dist/billing/modules/dashboard/components/BillingAccountCard.d.ts.map +0 -1
  651. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.d.ts.map +0 -1
  652. package/dist/billing/modules/dashboard/components/PaymentMethodsSection.d.ts.map +0 -1
  653. package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.d.ts.map +0 -1
  654. package/dist/billing/modules/dashboard/components/index.d.ts.map +0 -1
  655. package/dist/billing/modules/dashboard/hooks/index.d.ts.map +0 -1
  656. package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.d.ts.map +0 -1
  657. package/dist/billing/modules/dashboard/hooks/useDashboard.d.ts.map +0 -1
  658. package/dist/billing/modules/dashboard/index.d.ts.map +0 -1
  659. package/dist/billing/modules/dashboard/pages/OverviewPage.d.ts.map +0 -1
  660. package/dist/billing/modules/dashboard/pages/index.d.ts.map +0 -1
  661. package/dist/billing/modules/discounts/index.d.ts.map +0 -1
  662. package/dist/billing/modules/discounts/pages/DiscountsListPage.d.ts.map +0 -1
  663. package/dist/billing/modules/discounts/pages/index.d.ts.map +0 -1
  664. package/dist/billing/modules/earnings/api.d.ts.map +0 -1
  665. package/dist/billing/modules/earnings/index.d.ts.map +0 -1
  666. package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.d.ts.map +0 -1
  667. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.d.ts.map +0 -1
  668. package/dist/billing/modules/earnings/pages/EarningsPage.d.ts.map +0 -1
  669. package/dist/billing/modules/earnings/pages/PayoutAdminPage.d.ts.map +0 -1
  670. package/dist/billing/modules/earnings/pages/PayoutsPage.d.ts.map +0 -1
  671. package/dist/billing/modules/earnings/payoutAccountStatus.d.ts.map +0 -1
  672. package/dist/billing/modules/plans/constants/enterprise.d.ts.map +0 -1
  673. package/dist/billing/modules/plans/constants/featuredQuotas.d.ts.map +0 -1
  674. package/dist/billing/modules/plans/hooks/index.d.ts.map +0 -1
  675. package/dist/billing/modules/plans/hooks/usePlans.d.ts.map +0 -1
  676. package/dist/billing/modules/plans/hooks/useQuotas.d.ts.map +0 -1
  677. package/dist/billing/modules/plans/index.d.ts.map +0 -1
  678. package/dist/billing/modules/plans/pages/PlanAssignFreePage.d.ts.map +0 -1
  679. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.d.ts.map +0 -1
  680. package/dist/billing/modules/plans/pages/PlanCreatePage.d.ts.map +0 -1
  681. package/dist/billing/modules/plans/pages/PlanDetailPage.d.ts.map +0 -1
  682. package/dist/billing/modules/plans/pages/PlanEditPage.d.ts.map +0 -1
  683. package/dist/billing/modules/plans/pages/PlansBrowsePage.d.ts.map +0 -1
  684. package/dist/billing/modules/plans/pages/PlansListPage.d.ts.map +0 -1
  685. package/dist/billing/modules/plans/pages/index.d.ts.map +0 -1
  686. package/dist/billing/modules/plans/utils/currencyPriceOverrides.d.ts.map +0 -1
  687. package/dist/billing/modules/plans/utils/planSelector.d.ts.map +0 -1
  688. package/dist/billing/modules/promotions/index.d.ts.map +0 -1
  689. package/dist/billing/modules/promotions/pages/CreatePromotionPage.d.ts.map +0 -1
  690. package/dist/billing/modules/promotions/pages/PromotionsListPage.d.ts.map +0 -1
  691. package/dist/billing/modules/promotions/pages/index.d.ts.map +0 -1
  692. package/dist/billing/modules/quota/hooks/index.d.ts.map +0 -1
  693. package/dist/billing/modules/quota/hooks/useQuota.d.ts.map +0 -1
  694. package/dist/billing/modules/quota/hooks/useQuotaTemplates.d.ts.map +0 -1
  695. package/dist/billing/modules/quota/index.d.ts.map +0 -1
  696. package/dist/billing/modules/quota/pages/QuotaAssignFreePage.d.ts.map +0 -1
  697. package/dist/billing/modules/quota/pages/QuotaPage.d.ts.map +0 -1
  698. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.d.ts.map +0 -1
  699. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.d.ts.map +0 -1
  700. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.d.ts.map +0 -1
  701. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.d.ts.map +0 -1
  702. package/dist/billing/modules/quota/pages/index.d.ts.map +0 -1
  703. package/dist/billing/modules/quota/utils/quotaSelector.d.ts.map +0 -1
  704. package/dist/billing/modules/settings/index.d.ts.map +0 -1
  705. package/dist/billing/modules/settings/pages/SettingsPage.d.ts.map +0 -1
  706. package/dist/billing/modules/settings/pages/TeamPermissionsPage.d.ts.map +0 -1
  707. package/dist/billing/modules/settings/pages/index.d.ts.map +0 -1
  708. package/dist/billing/modules/store/graphql/index.d.ts.map +0 -1
  709. package/dist/billing/modules/store/index.d.ts.map +0 -1
  710. package/dist/billing/modules/store/pages/StoreCheckoutPage.d.ts.map +0 -1
  711. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.d.ts.map +0 -1
  712. package/dist/billing/modules/subscriptions/hooks/index.d.ts.map +0 -1
  713. package/dist/billing/modules/subscriptions/hooks/useSubscriptions.d.ts.map +0 -1
  714. package/dist/billing/modules/subscriptions/index.d.ts.map +0 -1
  715. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.d.ts.map +0 -1
  716. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.d.ts.map +0 -1
  717. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.d.ts.map +0 -1
  718. package/dist/billing/modules/subscriptions/pages/index.d.ts.map +0 -1
  719. package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.d.ts.map +0 -1
  720. package/dist/billing/modules/usage/hooks/index.d.ts.map +0 -1
  721. package/dist/billing/modules/usage/hooks/useUsage.d.ts.map +0 -1
  722. package/dist/billing/modules/usage/hooks/useWorkspaceAiSpend.d.ts.map +0 -1
  723. package/dist/billing/modules/usage/index.d.ts.map +0 -1
  724. package/dist/billing/modules/usage/pages/UsagePage.d.ts.map +0 -1
  725. package/dist/billing/modules/usage/pages/index.d.ts.map +0 -1
  726. package/dist/billing/modules/usage/utils/aiSpend.d.ts.map +0 -1
  727. package/dist/billing/providers/BillingProvider.d.ts.map +0 -1
  728. package/dist/billing/shared/components/AccessDenied.d.ts.map +0 -1
  729. package/dist/billing/shared/components/ActorIdentity.d.ts.map +0 -1
  730. package/dist/billing/shared/components/CurrencyPriceOverridesEditor.d.ts.map +0 -1
  731. package/dist/billing/shared/components/EmptyState.d.ts.map +0 -1
  732. package/dist/billing/shared/components/GeoPricingOverridesEditor.d.ts.map +0 -1
  733. package/dist/billing/shared/components/PageHeader.d.ts.map +0 -1
  734. package/dist/billing/shared/components/PushPermissionNudge.d.ts.map +0 -1
  735. package/dist/billing/shared/components/ServerError.d.ts.map +0 -1
  736. package/dist/billing/shared/components/StatCard.d.ts.map +0 -1
  737. package/dist/billing/shared/components/index.d.ts.map +0 -1
  738. package/dist/billing/shared/hooks/index.d.ts.map +0 -1
  739. package/dist/billing/shared/hooks/useActorProfiles.d.ts.map +0 -1
  740. package/dist/billing/shared/hooks/useTr.d.ts.map +0 -1
  741. package/dist/billing/shared/index.d.ts.map +0 -1
  742. package/dist/billing/shared/types/graphql.d.ts.map +0 -1
  743. package/dist/billing/shared/types/index.d.ts.map +0 -1
  744. package/dist/billing/shared/ui/Card.d.ts.map +0 -1
  745. package/dist/billing/shared/ui/MetricCard.d.ts.map +0 -1
  746. package/dist/billing/shared/ui/ProgressBar.d.ts.map +0 -1
  747. package/dist/billing/shared/ui/SectionHeader.d.ts.map +0 -1
  748. package/dist/billing/shared/ui/StatusPill.d.ts.map +0 -1
  749. package/dist/billing/shared/ui/index.d.ts.map +0 -1
  750. package/dist/billing/shared/utils/directActivityGraphql.d.ts.map +0 -1
  751. package/dist/billing/shared/utils/directBillingGraphql.d.ts.map +0 -1
  752. package/dist/billing/shared/utils/error.d.ts.map +0 -1
  753. package/dist/billing/shared/utils/format.d.ts.map +0 -1
  754. package/dist/billing/shared/utils/gatewayGraphql.d.ts.map +0 -1
  755. package/dist/billing/shared/utils/index.d.ts.map +0 -1
  756. package/dist/billing/shared/utils/navigation.d.ts.map +0 -1
  757. package/dist/billing/shared/utils/paymentTheme.d.ts.map +0 -1
  758. package/dist/billing/shared/utils/planFeatureQuantity.d.ts.map +0 -1
  759. package/dist/billing/shared/utils/status.d.ts.map +0 -1
  760. package/dist/billing/shared/utils/tokens.d.ts.map +0 -1
  761. package/dist/billing/translations/en.d.ts.map +0 -1
  762. package/dist/billing/types/index.d.ts.map +0 -1
  763. package/dist/dev/main.d.ts.map +0 -1
  764. package/dist/generated/global-operations.d.ts.map +0 -1
  765. package/dist/generated/global-types.d.ts.map +0 -1
  766. package/dist/generated/wspace-operations.d.ts.map +0 -1
  767. package/dist/generated/wspace-types.d.ts.map +0 -1
  768. package/dist/index.d.ts.map +0 -1
  769. package/dist/utils/nativeBridge.d.ts.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import { GetBillingWebhookLogsDocument as e, GetPendingRefundsDocument as t, GetRefundRecordsDocument as n, GetRefundStatsDocument as r, GetUnprocessedFailedWebhooksDocument as i, useCreateRefundRecordFromWebhookMutation as a, useCreateRefundRecordMutation as o, useCreateRefundRecordsFromFailedWebhooksMutation as s, useGetBillingWebhookLogsQuery as c, useGetRefundRecordsQuery as l, useGetRefundStatsQuery as u, useGetUnprocessedFailedWebhooksQuery as d, useProcessRefundMutation as f, useRetryRefundMutation as p, useSkipRefundMutation as m } from "../../../../generated/global-operations.js";
2
2
  import { useCallback as h, useEffect as g, useMemo as _, useState as v } from "react";
3
3
  import { useApolloClient as y } from "@apollo/client/react";
4
- //#region src/billing/modules/billing/hooks/useRefunds.ts
4
+ // src/billing/modules/billing/hooks/useRefunds.ts
5
5
  var b = 20;
6
6
  function x(e = {}) {
7
7
  let t = e.pageSize || b, [n, r] = v(0), [i, a] = v(e.filters || {});
@@ -178,7 +178,6 @@ function E(e = {}) {
178
178
  refetchWebhooks: i.refetch
179
179
  };
180
180
  }
181
- //#endregion
182
181
  export { w as useBillingWebhookLogs, T as useRefundMutations, x as useRefundRecords, S as useRefundStats, E as useRefunds, C as useUnprocessedFailedWebhooks };
183
182
 
184
183
  //# sourceMappingURL=useRefunds.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useRefunds.js","names":[],"sources":["../../../../../src/billing/modules/billing/hooks/useRefunds.ts"],"sourcesContent":["/**\n * Billing Module - useRefunds Hook\n * Provides access to refund records, statistics, and mutations\n */\n\nimport { useApolloClient } from '@apollo/client/react';\nimport { useCallback, useState, useMemo, useEffect } from 'react';\nimport {\n useGetRefundRecordsQuery,\n useGetPendingRefundsQuery,\n useGetRefundRecordQuery,\n useGetRefundStatsQuery,\n useGetUnprocessedFailedWebhooksQuery,\n useGetBillingWebhookLogsQuery,\n useCreateRefundRecordMutation,\n useProcessRefundMutation,\n useSkipRefundMutation,\n useRetryRefundMutation,\n useCreateRefundRecordsFromFailedWebhooksMutation,\n useCreateRefundRecordFromWebhookMutation,\n GetRefundRecordsDocument,\n GetPendingRefundsDocument,\n GetRefundStatsDocument,\n GetUnprocessedFailedWebhooksDocument,\n GetBillingWebhookLogsDocument,\n} from '../../../../generated/global-operations';\n\n// ============================================================================\n// Types\n// ============================================================================\n\nexport type RefundRecordStatus = 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED' | 'SKIPPED';\nexport type RefundSource =\n | 'MANUAL'\n | 'WEBHOOK_RECOVERY'\n | 'SUBSCRIPTION_CANCEL'\n | 'DUPLICATE_PAYMENT';\n\nexport interface RefundRecord {\n id: string;\n orgId: string;\n billingAccountId: string | null;\n source: RefundSource;\n status: RefundRecordStatus;\n provider: string;\n gatewayPaymentId: string;\n gatewayOrderId: string | null;\n amount: number;\n currency: string;\n purchaseType: string | null;\n purchaseDetail: string | null;\n reason: string | null;\n notes: string | null;\n webhookLogId: string | null;\n transactionId: string | null;\n processedBy: string | null;\n processedAt: string | null;\n gatewayRefundId: string | null;\n errorMessage: string | null;\n retryCount: number;\n metadata: Record<string, unknown> | null;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface RefundStats {\n pending: number;\n processing: number;\n completed: number;\n failed: number;\n skipped: number;\n totalPendingAmount: number;\n totalCompletedAmount: number;\n}\n\nexport interface WebhookLog {\n id: string;\n event: string;\n provider: string;\n payload: Record<string, unknown>;\n processed: boolean;\n error: string | null;\n createdAt: string;\n}\n\nexport interface RefundRecordFilters {\n status?: RefundRecordStatus;\n source?: RefundSource;\n provider?: string;\n billingAccountId?: string;\n fromDate?: string;\n toDate?: string;\n /** true → only refunds carrying a non-null errorMessage (an unresolved\n * accounting/reconciliation issue). Powers the admin refund issue log. */\n hasError?: boolean;\n /** Free-text, matched against the refund id, the originating transaction\n * id, the gateway payment id, and the gateway refund id — lets an admin\n * find the refund/issue that belongs to a specific transaction. */\n search?: string;\n}\n\nexport interface CreateRefundRecordInput {\n billingAccountId?: string;\n provider: string;\n gatewayPaymentId: string;\n gatewayOrderId?: string;\n amount: number;\n currency: string;\n purchaseType?: string;\n purchaseDetail?: string;\n reason?: string;\n notes?: string;\n transactionId?: string;\n metadata?: Record<string, unknown>;\n}\n\nexport interface ProcessRefundResult {\n success: boolean;\n refundRecord: RefundRecord | null;\n gatewayRefundId: string | null;\n error: string | null;\n}\n\ninterface PaginationInfo {\n totalCount: number;\n hasMore: boolean;\n page: number;\n pageSize: number;\n hasPrevious: boolean;\n}\n\n// ============================================================================\n// Hook Results\n// ============================================================================\n\ninterface UseRefundRecordsOptions {\n pageSize?: number;\n filters?: RefundRecordFilters;\n}\n\ninterface UseRefundRecordsResult {\n records: RefundRecord[];\n pagination: PaginationInfo;\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n goToNextPage: () => void;\n goToPreviousPage: () => void;\n goToPage: (page: number) => void;\n setFilters: (filters: RefundRecordFilters) => void;\n}\n\ninterface UseRefundStatsResult {\n stats: RefundStats | null;\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n}\n\ninterface UseRefundRecordResult {\n record: RefundRecord | null;\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n}\n\ninterface UseUnprocessedWebhooksResult {\n webhooks: WebhookLog[];\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n}\n\nexport interface BillingWebhookLogFilters {\n processed?: boolean;\n provider?: string;\n hasError?: boolean;\n}\n\ninterface UseBillingWebhookLogsResult {\n logs: WebhookLog[];\n totalCount: number;\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n}\n\ninterface UseRefundMutationsResult {\n createRefundRecord: (input: CreateRefundRecordInput) => Promise<RefundRecord>;\n processRefund: (id: string, notes?: string) => Promise<ProcessRefundResult>;\n skipRefund: (id: string, reason: string) => Promise<RefundRecord>;\n retryRefund: (id: string) => Promise<ProcessRefundResult>;\n createRefundRecordsFromFailedWebhooks: () => Promise<RefundRecord[]>;\n createRefundRecordFromWebhook: (webhookLogId: string) => Promise<RefundRecord | null>;\n isCreating: boolean;\n isProcessing: boolean;\n isSkipping: boolean;\n isRetrying: boolean;\n isCreatingFromWebhooks: boolean;\n isCreatingFromWebhook: boolean;\n}\n\n// ============================================================================\n// Hooks\n// ============================================================================\n\nconst DEFAULT_PAGE_SIZE = 20;\n\n/**\n * Hook for fetching paginated refund records with filters\n */\nexport function useRefundRecords(options: UseRefundRecordsOptions = {}): UseRefundRecordsResult {\n const pageSize = options.pageSize || DEFAULT_PAGE_SIZE;\n const [currentPage, setCurrentPage] = useState(0);\n const [filters, setFilters] = useState<RefundRecordFilters>(options.filters || {});\n\n // Update filters when options change (e.g., when tab changes)\n useEffect(() => {\n setFilters(options.filters || {});\n setCurrentPage(0); // Reset to first page when filters change externally\n }, [options.filters]);\n\n const { data, loading, error, refetch } = useGetRefundRecordsQuery({\n variables: {\n ...filters,\n page: currentPage,\n pageSize,\n },\n fetchPolicy: 'cache-and-network',\n });\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n const result = data?.getRefundRecords;\n\n const goToNextPage = useCallback(() => {\n if (result?.hasMore) {\n setCurrentPage((prev) => prev + 1);\n }\n }, [result?.hasMore]);\n\n const goToPreviousPage = useCallback(() => {\n if (currentPage > 0) {\n setCurrentPage((prev) => prev - 1);\n }\n }, [currentPage]);\n\n const goToPage = useCallback(\n (page: number) => {\n const totalPages = result ? Math.ceil(result.totalCount / pageSize) : 0;\n if (page >= 0 && page < totalPages) {\n setCurrentPage(page);\n }\n },\n [result, pageSize]\n );\n\n const handleSetFilters = useCallback((newFilters: RefundRecordFilters) => {\n setFilters(newFilters);\n setCurrentPage(0); // Reset to first page when filters change\n }, []);\n\n return {\n records: result?.records || [],\n pagination: {\n totalCount: result?.totalCount || 0,\n hasMore: result?.hasMore || false,\n page: currentPage,\n pageSize,\n hasPrevious: currentPage > 0,\n },\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n goToNextPage,\n goToPreviousPage,\n goToPage,\n setFilters: handleSetFilters,\n };\n}\n\n/**\n * Hook for fetching pending refund records (shortcut)\n */\nexport function usePendingRefunds(pageSize = DEFAULT_PAGE_SIZE): UseRefundRecordsResult {\n const [currentPage, setCurrentPage] = useState(0);\n\n const { data, loading, error, refetch } = useGetPendingRefundsQuery({\n variables: { page: currentPage, pageSize },\n fetchPolicy: 'cache-and-network',\n });\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n const result = data?.getPendingRefunds;\n\n const goToNextPage = useCallback(() => {\n if (result?.hasMore) {\n setCurrentPage((prev) => prev + 1);\n }\n }, [result?.hasMore]);\n\n const goToPreviousPage = useCallback(() => {\n if (currentPage > 0) {\n setCurrentPage((prev) => prev - 1);\n }\n }, [currentPage]);\n\n const goToPage = useCallback(\n (page: number) => {\n const totalPages = result ? Math.ceil(result.totalCount / pageSize) : 0;\n if (page >= 0 && page < totalPages) {\n setCurrentPage(page);\n }\n },\n [result, pageSize]\n );\n\n return {\n records: result?.records || [],\n pagination: {\n totalCount: result?.totalCount || 0,\n hasMore: result?.hasMore || false,\n page: currentPage,\n pageSize,\n hasPrevious: currentPage > 0,\n },\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n goToNextPage,\n goToPreviousPage,\n goToPage,\n setFilters: () => {}, // No-op for pending refunds\n };\n}\n\n/**\n * Hook for fetching refund statistics\n */\nexport function useRefundStats(): UseRefundStatsResult {\n const { data, loading, error, refetch } = useGetRefundStatsQuery({\n fetchPolicy: 'cache-and-network',\n });\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n return {\n stats: data?.getRefundStats || null,\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for fetching a single refund record by ID\n */\nexport function useRefundRecord(id: string | undefined): UseRefundRecordResult {\n const { data, loading, error, refetch } = useGetRefundRecordQuery({\n variables: { id: id! },\n skip: !id,\n fetchPolicy: 'cache-and-network',\n });\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n return {\n record: data?.getRefundRecord || null,\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for fetching unprocessed failed webhooks\n */\nexport function useUnprocessedFailedWebhooks(): UseUnprocessedWebhooksResult {\n const { data, loading, error, refetch } = useGetUnprocessedFailedWebhooksQuery({\n fetchPolicy: 'cache-and-network',\n });\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n return {\n webhooks: data?.getUnprocessedFailedWebhooks || [],\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for the admin billing-webhook-log viewer — paginated, filterable view\n * over ALL webhook log rows (unlike useUnprocessedFailedWebhooks, which only\n * scans the narrow refund-candidate subset).\n */\nexport function useBillingWebhookLogs(\n filters: BillingWebhookLogFilters,\n page: number,\n pageSize: number\n): UseBillingWebhookLogsResult {\n const { data, loading, error, refetch } = useGetBillingWebhookLogsQuery({\n variables: {\n limit: pageSize,\n offset: page * pageSize,\n processed: filters.processed,\n provider: filters.provider,\n hasError: filters.hasError,\n },\n fetchPolicy: 'cache-and-network',\n });\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n return {\n logs: data?.getBillingWebhookLogs.logs || [],\n totalCount: data?.getBillingWebhookLogs.totalCount || 0,\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for refund mutations\n */\nexport function useRefundMutations(): UseRefundMutationsResult {\n const client = useApolloClient();\n\n const [createRefundRecordMutation, { loading: isCreating }] = useCreateRefundRecordMutation();\n const [processRefundMutation, { loading: isProcessing }] = useProcessRefundMutation();\n const [skipRefundMutation, { loading: isSkipping }] = useSkipRefundMutation();\n const [retryRefundMutation, { loading: isRetrying }] = useRetryRefundMutation();\n const [createFromWebhooksMutation, { loading: isCreatingFromWebhooks }] =\n useCreateRefundRecordsFromFailedWebhooksMutation();\n const [createFromWebhookMutation, { loading: isCreatingFromWebhook }] =\n useCreateRefundRecordFromWebhookMutation();\n\n const refetchQueries = useCallback(async () => {\n await client.refetchQueries({\n include: [GetRefundRecordsDocument, GetPendingRefundsDocument, GetRefundStatsDocument],\n });\n }, [client]);\n\n const createRefundRecord = useCallback(\n async (input: CreateRefundRecordInput): Promise<RefundRecord> => {\n const { data } = await createRefundRecordMutation({\n variables: input,\n });\n await refetchQueries();\n return data.createRefundRecord;\n },\n [createRefundRecordMutation, refetchQueries]\n );\n\n const processRefund = useCallback(\n async (id: string, notes?: string): Promise<ProcessRefundResult> => {\n const { data } = await processRefundMutation({\n variables: { id, notes },\n });\n await refetchQueries();\n return data.processRefund;\n },\n [processRefundMutation, refetchQueries]\n );\n\n const skipRefund = useCallback(\n async (id: string, reason: string): Promise<RefundRecord> => {\n const { data } = await skipRefundMutation({\n variables: { id, reason },\n });\n await refetchQueries();\n return data.skipRefund;\n },\n [skipRefundMutation, refetchQueries]\n );\n\n const retryRefund = useCallback(\n async (id: string): Promise<ProcessRefundResult> => {\n const { data } = await retryRefundMutation({\n variables: { id },\n });\n await refetchQueries();\n return data.retryRefund;\n },\n [retryRefundMutation, refetchQueries]\n );\n\n const createRefundRecordsFromFailedWebhooks = useCallback(async (): Promise<RefundRecord[]> => {\n const { data } = await createFromWebhooksMutation();\n await client.refetchQueries({\n include: [\n GetRefundRecordsDocument,\n GetPendingRefundsDocument,\n GetRefundStatsDocument,\n GetUnprocessedFailedWebhooksDocument,\n GetBillingWebhookLogsDocument,\n ],\n });\n return data!.createRefundRecordsFromFailedWebhooks;\n }, [createFromWebhooksMutation, client]);\n\n const createRefundRecordFromWebhook = useCallback(\n async (webhookLogId: string): Promise<RefundRecord | null> => {\n const { data } = await createFromWebhookMutation({\n variables: { webhookLogId },\n });\n await client.refetchQueries({\n include: [\n GetRefundRecordsDocument,\n GetPendingRefundsDocument,\n GetRefundStatsDocument,\n GetUnprocessedFailedWebhooksDocument,\n ],\n });\n return data!.createRefundRecordFromWebhook;\n },\n [createFromWebhookMutation, client]\n );\n\n return {\n createRefundRecord,\n processRefund,\n skipRefund,\n retryRefund,\n createRefundRecordsFromFailedWebhooks,\n createRefundRecordFromWebhook,\n isCreating,\n isProcessing,\n isSkipping,\n isRetrying,\n isCreatingFromWebhooks,\n isCreatingFromWebhook,\n };\n}\n\n/**\n * Combined hook for refund page with all data and mutations\n */\nexport function useRefunds(options: UseRefundRecordsOptions = {}) {\n const recordsHook = useRefundRecords(options);\n const statsHook = useRefundStats();\n const mutationsHook = useRefundMutations();\n const webhooksHook = useUnprocessedFailedWebhooks();\n\n const isLoading = useMemo(\n () => recordsHook.isLoading || statsHook.isLoading,\n [recordsHook.isLoading, statsHook.isLoading]\n );\n\n const refetchAll = useCallback(async () => {\n await Promise.all([recordsHook.refetch(), statsHook.refetch(), webhooksHook.refetch()]);\n // eslint-disable-next-line react-hooks/exhaustive-deps -- Intentional: accessing stable refetch methods from hooks\n }, [recordsHook.refetch, statsHook.refetch, webhooksHook.refetch]);\n\n return {\n // Records\n records: recordsHook.records,\n pagination: recordsHook.pagination,\n goToNextPage: recordsHook.goToNextPage,\n goToPreviousPage: recordsHook.goToPreviousPage,\n goToPage: recordsHook.goToPage,\n setFilters: recordsHook.setFilters,\n\n // Stats\n stats: statsHook.stats,\n\n // Failed webhooks\n unprocessedWebhooks: webhooksHook.webhooks,\n webhooksLoading: webhooksHook.isLoading,\n\n // Loading states\n isLoading,\n recordsError: recordsHook.error,\n statsError: statsHook.error,\n\n // Mutations\n ...mutationsHook,\n\n // Refetch\n refetch: refetchAll,\n refetchRecords: recordsHook.refetch,\n refetchStats: statsHook.refetch,\n refetchWebhooks: webhooksHook.refetch,\n };\n}\n"],"mappings":";;;;AA8MA,IAAM,IAAoB;AAK1B,SAAgB,EAAiB,IAAmC,CAAC,GAA2B;CAC9F,IAAM,IAAW,EAAQ,YAAY,GAC/B,CAAC,GAAa,KAAkB,EAAS,CAAC,GAC1C,CAAC,GAAS,KAAc,EAA8B,EAAQ,WAAW,CAAC,CAAC;CAGjF,QAAgB;EAEd,AADA,EAAW,EAAQ,WAAW,CAAC,CAAC,GAChC,EAAe,CAAC;CAClB,GAAG,CAAC,EAAQ,OAAO,CAAC;CAEpB,IAAM,EAAE,SAAM,YAAS,UAAO,eAAY,EAAyB;EACjE,WAAW;GACT,GAAG;GACH,MAAM;GACN;EACF;EACA,aAAa;CACf,CAAC,GAEK,IAAgB,EAAY,YAAY;EAC5C,MAAM,EAAQ;CAChB,GAAG,CAAC,CAAO,CAAC,GAEN,IAAS,GAAM,kBAEf,IAAe,QAAkB;EACrC,AAAI,GAAQ,WACV,GAAgB,MAAS,IAAO,CAAC;CAErC,GAAG,CAAC,GAAQ,OAAO,CAAC,GAEd,IAAmB,QAAkB;EACzC,AAAI,IAAc,KAChB,GAAgB,MAAS,IAAO,CAAC;CAErC,GAAG,CAAC,CAAW,CAAC,GAEV,IAAW,GACd,MAAiB;EAChB,IAAM,IAAa,IAAS,KAAK,KAAK,EAAO,aAAa,CAAQ,IAAI;EACtE,AAAI,KAAQ,KAAK,IAAO,KACtB,EAAe,CAAI;CAEvB,GACA,CAAC,GAAQ,CAAQ,CACnB,GAEM,IAAmB,GAAa,MAAoC;EAExE,AADA,EAAW,CAAU,GACrB,EAAe,CAAC;CAClB,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A;GACF,EACF,CAAC,GACM,EAAM;EACf,GAAG,CAAC,GAA4B,CAAM,CAyBpC;EACA,+BAxBoC,EACpC,OAAO,MAAuD;GAC5D,IAAM,EAAE,YAAS,MAAM,EAA0B,EAC/C,WAAW,EAAE,gBAAa,EAC5B,CAAC;GASD,OARA,MAAM,EAAO,eAAe,EAC1B,SAAS;IACP;IACA;IACA;IACA;GACF,EACF,CAAC,GACM,EAAM;EACf,GACA,CAAC,GAA2B,CAAM,CASlC;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF;AAKA,SAAgB,EAAW,IAAmC,CAAC,GAAG;CAChE,IAAM,IAAc,EAAiB,CAAO,GACtC,IAAY,EAAe,GAC3B,IAAgB,EAAmB,GACnC,IAAe,EAA6B,GAE5C,IAAY,QACV,EAAY,aAAa,EAAU,WACzC,CAAC,EAAY,WAAW,EAAU,SAAS,CAC7C,GAEM,IAAa,EAAY,YAAY;EACzC,MAAM,QAAQ,IAAI;GAAC,EAAY,QAAQ;GAAG,EAAU,QAAQ;GAAG,EAAa,QAAQ;EAAC,CAAC;CAExF,GAAG;EAAC,EAAY;EAAS,EAAU;EAAS,EAAa;CAAO,CAAC;CAEjE,OAAO;EAEL,SAAS,EAAY;EACrB,YAAY,EAAY;EACxB,cAAc,EAAY;EAC1B,kBAAkB,EAAY;EAC9B,UAAU,EAAY;EACtB,YAAY,EAAY;EAGxB,OAAO,EAAU;EAGjB,qBAAqB,EAAa;EAClC,iBAAiB,EAAa;EAG9B;EACA,cAAc,EAAY;EAC1B,YAAY,EAAU;EAGtB,GAAG;EAGH,SAAS;EACT,gBAAgB,EAAY;EAC5B,cAAc,EAAU;EACxB,iBAAiB,EAAa;CAChC;AACF"}
1
+ {"version":3,"file":"useRefunds.js","names":["DEFAULT_PAGE_SIZE","useRefundRecords","pageSize","options","currentPage","setCurrentPage","useState","filters","setFilters","useGetRefundRecordsQuery","handleRefetch","useCallback","refetch","result","data","goToNextPage","prev","goToPreviousPage","goToPage","totalPages","page","handleSetFilters","newFilters","loading","useRefundStats","useGetRefundStatsQuery","useUnprocessedFailedWebhooks","useGetUnprocessedFailedWebhooksQuery","useBillingWebhookLogs","useGetBillingWebhookLogsQuery","useRefundMutations","client","useApolloClient","createRefundRecordMutation","isCreating","useCreateRefundRecordMutation","processRefundMutation","isProcessing","useProcessRefundMutation","skipRefundMutation","isSkipping","useSkipRefundMutation","retryRefundMutation","isRetrying","useRetryRefundMutation","createFromWebhooksMutation","isCreatingFromWebhooks","useCreateRefundRecordsFromFailedWebhooksMutation","createFromWebhookMutation","isCreatingFromWebhook","useCreateRefundRecordFromWebhookMutation","refetchQueries","GetRefundRecordsDocument","GetPendingRefundsDocument","GetRefundStatsDocument","input","GetUnprocessedFailedWebhooksDocument","GetBillingWebhookLogsDocument","useRefunds","recordsHook","statsHook","mutationsHook","webhooksHook","isLoading","useMemo","refetchAll"],"sources":["../../../../../src/billing/modules/billing/hooks/useRefunds.ts"],"sourcesContent":["/**\n * Billing Module - useRefunds Hook\n * Provides access to refund records, statistics, and mutations\n */\n\nimport { useApolloClient } from '@apollo/client/react';\nimport { useCallback, useState, useMemo, useEffect } from 'react';\nimport {\n useGetRefundRecordsQuery,\n useGetPendingRefundsQuery,\n useGetRefundRecordQuery,\n useGetRefundStatsQuery,\n useGetUnprocessedFailedWebhooksQuery,\n useGetBillingWebhookLogsQuery,\n useCreateRefundRecordMutation,\n useProcessRefundMutation,\n useSkipRefundMutation,\n useRetryRefundMutation,\n useCreateRefundRecordsFromFailedWebhooksMutation,\n useCreateRefundRecordFromWebhookMutation,\n GetRefundRecordsDocument,\n GetPendingRefundsDocument,\n GetRefundStatsDocument,\n GetUnprocessedFailedWebhooksDocument,\n GetBillingWebhookLogsDocument,\n} from '../../../../generated/global-operations';\n\n// ============================================================================\n// Types\n// ============================================================================\n\nexport type RefundRecordStatus = 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED' | 'SKIPPED';\nexport type RefundSource =\n 'MANUAL' | 'WEBHOOK_RECOVERY' | 'SUBSCRIPTION_CANCEL' | 'DUPLICATE_PAYMENT';\n\nexport interface RefundRecord {\n id: string;\n orgId: string;\n billingAccountId: string | null;\n source: RefundSource;\n status: RefundRecordStatus;\n provider: string;\n gatewayPaymentId: string;\n gatewayOrderId: string | null;\n amount: number;\n currency: string;\n purchaseType: string | null;\n purchaseDetail: string | null;\n reason: string | null;\n notes: string | null;\n webhookLogId: string | null;\n transactionId: string | null;\n processedBy: string | null;\n processedAt: string | null;\n gatewayRefundId: string | null;\n errorMessage: string | null;\n retryCount: number;\n metadata: Record<string, unknown> | null;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface RefundStats {\n pending: number;\n processing: number;\n completed: number;\n failed: number;\n skipped: number;\n totalPendingAmount: number;\n totalCompletedAmount: number;\n}\n\nexport interface WebhookLog {\n id: string;\n event: string;\n provider: string;\n payload: Record<string, unknown>;\n processed: boolean;\n error: string | null;\n createdAt: string;\n}\n\nexport interface RefundRecordFilters {\n status?: RefundRecordStatus;\n source?: RefundSource;\n provider?: string;\n billingAccountId?: string;\n fromDate?: string;\n toDate?: string;\n /** true → only refunds carrying a non-null errorMessage (an unresolved\n * accounting/reconciliation issue). Powers the admin refund issue log. */\n hasError?: boolean;\n /** Free-text, matched against the refund id, the originating transaction\n * id, the gateway payment id, and the gateway refund id — lets an admin\n * find the refund/issue that belongs to a specific transaction. */\n search?: string;\n}\n\nexport interface CreateRefundRecordInput {\n billingAccountId?: string;\n provider: string;\n gatewayPaymentId: string;\n gatewayOrderId?: string;\n amount: number;\n currency: string;\n purchaseType?: string;\n purchaseDetail?: string;\n reason?: string;\n notes?: string;\n transactionId?: string;\n metadata?: Record<string, unknown>;\n}\n\nexport interface ProcessRefundResult {\n success: boolean;\n refundRecord: RefundRecord | null;\n gatewayRefundId: string | null;\n error: string | null;\n}\n\ninterface PaginationInfo {\n totalCount: number;\n hasMore: boolean;\n page: number;\n pageSize: number;\n hasPrevious: boolean;\n}\n\n// ============================================================================\n// Hook Results\n// ============================================================================\n\ninterface UseRefundRecordsOptions {\n pageSize?: number;\n filters?: RefundRecordFilters;\n}\n\ninterface UseRefundRecordsResult {\n records: RefundRecord[];\n pagination: PaginationInfo;\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n goToNextPage: () => void;\n goToPreviousPage: () => void;\n goToPage: (page: number) => void;\n setFilters: (filters: RefundRecordFilters) => void;\n}\n\ninterface UseRefundStatsResult {\n stats: RefundStats | null;\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n}\n\ninterface UseRefundRecordResult {\n record: RefundRecord | null;\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n}\n\ninterface UseUnprocessedWebhooksResult {\n webhooks: WebhookLog[];\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n}\n\nexport interface BillingWebhookLogFilters {\n processed?: boolean;\n provider?: string;\n hasError?: boolean;\n}\n\ninterface UseBillingWebhookLogsResult {\n logs: WebhookLog[];\n totalCount: number;\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n}\n\ninterface UseRefundMutationsResult {\n createRefundRecord: (input: CreateRefundRecordInput) => Promise<RefundRecord>;\n processRefund: (id: string, notes?: string) => Promise<ProcessRefundResult>;\n skipRefund: (id: string, reason: string) => Promise<RefundRecord>;\n retryRefund: (id: string) => Promise<ProcessRefundResult>;\n createRefundRecordsFromFailedWebhooks: () => Promise<RefundRecord[]>;\n createRefundRecordFromWebhook: (webhookLogId: string) => Promise<RefundRecord | null>;\n isCreating: boolean;\n isProcessing: boolean;\n isSkipping: boolean;\n isRetrying: boolean;\n isCreatingFromWebhooks: boolean;\n isCreatingFromWebhook: boolean;\n}\n\n// ============================================================================\n// Hooks\n// ============================================================================\n\nconst DEFAULT_PAGE_SIZE = 20;\n\n/**\n * Hook for fetching paginated refund records with filters\n */\nexport function useRefundRecords(options: UseRefundRecordsOptions = {}): UseRefundRecordsResult {\n const pageSize = options.pageSize || DEFAULT_PAGE_SIZE;\n const [currentPage, setCurrentPage] = useState(0);\n const [filters, setFilters] = useState<RefundRecordFilters>(options.filters || {});\n\n // Update filters when options change (e.g., when tab changes)\n useEffect(() => {\n setFilters(options.filters || {});\n setCurrentPage(0); // Reset to first page when filters change externally\n }, [options.filters]);\n\n const { data, loading, error, refetch } = useGetRefundRecordsQuery({\n variables: {\n ...filters,\n page: currentPage,\n pageSize,\n },\n fetchPolicy: 'cache-and-network',\n });\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n const result = data?.getRefundRecords;\n\n const goToNextPage = useCallback(() => {\n if (result?.hasMore) {\n setCurrentPage((prev) => prev + 1);\n }\n }, [result?.hasMore]);\n\n const goToPreviousPage = useCallback(() => {\n if (currentPage > 0) {\n setCurrentPage((prev) => prev - 1);\n }\n }, [currentPage]);\n\n const goToPage = useCallback(\n (page: number) => {\n const totalPages = result ? Math.ceil(result.totalCount / pageSize) : 0;\n if (page >= 0 && page < totalPages) {\n setCurrentPage(page);\n }\n },\n [result, pageSize]\n );\n\n const handleSetFilters = useCallback((newFilters: RefundRecordFilters) => {\n setFilters(newFilters);\n setCurrentPage(0); // Reset to first page when filters change\n }, []);\n\n return {\n records: result?.records || [],\n pagination: {\n totalCount: result?.totalCount || 0,\n hasMore: result?.hasMore || false,\n page: currentPage,\n pageSize,\n hasPrevious: currentPage > 0,\n },\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n goToNextPage,\n goToPreviousPage,\n goToPage,\n setFilters: handleSetFilters,\n };\n}\n\n/**\n * Hook for fetching pending refund records (shortcut)\n */\nexport function usePendingRefunds(pageSize = DEFAULT_PAGE_SIZE): UseRefundRecordsResult {\n const [currentPage, setCurrentPage] = useState(0);\n\n const { data, loading, error, refetch } = useGetPendingRefundsQuery({\n variables: { page: currentPage, pageSize },\n fetchPolicy: 'cache-and-network',\n });\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n const result = data?.getPendingRefunds;\n\n const goToNextPage = useCallback(() => {\n if (result?.hasMore) {\n setCurrentPage((prev) => prev + 1);\n }\n }, [result?.hasMore]);\n\n const goToPreviousPage = useCallback(() => {\n if (currentPage > 0) {\n setCurrentPage((prev) => prev - 1);\n }\n }, [currentPage]);\n\n const goToPage = useCallback(\n (page: number) => {\n const totalPages = result ? Math.ceil(result.totalCount / pageSize) : 0;\n if (page >= 0 && page < totalPages) {\n setCurrentPage(page);\n }\n },\n [result, pageSize]\n );\n\n return {\n records: result?.records || [],\n pagination: {\n totalCount: result?.totalCount || 0,\n hasMore: result?.hasMore || false,\n page: currentPage,\n pageSize,\n hasPrevious: currentPage > 0,\n },\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n goToNextPage,\n goToPreviousPage,\n goToPage,\n setFilters: () => {}, // No-op for pending refunds\n };\n}\n\n/**\n * Hook for fetching refund statistics\n */\nexport function useRefundStats(): UseRefundStatsResult {\n const { data, loading, error, refetch } = useGetRefundStatsQuery({\n fetchPolicy: 'cache-and-network',\n });\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n return {\n stats: data?.getRefundStats || null,\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for fetching a single refund record by ID\n */\nexport function useRefundRecord(id: string | undefined): UseRefundRecordResult {\n const { data, loading, error, refetch } = useGetRefundRecordQuery({\n variables: { id: id! },\n skip: !id,\n fetchPolicy: 'cache-and-network',\n });\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n return {\n record: data?.getRefundRecord || null,\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for fetching unprocessed failed webhooks\n */\nexport function useUnprocessedFailedWebhooks(): UseUnprocessedWebhooksResult {\n const { data, loading, error, refetch } = useGetUnprocessedFailedWebhooksQuery({\n fetchPolicy: 'cache-and-network',\n });\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n return {\n webhooks: data?.getUnprocessedFailedWebhooks || [],\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for the admin billing-webhook-log viewer — paginated, filterable view\n * over ALL webhook log rows (unlike useUnprocessedFailedWebhooks, which only\n * scans the narrow refund-candidate subset).\n */\nexport function useBillingWebhookLogs(\n filters: BillingWebhookLogFilters,\n page: number,\n pageSize: number\n): UseBillingWebhookLogsResult {\n const { data, loading, error, refetch } = useGetBillingWebhookLogsQuery({\n variables: {\n limit: pageSize,\n offset: page * pageSize,\n processed: filters.processed,\n provider: filters.provider,\n hasError: filters.hasError,\n },\n fetchPolicy: 'cache-and-network',\n });\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n return {\n logs: data?.getBillingWebhookLogs.logs || [],\n totalCount: data?.getBillingWebhookLogs.totalCount || 0,\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for refund mutations\n */\nexport function useRefundMutations(): UseRefundMutationsResult {\n const client = useApolloClient();\n\n const [createRefundRecordMutation, { loading: isCreating }] = useCreateRefundRecordMutation();\n const [processRefundMutation, { loading: isProcessing }] = useProcessRefundMutation();\n const [skipRefundMutation, { loading: isSkipping }] = useSkipRefundMutation();\n const [retryRefundMutation, { loading: isRetrying }] = useRetryRefundMutation();\n const [createFromWebhooksMutation, { loading: isCreatingFromWebhooks }] =\n useCreateRefundRecordsFromFailedWebhooksMutation();\n const [createFromWebhookMutation, { loading: isCreatingFromWebhook }] =\n useCreateRefundRecordFromWebhookMutation();\n\n const refetchQueries = useCallback(async () => {\n await client.refetchQueries({\n include: [GetRefundRecordsDocument, GetPendingRefundsDocument, GetRefundStatsDocument],\n });\n }, [client]);\n\n const createRefundRecord = useCallback(\n async (input: CreateRefundRecordInput): Promise<RefundRecord> => {\n const { data } = await createRefundRecordMutation({\n variables: input,\n });\n await refetchQueries();\n return data.createRefundRecord;\n },\n [createRefundRecordMutation, refetchQueries]\n );\n\n const processRefund = useCallback(\n async (id: string, notes?: string): Promise<ProcessRefundResult> => {\n const { data } = await processRefundMutation({\n variables: { id, notes },\n });\n await refetchQueries();\n return data.processRefund;\n },\n [processRefundMutation, refetchQueries]\n );\n\n const skipRefund = useCallback(\n async (id: string, reason: string): Promise<RefundRecord> => {\n const { data } = await skipRefundMutation({\n variables: { id, reason },\n });\n await refetchQueries();\n return data.skipRefund;\n },\n [skipRefundMutation, refetchQueries]\n );\n\n const retryRefund = useCallback(\n async (id: string): Promise<ProcessRefundResult> => {\n const { data } = await retryRefundMutation({\n variables: { id },\n });\n await refetchQueries();\n return data.retryRefund;\n },\n [retryRefundMutation, refetchQueries]\n );\n\n const createRefundRecordsFromFailedWebhooks = useCallback(async (): Promise<RefundRecord[]> => {\n const { data } = await createFromWebhooksMutation();\n await client.refetchQueries({\n include: [\n GetRefundRecordsDocument,\n GetPendingRefundsDocument,\n GetRefundStatsDocument,\n GetUnprocessedFailedWebhooksDocument,\n GetBillingWebhookLogsDocument,\n ],\n });\n return data!.createRefundRecordsFromFailedWebhooks;\n }, [createFromWebhooksMutation, client]);\n\n const createRefundRecordFromWebhook = useCallback(\n async (webhookLogId: string): Promise<RefundRecord | null> => {\n const { data } = await createFromWebhookMutation({\n variables: { webhookLogId },\n });\n await client.refetchQueries({\n include: [\n GetRefundRecordsDocument,\n GetPendingRefundsDocument,\n GetRefundStatsDocument,\n GetUnprocessedFailedWebhooksDocument,\n ],\n });\n return data!.createRefundRecordFromWebhook;\n },\n [createFromWebhookMutation, client]\n );\n\n return {\n createRefundRecord,\n processRefund,\n skipRefund,\n retryRefund,\n createRefundRecordsFromFailedWebhooks,\n createRefundRecordFromWebhook,\n isCreating,\n isProcessing,\n isSkipping,\n isRetrying,\n isCreatingFromWebhooks,\n isCreatingFromWebhook,\n };\n}\n\n/**\n * Combined hook for refund page with all data and mutations\n */\nexport function useRefunds(options: UseRefundRecordsOptions = {}) {\n const recordsHook = useRefundRecords(options);\n const statsHook = useRefundStats();\n const mutationsHook = useRefundMutations();\n const webhooksHook = useUnprocessedFailedWebhooks();\n\n const isLoading = useMemo(\n () => recordsHook.isLoading || statsHook.isLoading,\n [recordsHook.isLoading, statsHook.isLoading]\n );\n\n const refetchAll = useCallback(async () => {\n await Promise.all([recordsHook.refetch(), statsHook.refetch(), webhooksHook.refetch()]);\n // eslint-disable-next-line react-hooks/exhaustive-deps -- Intentional: accessing stable refetch methods from hooks\n }, [recordsHook.refetch, statsHook.refetch, webhooksHook.refetch]);\n\n return {\n // Records\n records: recordsHook.records,\n pagination: recordsHook.pagination,\n goToNextPage: recordsHook.goToNextPage,\n goToPreviousPage: recordsHook.goToPreviousPage,\n goToPage: recordsHook.goToPage,\n setFilters: recordsHook.setFilters,\n\n // Stats\n stats: statsHook.stats,\n\n // Failed webhooks\n unprocessedWebhooks: webhooksHook.webhooks,\n webhooksLoading: webhooksHook.isLoading,\n\n // Loading states\n isLoading,\n recordsError: recordsHook.error,\n statsError: statsHook.error,\n\n // Mutations\n ...mutationsHook,\n\n // Refetch\n refetch: refetchAll,\n refetchRecords: recordsHook.refetch,\n refetchStats: statsHook.refetch,\n refetchWebhooks: webhooksHook.refetch,\n };\n}\n"],"mappings":";;;;AA2MA,IAAMA,IAAoB;AAK1B,SAAgBC,EAAiB,IAAmC,CAAC,GAA2B;CAC9F,IAAMC,IAAWC,EAAQ,YAAYH,GAC/B,CAACI,GAAaC,KAAkBC,EAAS,CAAC,GAC1C,CAACC,GAASC,KAAcF,EAA8BH,EAAQ,WAAW,CAAC,CAAC;CAGjF,QAAgB;EAEd,AADAK,EAAWL,EAAQ,WAAW,CAAC,CAAC,GAChCE,EAAe,CAAC;CAClB,GAAG,CAACF,EAAQ,OAAO,CAAC;CAEpB,IAAM,EAAE,SAAM,YAAS,UAAO,eAAYM,EAAyB;EACjE,WAAW;GACT,GAAGF;GACH,MAAMH;GACN;EACF;EACA,aAAa;CACf,CAAC,GAEKM,IAAgBC,EA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ACVL,EAAY,aAAaC,EAAU,WACzC,CAACD,EAAY,WAAWC,EAAU,SAAS,CAC7C,GAEMK,IAAatD,EAAY,YAAY;EACzC,MAAM,QAAQ,IAAI;GAACgD,EAAY,QAAQ;GAAGC,EAAU,QAAQ;GAAGE,EAAa,QAAQ;EAAC,CAAC;CAExF,GAAG;EAACH,EAAY;EAASC,EAAU;EAASE,EAAa;CAAO,CAAC;CAEjE,OAAO;EAEL,SAASH,EAAY;EACrB,YAAYA,EAAY;EACxB,cAAcA,EAAY;EAC1B,kBAAkBA,EAAY;EAC9B,UAAUA,EAAY;EACtB,YAAYA,EAAY;EAGxB,OAAOC,EAAU;EAGjB,qBAAqBE,EAAa;EAClC,iBAAiBA,EAAa;EAG9B;EACA,cAAcH,EAAY;EAC1B,YAAYC,EAAU;EAGtB,GAAGC;EAGH,SAASI;EACT,gBAAgBN,EAAY;EAC5B,cAAcC,EAAU;EACxB,iBAAiBE,EAAa;CAChC;AACF"}
@@ -37,4 +37,3 @@ interface UseTransactionsResult {
37
37
  */
38
38
  export declare function useTransactions(billingAccountId: string | undefined, options?: UseTransactionsOptions): UseTransactionsResult;
39
39
  export {};
40
- //# sourceMappingURL=useTransactions.d.ts.map
@@ -1,55 +1,54 @@
1
1
  import { useGetTransactionsByBillingAccountQuery as e } from "../../../../generated/global-operations.js";
2
2
  import { useCallback as t, useState as n } from "react";
3
- //#region src/billing/modules/billing/hooks/useTransactions.ts
3
+ // src/billing/modules/billing/hooks/useTransactions.ts
4
4
  var r = 20;
5
5
  function i(i, a = {}) {
6
- let o = a.pageSize || r, [s, c] = n(0), { data: l, loading: u, error: d, refetch: f } = e({
6
+ let o = a.pageSize || r, [s, c] = n(0), l = s * o, { data: u, loading: d, error: f, refetch: p } = e({
7
7
  variables: {
8
8
  billingAccountId: i,
9
9
  limit: o,
10
- offset: s * o
10
+ offset: l
11
11
  },
12
12
  skip: !i,
13
13
  fetchPolicy: "cache-and-network"
14
- }), p = t(async () => {
15
- await f();
16
- }, [f]), m = l?.getTransactionsByBillingAccount, h = t(() => {
17
- m?.hasMore && c((e) => e + 1);
18
- }, [m?.hasMore]), g = t(() => {
14
+ }), m = t(async () => {
15
+ await p();
16
+ }, [p]), h = u?.getTransactionsByBillingAccount, g = t(() => {
17
+ h?.hasMore && c((e) => e + 1);
18
+ }, [h?.hasMore]), _ = t(() => {
19
19
  s > 0 && c((e) => e - 1);
20
- }, [s]), _ = t((e) => {
21
- let t = m ? Math.ceil(m.totalCount / o) : 0;
20
+ }, [s]), v = t((e) => {
21
+ let t = h ? Math.ceil(h.totalCount / o) : 0;
22
22
  e >= 0 && e < t && c(e);
23
- }, [m, o]);
23
+ }, [h, o]);
24
24
  return {
25
- billingAccount: m ? {
26
- id: m.id,
27
- name: m.name,
28
- email: m.email,
29
- billingEmail: m.billingEmail,
30
- currency: m.currency,
31
- creditAmount: m.creditAmount,
32
- isActive: m.isActive,
33
- taxId: m.taxId,
34
- createdAt: m.createdAt
25
+ billingAccount: h ? {
26
+ id: h.id,
27
+ name: h.name,
28
+ email: h.email,
29
+ billingEmail: h.billingEmail,
30
+ currency: h.currency,
31
+ creditAmount: h.creditAmount,
32
+ isActive: h.isActive,
33
+ taxId: h.taxId,
34
+ createdAt: h.createdAt
35
35
  } : null,
36
- transactions: m?.transactions || [],
36
+ transactions: h?.transactions || [],
37
37
  pagination: {
38
- totalCount: m?.totalCount || 0,
39
- hasMore: m?.hasMore || !1,
38
+ totalCount: h?.totalCount || 0,
39
+ hasMore: h?.hasMore || !1,
40
40
  page: s,
41
41
  pageSize: o,
42
42
  hasPrevious: s > 0
43
43
  },
44
- isLoading: u,
45
- error: d,
46
- refetch: p,
47
- goToNextPage: h,
48
- goToPreviousPage: g,
49
- goToPage: _
44
+ isLoading: d,
45
+ error: f,
46
+ refetch: m,
47
+ goToNextPage: g,
48
+ goToPreviousPage: _,
49
+ goToPage: v
50
50
  };
51
51
  }
52
- //#endregion
53
52
  export { i as useTransactions };
54
53
 
55
54
  //# sourceMappingURL=useTransactions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useTransactions.js","names":[],"sources":["../../../../../src/billing/modules/billing/hooks/useTransactions.ts"],"sourcesContent":["/**\n * Billing Module - useTransactions Hook\n * Provides access to paginated transaction data for a billing account\n */\n\nimport { useCallback, useState } from 'react';\nimport { useGetTransactionsByBillingAccountQuery } from '../../../../generated/global-operations';\nimport type { Transaction } from '../../../shared/types';\n\ninterface BillingAccountInfo {\n id: string;\n name: string;\n email: string;\n billingEmail: string | null;\n currency: string;\n creditAmount: number;\n isActive: boolean;\n taxId: string | null;\n createdAt: string;\n}\n\ninterface PaginationInfo {\n totalCount: number;\n hasMore: boolean;\n page: number;\n pageSize: number;\n hasPrevious: boolean;\n}\n\ninterface UseTransactionsOptions {\n pageSize?: number;\n}\n\ninterface UseTransactionsResult {\n billingAccount: BillingAccountInfo | null;\n transactions: Transaction[];\n pagination: PaginationInfo;\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n goToNextPage: () => void;\n goToPreviousPage: () => void;\n goToPage: (page: number) => void;\n}\n\nconst DEFAULT_PAGE_SIZE = 20;\n\n/**\n * Hook for fetching paginated transactions for a billing account\n * Uses the optimized getTransactionsByBillingAccount query\n */\nexport function useTransactions(\n billingAccountId: string | undefined,\n options: UseTransactionsOptions = {}\n): UseTransactionsResult {\n const pageSize = options.pageSize || DEFAULT_PAGE_SIZE;\n const [currentPage, setCurrentPage] = useState(0);\n const offset = currentPage * pageSize;\n\n const { data, loading, error, refetch } = useGetTransactionsByBillingAccountQuery({\n variables: { billingAccountId: billingAccountId!, limit: pageSize, offset },\n skip: !billingAccountId,\n fetchPolicy: 'cache-and-network',\n });\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n const result = data?.getTransactionsByBillingAccount;\n\n const goToNextPage = useCallback(() => {\n if (result?.hasMore) {\n setCurrentPage((prev) => prev + 1);\n }\n }, [result?.hasMore]);\n\n const goToPreviousPage = useCallback(() => {\n if (currentPage > 0) {\n setCurrentPage((prev) => prev - 1);\n }\n }, [currentPage]);\n\n const goToPage = useCallback(\n (page: number) => {\n const totalPages = result ? Math.ceil(result.totalCount / pageSize) : 0;\n if (page >= 0 && page < totalPages) {\n setCurrentPage(page);\n }\n },\n [result, pageSize]\n );\n\n return {\n billingAccount: result\n ? {\n id: result.id,\n name: result.name,\n email: result.email,\n billingEmail: result.billingEmail,\n currency: result.currency,\n creditAmount: result.creditAmount,\n isActive: result.isActive,\n taxId: result.taxId,\n createdAt: result.createdAt,\n }\n : null,\n transactions: result?.transactions || [],\n pagination: {\n totalCount: result?.totalCount || 0,\n hasMore: result?.hasMore || false,\n page: currentPage,\n pageSize,\n hasPrevious: currentPage > 0,\n },\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n goToNextPage,\n goToPreviousPage,\n goToPage,\n };\n}\n"],"mappings":";;;AA6CA,IAAM,IAAoB;AAM1B,SAAgB,EACd,GACA,IAAkC,CAAC,GACZ;CACvB,IAAM,IAAW,EAAQ,YAAY,GAC/B,CAAC,GAAa,KAAkB,EAAS,CAAC,GAG1C,EAAE,SAAM,YAAS,UAAO,eAAY,EAAwC;EAChF,WAAW;GAAoB;GAAmB,OAAO;GAAU,QAHtD,IAAc;EAG+C;EAC1E,MAAM,CAAC;EACP,aAAa;CACf,CAAC,GAEK,IAAgB,EAAY,YAAY;EAC5C,MAAM,EAAQ;CAChB,GAAG,CAAC,CAAO,CAAC,GAEN,IAAS,GAAM,iCAEf,IAAe,QAAkB;EACrC,AAAI,GAAQ,WACV,GAAgB,MAAS,IAAO,CAAC;CAErC,GAAG,CAAC,GAAQ,OAAO,CAAC,GAEd,IAAmB,QAAkB;EACzC,AAAI,IAAc,KAChB,GAAgB,MAAS,IAAO,CAAC;CAErC,GAAG,CAAC,CAAW,CAAC,GAEV,IAAW,GACd,MAAiB;EAChB,IAAM,IAAa,IAAS,KAAK,KAAK,EAAO,aAAa,CAAQ,IAAI;EACtE,AAAI,KAAQ,KAAK,IAAO,KACtB,EAAe,CAAI;CAEvB,GACA,CAAC,GAAQ,CAAQ,CACnB;CAEA,OAAO;EACL,gBAAgB,IACZ;GACE,IAAI,EAAO;GACX,MAAM,EAAO;GACb,OAAO,EAAO;GACd,cAAc,EAAO;GACrB,UAAU,EAAO;GACjB,cAAc,EAAO;GACrB,UAAU,EAAO;GACjB,OAAO,EAAO;GACd,WAAW,EAAO;EACpB,IACA;EACJ,cAAc,GAAQ,gBAAgB,CAAC;EACvC,YAAY;GACV,YAAY,GAAQ,cAAc;GAClC,SAAS,GAAQ,WAAW;GAC5B,MAAM;GACN;GACA,aAAa,IAAc;EAC7B;EACA,WAAW;EACJ;EACP,SAAS;EACT;EACA;EACA;CACF;AACF"}
1
+ {"version":3,"file":"useTransactions.js","names":["DEFAULT_PAGE_SIZE","useTransactions","pageSize","options","currentPage","setCurrentPage","useState","offset","useGetTransactionsByBillingAccountQuery","billingAccountId","handleRefetch","useCallback","refetch","result","data","goToNextPage","prev","goToPreviousPage","goToPage","totalPages","page","loading"],"sources":["../../../../../src/billing/modules/billing/hooks/useTransactions.ts"],"sourcesContent":["/**\n * Billing Module - useTransactions Hook\n * Provides access to paginated transaction data for a billing account\n */\n\nimport { useCallback, useState } from 'react';\nimport { useGetTransactionsByBillingAccountQuery } from '../../../../generated/global-operations';\nimport type { Transaction } from '../../../shared/types';\n\ninterface BillingAccountInfo {\n id: string;\n name: string;\n email: string;\n billingEmail: string | null;\n currency: string;\n creditAmount: number;\n isActive: boolean;\n taxId: string | null;\n createdAt: string;\n}\n\ninterface PaginationInfo {\n totalCount: number;\n hasMore: boolean;\n page: number;\n pageSize: number;\n hasPrevious: boolean;\n}\n\ninterface UseTransactionsOptions {\n pageSize?: number;\n}\n\ninterface UseTransactionsResult {\n billingAccount: BillingAccountInfo | null;\n transactions: Transaction[];\n pagination: PaginationInfo;\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n goToNextPage: () => void;\n goToPreviousPage: () => void;\n goToPage: (page: number) => void;\n}\n\nconst DEFAULT_PAGE_SIZE = 20;\n\n/**\n * Hook for fetching paginated transactions for a billing account\n * Uses the optimized getTransactionsByBillingAccount query\n */\nexport function useTransactions(\n billingAccountId: string | undefined,\n options: UseTransactionsOptions = {}\n): UseTransactionsResult {\n const pageSize = options.pageSize || DEFAULT_PAGE_SIZE;\n const [currentPage, setCurrentPage] = useState(0);\n const offset = currentPage * pageSize;\n\n const { data, loading, error, refetch } = useGetTransactionsByBillingAccountQuery({\n variables: { billingAccountId: billingAccountId!, limit: pageSize, offset },\n skip: !billingAccountId,\n fetchPolicy: 'cache-and-network',\n });\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n const result = data?.getTransactionsByBillingAccount;\n\n const goToNextPage = useCallback(() => {\n if (result?.hasMore) {\n setCurrentPage((prev) => prev + 1);\n }\n }, [result?.hasMore]);\n\n const goToPreviousPage = useCallback(() => {\n if (currentPage > 0) {\n setCurrentPage((prev) => prev - 1);\n }\n }, [currentPage]);\n\n const goToPage = useCallback(\n (page: number) => {\n const totalPages = result ? Math.ceil(result.totalCount / pageSize) : 0;\n if (page >= 0 && page < totalPages) {\n setCurrentPage(page);\n }\n },\n [result, pageSize]\n );\n\n return {\n billingAccount: result\n ? {\n id: result.id,\n name: result.name,\n email: result.email,\n billingEmail: result.billingEmail,\n currency: result.currency,\n creditAmount: result.creditAmount,\n isActive: result.isActive,\n taxId: result.taxId,\n createdAt: result.createdAt,\n }\n : null,\n transactions: result?.transactions || [],\n pagination: {\n totalCount: result?.totalCount || 0,\n hasMore: result?.hasMore || false,\n page: currentPage,\n pageSize,\n hasPrevious: currentPage > 0,\n },\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n goToNextPage,\n goToPreviousPage,\n goToPage,\n };\n}\n"],"mappings":";;;AA6CA,IAAMA,IAAoB;AAM1B,SAAgBC,EACd,GACA,IAAkC,CAAC,GACZ;CACvB,IAAMC,IAAWC,EAAQ,YAAYH,GAC/B,CAACI,GAAaC,KAAkBC,EAAS,CAAC,GAC1CC,IAASH,IAAcF,GAEvB,EAAE,SAAM,YAAS,UAAO,eAAYM,EAAwC;EAChF,WAAW;GAAoB;GAAmB,OAAON;GAAU;EAAO;EAC1E,MAAM,CAACO;EACP,aAAa;CACf,CAAC,GAEKC,IAAgBC,EAAY,YAAY;EAC5C,MAAMC,EAAQ;CAChB,GAAG,CAACA,CAAO,CAAC,GAENC,IAASC,GAAM,iCAEfC,IAAeJ,QAAkB;EACrC,AAAIE,GAAQ,WACVR,GAAgB,MAASW,IAAO,CAAC;CAErC,GAAG,CAACH,GAAQ,OAAO,CAAC,GAEdI,IAAmBN,QAAkB;EACzC,AAAIP,IAAc,KAChBC,GAAgB,MAASW,IAAO,CAAC;CAErC,GAAG,CAACZ,CAAW,CAAC,GAEVc,IAAWP,GACd,MAAiB;EAChB,IAAMQ,IAAaN,IAAS,KAAK,KAAKA,EAAO,aAAaX,CAAQ,IAAI;EACtE,AAAIkB,KAAQ,KAAKA,IAAOD,KACtBd,EAAee,CAAI;CAEvB,GACA,CAACP,GAAQX,CAAQ,CACnB;CAEA,OAAO;EACL,gBAAgBW,IACZ;GACE,IAAIA,EAAO;GACX,MAAMA,EAAO;GACb,OAAOA,EAAO;GACd,cAAcA,EAAO;GACrB,UAAUA,EAAO;GACjB,cAAcA,EAAO;GACrB,UAAUA,EAAO;GACjB,OAAOA,EAAO;GACd,WAAWA,EAAO;EACpB,IACA;EACJ,cAAcA,GAAQ,gBAAgB,CAAC;EACvC,YAAY;GACV,YAAYA,GAAQ,cAAc;GAClC,SAASA,GAAQ,WAAW;GAC5B,MAAMT;GACN;GACA,aAAaA,IAAc;EAC7B;EACA,WAAWiB;EACJ;EACP,SAASX;EACT;EACA;EACA;CACF;AACF"}
@@ -4,4 +4,3 @@
4
4
  */
5
5
  export * from './pages';
6
6
  export * from './hooks';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1,16 +1,16 @@
1
- import "./hooks/useInvoices.js";
2
- import { InvoicesListPage as e } from "./pages/InvoicesListPage.js";
3
- import { InvoiceDetailPage as t } from "./pages/InvoiceDetailPage.js";
4
- import "./hooks/useTransactions.js";
5
- import "./hooks/useRefunds.js";
6
- import "./hooks/useOrderCallbacks.js";
7
- import "./hooks/index.js";
8
- import { TransactionsPage as n } from "./pages/TransactionsPage.js";
9
- import { PaymentMethodsPage as r } from "./pages/PaymentMethodsPage.js";
10
- import { RefundsPage as i } from "./pages/RefundsPage.js";
11
- import { RefundIssueLogsPage as a } from "./pages/RefundIssueLogsPage.js";
12
- import { UserRefundsPage as o } from "./pages/UserRefundsPage.js";
13
- import { BillingWebhookLogsPage as s } from "./pages/BillingWebhookLogsPage.js";
14
- import { OrderCallbackLogsPage as c } from "./pages/OrderCallbackLogsPage.js";
1
+ import { useInvoiceMutations as e } from "./hooks/useInvoices.js";
2
+ import { InvoicesListPage as t } from "./pages/InvoicesListPage.js";
3
+ import { InvoiceDetailPage as n } from "./pages/InvoiceDetailPage.js";
4
+ import { useTransactions as r } from "./hooks/useTransactions.js";
5
+ import { useBillingWebhookLogs as i, useRefundMutations as a, useRefundRecords as o, useRefunds as s } from "./hooks/useRefunds.js";
6
+ import { useOrderCallbackMutations as c, useOrderCallbacks as l } from "./hooks/useOrderCallbacks.js";
15
7
  import "./pages/index.js";
16
- export { s as BillingWebhookLogsPage, t as InvoiceDetailPage, e as InvoicesListPage, c as OrderCallbackLogsPage, r as PaymentMethodsPage, a as RefundIssueLogsPage, i as RefundsPage, n as TransactionsPage, o as UserRefundsPage };
8
+ import { TransactionsPage as u } from "./pages/TransactionsPage.js";
9
+ import { PaymentMethodsPage as d } from "./pages/PaymentMethodsPage.js";
10
+ import { RefundsPage as f } from "./pages/RefundsPage.js";
11
+ import { RefundIssueLogsPage as p } from "./pages/RefundIssueLogsPage.js";
12
+ import { UserRefundsPage as m } from "./pages/UserRefundsPage.js";
13
+ import { BillingWebhookLogsPage as h } from "./pages/BillingWebhookLogsPage.js";
14
+ import { OrderCallbackLogsPage as g } from "./pages/OrderCallbackLogsPage.js";
15
+ import "./hooks/index.js";
16
+ export { h as BillingWebhookLogsPage, n as InvoiceDetailPage, t as InvoicesListPage, g as OrderCallbackLogsPage, d as PaymentMethodsPage, p as RefundIssueLogsPage, f as RefundsPage, u as TransactionsPage, m as UserRefundsPage, i as useBillingWebhookLogs, e as useInvoiceMutations, c as useOrderCallbackMutations, l as useOrderCallbacks, a as useRefundMutations, o as useRefundRecords, s as useRefunds, r as useTransactions };
@@ -1,3 +1,2 @@
1
1
  import { FC } from 'react';
2
2
  export declare const BillingWebhookLogsPage: FC;
3
- //# sourceMappingURL=BillingWebhookLogsPage.d.ts.map
@@ -1,31 +1,31 @@
1
1
  import { AccessDenied as e } from "../../../shared/components/AccessDenied.js";
2
2
  import { PageHeader as t } from "../../../shared/components/PageHeader.js";
3
- import { statusTokens as n } from "../../../shared/utils/tokens.js";
3
+ import { useBillingPermissions as n } from "../../../hooks/useBillingPermissions.js";
4
4
  import { ServerError as r } from "../../../shared/components/ServerError.js";
5
- import "../../../shared/components/index.js";
5
+ import "../hooks/index.js";
6
6
  import { formatDateTime as i } from "../../../shared/utils/format.js";
7
7
  import { isServerError as a } from "../../../shared/utils/error.js";
8
+ import "../../../shared/components/index.js";
8
9
  import "../../../shared/utils/index.js";
9
- import { useBillingPermissions as o } from "../../../hooks/useBillingPermissions.js";
10
- import { useBillingWebhookLogs as s, useRefundMutations as c } from "../hooks/useRefunds.js";
11
- import "../hooks/index.js";
10
+ import { useBillingWebhookLogs as o, useRefundMutations as s } from "../hooks/useRefunds.js";
11
+ import { statusTokens as c } from "../../../shared/utils/tokens.js";
12
12
  import { useState as l } from "react";
13
13
  import { AlertTriangle as u, CheckCircle as d, ChevronLeft as f, ChevronRight as p, DollarSign as m, Eye as h, Loader2 as g, RefreshCw as _, X as v } from "lucide-react";
14
14
  import { jsx as y, jsxs as b } from "react/jsx-runtime";
15
15
  import { IllustratedEmptyState as x, ResponsiveTable as S } from "@burdenoff/fe-libs/ui";
16
- //#region src/billing/modules/billing/pages/BillingWebhookLogsPage.tsx
17
- var C = 25, w = ["stripe", "razorpay"], T = new Set([
16
+ // src/billing/modules/billing/pages/BillingWebhookLogsPage.tsx
17
+ var C = 25, w = ["stripe", "razorpay"], T = /* @__PURE__ */ new Set([
18
18
  "payment_intent.succeeded",
19
19
  "charge.succeeded",
20
20
  "payment.captured",
21
21
  "order.paid"
22
22
  ]), E = (e) => e.processed ? {
23
23
  label: "Processed",
24
- className: `${n.success.bg} ${n.success.text}`,
24
+ className: `${c.success.bg} ${c.success.text}`,
25
25
  icon: d
26
26
  } : {
27
27
  label: e.error ? "Failed" : "Pending",
28
- className: `${n.error.bg} ${n.error.text}`,
28
+ className: `${c.error.bg} ${c.error.text}`,
29
29
  icon: u
30
30
  }, D = ({ log: e, onClose: t, onCreateRefund: n, isCreatingRefund: r, canCreateRefund: a }) => e ? /* @__PURE__ */ y("div", {
31
31
  className: "fixed inset-0 z-50 flex items-center justify-center bg-bg-overlay p-4",
@@ -103,8 +103,8 @@ var C = 25, w = ["stripe", "razorpay"], T = new Set([
103
103
  })]
104
104
  })
105
105
  }) : null, O = () => {
106
- let n = o(), [u, d] = l(0), [m, g] = l({}), [v, O] = l(null), { logs: k, totalCount: A, isLoading: j, error: M, refetch: N } = s(m, u, C), { createRefundRecordFromWebhook: P, isCreatingFromWebhook: F } = c();
107
- if (!n.isBillingAdmin) return /* @__PURE__ */ y(e, { message: "You don't have permission to view billing webhook logs." });
106
+ let c = n(), [u, d] = l(0), [m, g] = l({}), [v, O] = l(null), { logs: k, totalCount: A, isLoading: j, error: M, refetch: N } = o(m, u, C), { createRefundRecordFromWebhook: P, isCreatingFromWebhook: F } = s();
107
+ if (!c.isBillingAdmin) return /* @__PURE__ */ y(e, { message: "You don't have permission to view billing webhook logs." });
108
108
  if (M && a(M)) return /* @__PURE__ */ y("div", {
109
109
  className: "p-6",
110
110
  children: /* @__PURE__ */ y(r, {
@@ -358,7 +358,6 @@ var C = 25, w = ["stripe", "razorpay"], T = new Set([
358
358
  ]
359
359
  });
360
360
  };
361
- //#endregion
362
361
  export { O as BillingWebhookLogsPage };
363
362
 
364
363
  //# sourceMappingURL=BillingWebhookLogsPage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BillingWebhookLogsPage.js","names":[],"sources":["../../../../../src/billing/modules/billing/pages/BillingWebhookLogsPage.tsx"],"sourcesContent":["/**\n * Billing Module - Billing Webhook Logs Page\n * Admin visibility into every Stripe/Razorpay webhook processing attempt —\n * not just the payment-succeeded subset eligible for automatic refund\n * creation (see RefundsPage's \"Import Failed Webhooks\" action). Lets whoever\n * owns billing ops see and investigate ANY webhook processing failure\n * without needing direct DB access.\n */\n\nimport { useState, type FC } from 'react';\nimport {\n RefreshCw,\n ChevronLeft,\n ChevronRight,\n CheckCircle,\n AlertTriangle,\n X,\n DollarSign,\n Loader2,\n Eye,\n} from 'lucide-react';\nimport { useBillingPermissions } from '../../../hooks/useBillingPermissions';\nimport {\n useBillingWebhookLogs,\n useRefundMutations,\n type BillingWebhookLogFilters,\n type WebhookLog,\n} from '../hooks';\nimport { AccessDenied, PageHeader, ServerError } from '../../../shared/components';\nimport { formatDateTime, isServerError } from '../../../shared/utils';\nimport { statusTokens } from '../../../shared/utils/tokens';\nimport {\n ResponsiveTable,\n type ResponsiveTableColumn,\n IllustratedEmptyState,\n} from '@burdenoff/fe-libs/ui';\n\nconst PAGE_SIZE = 25;\nconst PROVIDER_OPTIONS = ['stripe', 'razorpay'];\nconst REFUND_ELIGIBLE_EVENTS = new Set([\n 'payment_intent.succeeded',\n 'charge.succeeded',\n 'payment.captured',\n 'order.paid',\n]);\n\nconst getBadge = (\n log: WebhookLog\n): { label: string; className: string; icon: FC<{ className?: string }> } => {\n if (!log.processed) {\n return {\n label: log.error ? 'Failed' : 'Pending',\n className: `${statusTokens.error.bg} ${statusTokens.error.text}`,\n icon: AlertTriangle,\n };\n }\n return {\n label: 'Processed',\n className: `${statusTokens.success.bg} ${statusTokens.success.text}`,\n icon: CheckCircle,\n };\n};\n\nconst WebhookLogDetailModal: FC<{\n log: WebhookLog | null;\n onClose: () => void;\n onCreateRefund: (id: string) => void;\n isCreatingRefund: boolean;\n canCreateRefund: boolean;\n}> = ({ log, onClose, onCreateRefund, isCreatingRefund, canCreateRefund }) => {\n if (!log) return null;\n\n return (\n <div className=\"fixed inset-0 z-50 flex items-center justify-center bg-bg-overlay p-4\">\n <div className=\"w-full max-w-2xl max-h-[85vh] overflow-y-auto rounded-lg bg-bg-surface border border-border-subtle shadow-[var(--shadow-elevation-2)]\">\n <div className=\"flex items-center justify-between p-4 border-b border-border-subtle\">\n <h3 className=\"text-base font-semibold text-text-primary\">Webhook log details</h3>\n <button\n type=\"button\"\n onClick={onClose}\n className=\"p-1 rounded text-text-muted hover:text-text-primary hover:bg-bg-sunken/50\"\n >\n <X className=\"size-4\" />\n </button>\n </div>\n <div className=\"p-4 space-y-4\">\n <div className=\"grid grid-cols-2 gap-4 text-sm\">\n <div>\n <p className=\"text-text-muted\">Provider</p>\n <p className=\"text-text-primary capitalize\">{log.provider}</p>\n </div>\n <div>\n <p className=\"text-text-muted\">Event</p>\n <p className=\"text-text-primary font-mono text-xs\">{log.event}</p>\n </div>\n <div>\n <p className=\"text-text-muted\">Received</p>\n <p className=\"text-text-primary\">{formatDateTime(log.createdAt)}</p>\n </div>\n <div>\n <p className=\"text-text-muted\">Processed</p>\n <p className=\"text-text-primary\">{log.processed ? 'Yes' : 'No'}</p>\n </div>\n </div>\n {log.error && (\n <div>\n <p className=\"text-sm text-text-muted mb-1\">Error</p>\n <pre className=\"text-xs whitespace-pre-wrap p-3 rounded-md bg-status-error-bg-subtle text-status-error-text border border-status-error-border\">\n {log.error}\n </pre>\n </div>\n )}\n <div>\n <p className=\"text-sm text-text-muted mb-1\">Payload</p>\n <pre className=\"text-xs whitespace-pre-wrap p-3 rounded-md bg-bg-sunken/60 text-text-secondary max-h-64 overflow-y-auto\">\n {JSON.stringify(log.payload, null, 2)}\n </pre>\n </div>\n {!log.processed && canCreateRefund && (\n <button\n type=\"button\"\n onClick={() => onCreateRefund(log.id)}\n disabled={isCreatingRefund}\n className=\"inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bgHover disabled:opacity-50\"\n >\n {isCreatingRefund ? (\n <Loader2 className=\"size-4 animate-spin\" />\n ) : (\n <DollarSign className=\"size-4\" />\n )}\n Create refund from this webhook\n </button>\n )}\n </div>\n </div>\n </div>\n );\n};\n\nexport const BillingWebhookLogsPage: FC = () => {\n const permissions = useBillingPermissions();\n const [page, setPage] = useState(0);\n const [filters, setFilters] = useState<BillingWebhookLogFilters>({});\n const [selectedLog, setSelectedLog] = useState<WebhookLog | null>(null);\n\n const { logs, totalCount, isLoading, error, refetch } = useBillingWebhookLogs(\n filters,\n page,\n PAGE_SIZE\n );\n const { createRefundRecordFromWebhook, isCreatingFromWebhook } = useRefundMutations();\n\n if (!permissions.isBillingAdmin) {\n return <AccessDenied message=\"You don't have permission to view billing webhook logs.\" />;\n }\n\n if (error && isServerError(error)) {\n return (\n <div className=\"p-6\">\n <ServerError\n title=\"Server Unavailable\"\n message=\"Unable to load webhook logs. The server might be down or experiencing issues.\"\n onRetry={() => refetch()}\n showRetry\n />\n </div>\n );\n }\n\n const handleFilterChange = <K extends keyof BillingWebhookLogFilters>(\n key: K,\n value: BillingWebhookLogFilters[K]\n ) => {\n setFilters((prev) => ({ ...prev, [key]: value }));\n setPage(0);\n };\n\n const handleCreateRefund = async (webhookLogId: string) => {\n await createRefundRecordFromWebhook(webhookLogId);\n setSelectedLog(null);\n };\n\n const columns: ResponsiveTableColumn<WebhookLog>[] = [\n {\n key: 'date',\n header: 'Received',\n priority: 'primary',\n cellClassName: 'whitespace-nowrap',\n cell: (log) => (\n <div className=\"flex flex-col\">\n <span className=\"text-sm text-text-primary\">\n {formatDateTime(log.createdAt).split(' ')[0]}\n </span>\n <span className=\"text-xs text-text-muted\">\n {formatDateTime(log.createdAt).split(' ')[1]}\n </span>\n </div>\n ),\n },\n {\n key: 'status',\n header: 'Status',\n cellClassName: 'whitespace-nowrap',\n cell: (log) => {\n const badge = getBadge(log);\n const BadgeIcon = badge.icon;\n return (\n <span\n className={`inline-flex items-center gap-1 px-2 py-0.5 text-xs font-medium rounded ${badge.className}`}\n >\n <BadgeIcon className=\"size-3\" />\n {badge.label}\n </span>\n );\n },\n },\n {\n key: 'provider',\n header: 'Provider',\n priority: 'hidden-on-mobile',\n cellClassName: 'whitespace-nowrap',\n cell: (log) => <span className=\"text-sm text-text-primary capitalize\">{log.provider}</span>,\n },\n {\n key: 'event',\n header: 'Event',\n cellClassName: 'whitespace-nowrap max-w-[220px] truncate',\n cell: (log) => <span className=\"text-sm font-mono text-text-muted\">{log.event}</span>,\n },\n {\n key: 'error',\n header: 'Error',\n priority: 'hidden-on-mobile',\n cellClassName: 'max-w-[280px] truncate',\n cell: (log) => <span className=\"text-sm text-status-error-text\">{log.error || '-'}</span>,\n },\n ];\n\n const totalPages = Math.max(1, Math.ceil(totalCount / PAGE_SIZE));\n\n return (\n <div className=\"space-y-6 p-6\">\n <PageHeader\n title=\"Billing Webhook Logs\"\n description=\"Every Stripe/Razorpay webhook delivery — investigate processing failures directly.\"\n actions={\n <button\n type=\"button\"\n onClick={() => refetch()}\n className=\"inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md border border-border-subtle bg-bg-surface hover:bg-bg-sunken/50\"\n >\n <RefreshCw className=\"size-4\" />\n Refresh\n </button>\n }\n />\n\n {/* Filters */}\n <div className=\"p-4 border border-border-subtle rounded-lg bg-bg-sunken/30 grid grid-cols-1 sm:grid-cols-3 gap-4\">\n <div>\n <label className=\"block text-sm font-medium mb-1\">Processed</label>\n <select\n value={filters.processed === undefined ? '' : String(filters.processed)}\n onChange={(e) =>\n handleFilterChange(\n 'processed',\n e.target.value === '' ? undefined : e.target.value === 'true'\n )\n }\n className=\"w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary\"\n >\n <option value=\"\">All</option>\n <option value=\"false\">Unprocessed / Failed</option>\n <option value=\"true\">Processed</option>\n </select>\n </div>\n <div>\n <label className=\"block text-sm font-medium mb-1\">Provider</label>\n <select\n value={filters.provider || ''}\n onChange={(e) => handleFilterChange('provider', e.target.value || undefined)}\n className=\"w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary\"\n >\n <option value=\"\">All Providers</option>\n {PROVIDER_OPTIONS.map((p) => (\n <option key={p} value={p}>\n {p.charAt(0).toUpperCase() + p.slice(1)}\n </option>\n ))}\n </select>\n </div>\n <div>\n <label className=\"block text-sm font-medium mb-1\">Has Error</label>\n <select\n value={filters.hasError === undefined ? '' : String(filters.hasError)}\n onChange={(e) =>\n handleFilterChange(\n 'hasError',\n e.target.value === '' ? undefined : e.target.value === 'true'\n )\n }\n className=\"w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary\"\n >\n <option value=\"\">All</option>\n <option value=\"true\">Has error</option>\n <option value=\"false\">No error</option>\n </select>\n </div>\n </div>\n\n {/* Table */}\n {isLoading && logs.length === 0 ? (\n <div className=\"space-y-2\">\n {[1, 2, 3, 4, 5].map((i) => (\n <div key={i} className=\"h-16 bg-bg-sunken animate-pulse rounded\" />\n ))}\n </div>\n ) : logs.length === 0 ? (\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title=\"No webhook logs found\"\n description=\"Nothing matches these filters — try widening them, or check back after the next payment.\"\n />\n ) : (\n <div className=\"border border-border-subtle rounded-lg overflow-hidden\">\n <ResponsiveTable<WebhookLog>\n columns={columns}\n data={logs}\n rowKey={(log) => log.id}\n rowActions={(log) => (\n <button\n type=\"button\"\n onClick={() => setSelectedLog(log)}\n className=\"inline-flex items-center gap-1.5 px-2 py-1 text-sm font-medium rounded-button text-text-secondary hover:text-text-primary hover:bg-bg-sunken/60 transition-colors\"\n >\n <Eye className=\"size-4\" />\n <span className=\"hidden sm:inline\">View</span>\n </button>\n )}\n />\n </div>\n )}\n\n {/* Pagination */}\n {totalCount > 0 && (\n <div className=\"flex flex-col sm:flex-row items-center justify-between gap-4 border-t border-border-subtle pt-4\">\n <p className=\"text-sm text-text-muted text-center sm:text-left\">\n Showing {page * PAGE_SIZE + 1} to {Math.min((page + 1) * PAGE_SIZE, totalCount)} of{' '}\n {totalCount} logs\n </p>\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={() => setPage((p) => Math.max(0, p - 1))}\n disabled={page === 0}\n className=\"inline-flex items-center gap-1 px-3 py-1.5 text-sm font-medium rounded-button border border-border-subtle bg-bg-surface hover:bg-bg-sunken/50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors\"\n >\n <ChevronLeft className=\"size-4\" />\n <span className=\"hidden sm:inline\">Previous</span>\n </button>\n <span className=\"text-sm text-text-muted px-2\">\n <span className=\"hidden sm:inline\">Page </span>\n {page + 1} <span className=\"hidden sm:inline\">of</span>\n <span className=\"sm:hidden\">/</span> {totalPages}\n </span>\n <button\n type=\"button\"\n onClick={() => setPage((p) => (p + 1 < totalPages ? p + 1 : p))}\n disabled={page + 1 >= totalPages}\n className=\"inline-flex items-center gap-1 px-3 py-1.5 text-sm font-medium rounded-button border border-border-subtle bg-bg-surface hover:bg-bg-sunken/50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors\"\n >\n <span className=\"hidden sm:inline\">Next</span>\n <ChevronRight className=\"size-4\" />\n </button>\n </div>\n </div>\n )}\n\n <WebhookLogDetailModal\n log={selectedLog}\n onClose={() => setSelectedLog(null)}\n onCreateRefund={handleCreateRefund}\n isCreatingRefund={isCreatingFromWebhook}\n canCreateRefund={\n selectedLog\n ? REFUND_ELIGIBLE_EVENTS.has(selectedLog.event) && Boolean(selectedLog.error)\n : false\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AChD,UAAU,MAAS;OACnB,WAAU;iBAJZ,CAME,kBAAC,GAAD,EAAa,WAAU,SAAU,CAAA,GACjC,kBAAC,QAAD;QAAM,WAAU;kBAAmB;OAAc,CAAA,CAC3C;;MACR,kBAAC,QAAD;OAAM,WAAU;iBAAhB;QACE,kBAAC,QAAD;SAAM,WAAU;mBAAmB;QAAW,CAAA;QAC7C,IAAO;QAAE;QAAC,kBAAC,QAAD;SAAM,WAAU;mBAAmB;QAAQ,CAAA;QACtD,kBAAC,QAAD;SAAM,WAAU;mBAAY;QAAO,CAAA;QAAC;QAAE;OAClC;;MACN,kBAAC,UAAD;OACE,MAAK;OACL,eAAe,GAAS,MAAO,IAAI,IAAI,IAAa,IAAI,IAAI,CAAE;OAC9D,UAAU,IAAO,KAAK;OACtB,WAAU;iBAJZ,CAME,kBAAC,QAAD;QAAM,WAAU;kBAAmB;OAAU,CAAA,GAC7C,kBAAC,GAAD,EAAc,WAAU,SAAU,CAAA,CAC5B;;KACL;MACF;;GAGP,kBAAC,GAAD;IACE,KAAK;IACL,eAAe,EAAe,IAAI;IAClC,gBAAgB;IAChB,kBAAkB;IAClB,iBACE,IACI,EAAuB,IAAI,EAAY,KAAK,KAAK,EAAQ,EAAY,QACrE;GAEP,CAAA;EACE;;AAET"}
1
+ {"version":3,"file":"BillingWebhookLogsPage.js","names":["PAGE_SIZE","PROVIDER_OPTIONS","REFUND_ELIGIBLE_EVENTS","getBadge","log","statusTokens","CheckCircle","AlertTriangle","WebhookLogDetailModal","onClose","X","formatDateTime","canCreateRefund","onCreateRefund","isCreatingRefund","Loader2","DollarSign","BillingWebhookLogsPage","permissions","useBillingPermissions","page","setPage","useState","filters","setFilters","selectedLog","setSelectedLog","useBillingWebhookLogs","useRefundMutations","AccessDenied","error","isServerError","ServerError","refetch","handleFilterChange","prev","key","value","handleCreateRefund","createRefundRecordFromWebhook","webhookLogId","columns","badge","BadgeIcon","totalPages","totalCount","PageHeader","RefreshCw","p","isLoading","logs","i","IllustratedEmptyState","ResponsiveTable","Eye","ChevronLeft","ChevronRight","isCreatingFromWebhook"],"sources":["../../../../../src/billing/modules/billing/pages/BillingWebhookLogsPage.tsx"],"sourcesContent":["/**\n * Billing Module - Billing Webhook Logs Page\n * Admin visibility into every Stripe/Razorpay webhook processing attempt —\n * not just the payment-succeeded subset eligible for automatic refund\n * creation (see RefundsPage's \"Import Failed Webhooks\" action). Lets whoever\n * owns billing ops see and investigate ANY webhook processing failure\n * without needing direct DB access.\n */\n\nimport { useState, type FC } from 'react';\nimport {\n RefreshCw,\n ChevronLeft,\n ChevronRight,\n CheckCircle,\n AlertTriangle,\n X,\n DollarSign,\n Loader2,\n Eye,\n} from 'lucide-react';\nimport { useBillingPermissions } from '../../../hooks/useBillingPermissions';\nimport {\n useBillingWebhookLogs,\n useRefundMutations,\n type BillingWebhookLogFilters,\n type WebhookLog,\n} from '../hooks';\nimport { AccessDenied, PageHeader, ServerError } from '../../../shared/components';\nimport { formatDateTime, isServerError } from '../../../shared/utils';\nimport { statusTokens } from '../../../shared/utils/tokens';\nimport {\n ResponsiveTable,\n type ResponsiveTableColumn,\n IllustratedEmptyState,\n} from '@burdenoff/fe-libs/ui';\n\nconst PAGE_SIZE = 25;\nconst PROVIDER_OPTIONS = ['stripe', 'razorpay'];\nconst REFUND_ELIGIBLE_EVENTS = new Set([\n 'payment_intent.succeeded',\n 'charge.succeeded',\n 'payment.captured',\n 'order.paid',\n]);\n\nconst getBadge = (\n log: WebhookLog\n): { label: string; className: string; icon: FC<{ className?: string }> } => {\n if (!log.processed) {\n return {\n label: log.error ? 'Failed' : 'Pending',\n className: `${statusTokens.error.bg} ${statusTokens.error.text}`,\n icon: AlertTriangle,\n };\n }\n return {\n label: 'Processed',\n className: `${statusTokens.success.bg} ${statusTokens.success.text}`,\n icon: CheckCircle,\n };\n};\n\nconst WebhookLogDetailModal: FC<{\n log: WebhookLog | null;\n onClose: () => void;\n onCreateRefund: (id: string) => void;\n isCreatingRefund: boolean;\n canCreateRefund: boolean;\n}> = ({ log, onClose, onCreateRefund, isCreatingRefund, canCreateRefund }) => {\n if (!log) return null;\n\n return (\n <div className=\"fixed inset-0 z-50 flex items-center justify-center bg-bg-overlay p-4\">\n <div className=\"w-full max-w-2xl max-h-[85vh] overflow-y-auto rounded-lg bg-bg-surface border border-border-subtle shadow-[var(--shadow-elevation-2)]\">\n <div className=\"flex items-center justify-between p-4 border-b border-border-subtle\">\n <h3 className=\"text-base font-semibold text-text-primary\">Webhook log details</h3>\n <button\n type=\"button\"\n onClick={onClose}\n className=\"p-1 rounded text-text-muted hover:text-text-primary hover:bg-bg-sunken/50\"\n >\n <X className=\"size-4\" />\n </button>\n </div>\n <div className=\"p-4 space-y-4\">\n <div className=\"grid grid-cols-2 gap-4 text-sm\">\n <div>\n <p className=\"text-text-muted\">Provider</p>\n <p className=\"text-text-primary capitalize\">{log.provider}</p>\n </div>\n <div>\n <p className=\"text-text-muted\">Event</p>\n <p className=\"text-text-primary font-mono text-xs\">{log.event}</p>\n </div>\n <div>\n <p className=\"text-text-muted\">Received</p>\n <p className=\"text-text-primary\">{formatDateTime(log.createdAt)}</p>\n </div>\n <div>\n <p className=\"text-text-muted\">Processed</p>\n <p className=\"text-text-primary\">{log.processed ? 'Yes' : 'No'}</p>\n </div>\n </div>\n {log.error && (\n <div>\n <p className=\"text-sm text-text-muted mb-1\">Error</p>\n <pre className=\"text-xs whitespace-pre-wrap p-3 rounded-md bg-status-error-bg-subtle text-status-error-text border border-status-error-border\">\n {log.error}\n </pre>\n </div>\n )}\n <div>\n <p className=\"text-sm text-text-muted mb-1\">Payload</p>\n <pre className=\"text-xs whitespace-pre-wrap p-3 rounded-md bg-bg-sunken/60 text-text-secondary max-h-64 overflow-y-auto\">\n {JSON.stringify(log.payload, null, 2)}\n </pre>\n </div>\n {!log.processed && canCreateRefund && (\n <button\n type=\"button\"\n onClick={() => onCreateRefund(log.id)}\n disabled={isCreatingRefund}\n className=\"inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bgHover disabled:opacity-50\"\n >\n {isCreatingRefund ? (\n <Loader2 className=\"size-4 animate-spin\" />\n ) : (\n <DollarSign className=\"size-4\" />\n )}\n Create refund from this webhook\n </button>\n )}\n </div>\n </div>\n </div>\n );\n};\n\nexport const BillingWebhookLogsPage: FC = () => {\n const permissions = useBillingPermissions();\n const [page, setPage] = useState(0);\n const [filters, setFilters] = useState<BillingWebhookLogFilters>({});\n const [selectedLog, setSelectedLog] = useState<WebhookLog | null>(null);\n\n const { logs, totalCount, isLoading, error, refetch } = useBillingWebhookLogs(\n filters,\n page,\n PAGE_SIZE\n );\n const { createRefundRecordFromWebhook, isCreatingFromWebhook } = useRefundMutations();\n\n if (!permissions.isBillingAdmin) {\n return <AccessDenied message=\"You don't have permission to view billing webhook logs.\" />;\n }\n\n if (error && isServerError(error)) {\n return (\n <div className=\"p-6\">\n <ServerError\n title=\"Server Unavailable\"\n message=\"Unable to load webhook logs. The server might be down or experiencing issues.\"\n onRetry={() => refetch()}\n showRetry\n />\n </div>\n );\n }\n\n const handleFilterChange = <K extends keyof BillingWebhookLogFilters>(\n key: K,\n value: BillingWebhookLogFilters[K]\n ) => {\n setFilters((prev) => ({ ...prev, [key]: value }));\n setPage(0);\n };\n\n const handleCreateRefund = async (webhookLogId: string) => {\n await createRefundRecordFromWebhook(webhookLogId);\n setSelectedLog(null);\n };\n\n const columns: ResponsiveTableColumn<WebhookLog>[] = [\n {\n key: 'date',\n header: 'Received',\n priority: 'primary',\n cellClassName: 'whitespace-nowrap',\n cell: (log) => (\n <div className=\"flex flex-col\">\n <span className=\"text-sm text-text-primary\">\n {formatDateTime(log.createdAt).split(' ')[0]}\n </span>\n <span className=\"text-xs text-text-muted\">\n {formatDateTime(log.createdAt).split(' ')[1]}\n </span>\n </div>\n ),\n },\n {\n key: 'status',\n header: 'Status',\n cellClassName: 'whitespace-nowrap',\n cell: (log) => {\n const badge = getBadge(log);\n const BadgeIcon = badge.icon;\n return (\n <span\n className={`inline-flex items-center gap-1 px-2 py-0.5 text-xs font-medium rounded ${badge.className}`}\n >\n <BadgeIcon className=\"size-3\" />\n {badge.label}\n </span>\n );\n },\n },\n {\n key: 'provider',\n header: 'Provider',\n priority: 'hidden-on-mobile',\n cellClassName: 'whitespace-nowrap',\n cell: (log) => <span className=\"text-sm text-text-primary capitalize\">{log.provider}</span>,\n },\n {\n key: 'event',\n header: 'Event',\n cellClassName: 'whitespace-nowrap max-w-[220px] truncate',\n cell: (log) => <span className=\"text-sm font-mono text-text-muted\">{log.event}</span>,\n },\n {\n key: 'error',\n header: 'Error',\n priority: 'hidden-on-mobile',\n cellClassName: 'max-w-[280px] truncate',\n cell: (log) => <span className=\"text-sm text-status-error-text\">{log.error || '-'}</span>,\n },\n ];\n\n const totalPages = Math.max(1, Math.ceil(totalCount / PAGE_SIZE));\n\n return (\n <div className=\"space-y-6 p-6\">\n <PageHeader\n title=\"Billing Webhook Logs\"\n description=\"Every Stripe/Razorpay webhook delivery — investigate processing failures directly.\"\n actions={\n <button\n type=\"button\"\n onClick={() => refetch()}\n className=\"inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md border border-border-subtle bg-bg-surface hover:bg-bg-sunken/50\"\n >\n <RefreshCw className=\"size-4\" />\n Refresh\n </button>\n }\n />\n\n {/* Filters */}\n <div className=\"p-4 border border-border-subtle rounded-lg bg-bg-sunken/30 grid grid-cols-1 sm:grid-cols-3 gap-4\">\n <div>\n <label className=\"block text-sm font-medium mb-1\">Processed</label>\n <select\n value={filters.processed === undefined ? '' : String(filters.processed)}\n onChange={(e) =>\n handleFilterChange(\n 'processed',\n e.target.value === '' ? undefined : e.target.value === 'true'\n )\n }\n className=\"w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary\"\n >\n <option value=\"\">All</option>\n <option value=\"false\">Unprocessed / Failed</option>\n <option value=\"true\">Processed</option>\n </select>\n </div>\n <div>\n <label className=\"block text-sm font-medium mb-1\">Provider</label>\n <select\n value={filters.provider || ''}\n onChange={(e) => handleFilterChange('provider', e.target.value || undefined)}\n className=\"w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary\"\n >\n <option value=\"\">All Providers</option>\n {PROVIDER_OPTIONS.map((p) => (\n <option key={p} value={p}>\n {p.charAt(0).toUpperCase() + p.slice(1)}\n </option>\n ))}\n </select>\n </div>\n <div>\n <label className=\"block text-sm font-medium mb-1\">Has Error</label>\n <select\n value={filters.hasError === undefined ? '' : String(filters.hasError)}\n onChange={(e) =>\n handleFilterChange(\n 'hasError',\n e.target.value === '' ? undefined : e.target.value === 'true'\n )\n }\n className=\"w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary\"\n >\n <option value=\"\">All</option>\n <option value=\"true\">Has error</option>\n <option value=\"false\">No error</option>\n </select>\n </div>\n </div>\n\n {/* Table */}\n {isLoading && logs.length === 0 ? (\n <div className=\"space-y-2\">\n {[1, 2, 3, 4, 5].map((i) => (\n <div key={i} className=\"h-16 bg-bg-sunken animate-pulse rounded\" />\n ))}\n </div>\n ) : logs.length === 0 ? (\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title=\"No webhook logs found\"\n description=\"Nothing matches these filters — try widening them, or check back after the next payment.\"\n />\n ) : (\n <div className=\"border border-border-subtle rounded-lg overflow-hidden\">\n <ResponsiveTable<WebhookLog>\n columns={columns}\n data={logs}\n rowKey={(log) => log.id}\n rowActions={(log) => (\n <button\n type=\"button\"\n onClick={() => setSelectedLog(log)}\n className=\"inline-flex items-center gap-1.5 px-2 py-1 text-sm font-medium rounded-button text-text-secondary hover:text-text-primary hover:bg-bg-sunken/60 transition-colors\"\n >\n <Eye className=\"size-4\" />\n <span className=\"hidden sm:inline\">View</span>\n </button>\n )}\n />\n </div>\n )}\n\n {/* Pagination */}\n {totalCount > 0 && (\n <div className=\"flex flex-col sm:flex-row items-center justify-between gap-4 border-t border-border-subtle pt-4\">\n <p className=\"text-sm text-text-muted text-center sm:text-left\">\n Showing {page * PAGE_SIZE + 1} to {Math.min((page + 1) * PAGE_SIZE, totalCount)} of{' '}\n {totalCount} logs\n </p>\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={() => setPage((p) => Math.max(0, p - 1))}\n disabled={page === 0}\n className=\"inline-flex items-center gap-1 px-3 py-1.5 text-sm font-medium rounded-button border border-border-subtle bg-bg-surface hover:bg-bg-sunken/50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors\"\n >\n <ChevronLeft className=\"size-4\" />\n <span className=\"hidden sm:inline\">Previous</span>\n </button>\n <span className=\"text-sm text-text-muted px-2\">\n <span className=\"hidden sm:inline\">Page </span>\n {page + 1} <span className=\"hidden sm:inline\">of</span>\n <span className=\"sm:hidden\">/</span> {totalPages}\n </span>\n <button\n type=\"button\"\n onClick={() => setPage((p) => (p + 1 < totalPages ? p + 1 : p))}\n disabled={page + 1 >= totalPages}\n className=\"inline-flex items-center gap-1 px-3 py-1.5 text-sm font-medium rounded-button border border-border-subtle bg-bg-surface hover:bg-bg-sunken/50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors\"\n >\n <span className=\"hidden sm:inline\">Next</span>\n <ChevronRight className=\"size-4\" />\n </button>\n </div>\n </div>\n )}\n\n <WebhookLogDetailModal\n log={selectedLog}\n onClose={() => setSelectedLog(null)}\n onCreateRefund={handleCreateRefund}\n isCreatingRefund={isCreatingFromWebhook}\n canCreateRefund={\n selectedLog\n ? REFUND_ELIGIBLE_EVENTS.has(selectedLog.event) && Boolean(selectedLog.error)\n : false\n }\n />\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAqCA,IAAMA,IAAY,IACZC,IAAmB,CAAC,UAAU,UAAU,GACxCC,oBAAyB,IAAI,IAAI;CACrC;CACA;CACA;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