@burdenoff/microfe-billing 2026.1108.1 → 2026.1109.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (773) 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 +2 -1
  504. package/dist/billing/shared/utils/directActivityGraphql.js +1 -1
  505. package/dist/billing/shared/utils/directBillingGraphql.d.ts +2 -1
  506. package/dist/billing/shared/utils/directBillingGraphql.js +3 -3
  507. package/dist/billing/shared/utils/directBillingGraphql.js.map +1 -1
  508. package/dist/billing/shared/utils/error.d.ts +0 -1
  509. package/dist/billing/shared/utils/error.js +1 -2
  510. package/dist/billing/shared/utils/error.js.map +1 -1
  511. package/dist/billing/shared/utils/format.d.ts +0 -1
  512. package/dist/billing/shared/utils/format.js +1 -2
  513. package/dist/billing/shared/utils/format.js.map +1 -1
  514. package/dist/billing/shared/utils/gatewayGraphql.d.ts +2 -1
  515. package/dist/billing/shared/utils/gatewayGraphql.js +4 -4
  516. package/dist/billing/shared/utils/gatewayGraphql.js.map +1 -1
  517. package/dist/billing/shared/utils/index.d.ts +0 -1
  518. package/dist/billing/shared/utils/index.js +9 -8
  519. package/dist/billing/shared/utils/navigation.d.ts +0 -1
  520. package/dist/billing/shared/utils/navigation.js +1 -2
  521. package/dist/billing/shared/utils/navigation.js.map +1 -1
  522. package/dist/billing/shared/utils/paymentTheme.d.ts +0 -1
  523. package/dist/billing/shared/utils/paymentTheme.js +2 -3
  524. package/dist/billing/shared/utils/paymentTheme.js.map +1 -1
  525. package/dist/billing/shared/utils/pinnedRequest.d.ts +48 -0
  526. package/dist/billing/shared/utils/pinnedRequest.js +63 -0
  527. package/dist/billing/shared/utils/pinnedRequest.js.map +1 -0
  528. package/dist/billing/shared/utils/planFeatureQuantity.d.ts +0 -1
  529. package/dist/billing/shared/utils/planFeatureQuantity.js +2 -3
  530. package/dist/billing/shared/utils/planFeatureQuantity.js.map +1 -1
  531. package/dist/billing/shared/utils/status.d.ts +0 -1
  532. package/dist/billing/shared/utils/status.js +24 -25
  533. package/dist/billing/shared/utils/status.js.map +1 -1
  534. package/dist/billing/shared/utils/tokens.d.ts +0 -1
  535. package/dist/billing/shared/utils/tokens.js +1 -2
  536. package/dist/billing/shared/utils/tokens.js.map +1 -1
  537. package/dist/billing/translations/en.d.ts +0 -1
  538. package/dist/billing/types/index.d.ts +0 -1
  539. package/dist/dev/main.d.ts +0 -1
  540. package/dist/generated/global-operations.d.ts +3252 -3206
  541. package/dist/generated/global-operations.js +445 -422
  542. package/dist/generated/global-operations.js.map +1 -1
  543. package/dist/generated/global-types.d.ts +2 -22
  544. package/dist/generated/global-types.js +1 -2
  545. package/dist/generated/global-types.js.map +1 -1
  546. package/dist/generated/wspace-operations.d.ts +76 -47
  547. package/dist/generated/wspace-operations.js +2 -3
  548. package/dist/generated/wspace-operations.js.map +1 -1
  549. package/dist/generated/wspace-types.d.ts +4 -24
  550. package/dist/index.d.ts +0 -1
  551. package/dist/index.js +1 -2
  552. package/dist/node_modules/@capacitor/core/dist/index.js +12 -14
  553. package/dist/node_modules/@capacitor/core/dist/index.js.map +1 -1
  554. package/dist/node_modules/sonner/dist/index.js +75 -69
  555. package/dist/node_modules/sonner/dist/index.js.map +1 -1
  556. package/dist/utils/nativeBridge.d.ts +0 -1
  557. package/dist/utils/nativeBridge.js +1 -2
  558. package/package.json +66 -55
  559. package/dist/billing/BillingAdminRoutes.d.ts.map +0 -1
  560. package/dist/billing/BillingRoot.d.ts.map +0 -1
  561. package/dist/billing/BillingUserRoutes.d.ts.map +0 -1
  562. package/dist/billing/hooks/useBillingAccountSelection.d.ts.map +0 -1
  563. package/dist/billing/hooks/useBillingEventEmitter.d.ts.map +0 -1
  564. package/dist/billing/hooks/useBillingNavigate.d.ts.map +0 -1
  565. package/dist/billing/hooks/useBillingPermissions.d.ts.map +0 -1
  566. package/dist/billing/hooks/useDefaultBillingCurrency.d.ts.map +0 -1
  567. package/dist/billing/hooks/useProducts.d.ts.map +0 -1
  568. package/dist/billing/index.d.ts.map +0 -1
  569. package/dist/billing/lib/native-purchases.d.ts.map +0 -1
  570. package/dist/billing/modules/addons/components/FloatingCartDrawer.d.ts.map +0 -1
  571. package/dist/billing/modules/addons/hooks/index.d.ts.map +0 -1
  572. package/dist/billing/modules/addons/hooks/useAddonPurchaseEligibility.d.ts.map +0 -1
  573. package/dist/billing/modules/addons/hooks/useAddons.d.ts.map +0 -1
  574. package/dist/billing/modules/addons/index.d.ts.map +0 -1
  575. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.d.ts.map +0 -1
  576. package/dist/billing/modules/addons/pages/AddonCreatePage.d.ts.map +0 -1
  577. package/dist/billing/modules/addons/pages/AddonDetailPage.d.ts.map +0 -1
  578. package/dist/billing/modules/addons/pages/AddonEditPage.d.ts.map +0 -1
  579. package/dist/billing/modules/addons/pages/AddonsBrowsePage.d.ts.map +0 -1
  580. package/dist/billing/modules/addons/pages/AddonsListPage.d.ts.map +0 -1
  581. package/dist/billing/modules/addons/pages/index.d.ts.map +0 -1
  582. package/dist/billing/modules/addons/store/addonCartStore.d.ts.map +0 -1
  583. package/dist/billing/modules/affiliate/api.d.ts.map +0 -1
  584. package/dist/billing/modules/affiliate/index.d.ts.map +0 -1
  585. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.d.ts.map +0 -1
  586. package/dist/billing/modules/analytics/index.d.ts.map +0 -1
  587. package/dist/billing/modules/analytics/pages/AnalyticsPage.d.ts.map +0 -1
  588. package/dist/billing/modules/analytics/pages/index.d.ts.map +0 -1
  589. package/dist/billing/modules/billing/hooks/index.d.ts.map +0 -1
  590. package/dist/billing/modules/billing/hooks/useInvoices.d.ts.map +0 -1
  591. package/dist/billing/modules/billing/hooks/useOrderCallbacks.d.ts.map +0 -1
  592. package/dist/billing/modules/billing/hooks/usePayments.d.ts.map +0 -1
  593. package/dist/billing/modules/billing/hooks/useRefunds.d.ts.map +0 -1
  594. package/dist/billing/modules/billing/hooks/useTransactions.d.ts.map +0 -1
  595. package/dist/billing/modules/billing/index.d.ts.map +0 -1
  596. package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.d.ts.map +0 -1
  597. package/dist/billing/modules/billing/pages/InvoiceDetailPage.d.ts.map +0 -1
  598. package/dist/billing/modules/billing/pages/InvoicesListPage.d.ts.map +0 -1
  599. package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.d.ts.map +0 -1
  600. package/dist/billing/modules/billing/pages/PaymentMethodsPage.d.ts.map +0 -1
  601. package/dist/billing/modules/billing/pages/RefundIssueLogsPage.d.ts.map +0 -1
  602. package/dist/billing/modules/billing/pages/RefundsPage.d.ts.map +0 -1
  603. package/dist/billing/modules/billing/pages/TransactionsPage.d.ts.map +0 -1
  604. package/dist/billing/modules/billing/pages/UserRefundsPage.d.ts.map +0 -1
  605. package/dist/billing/modules/billing/pages/index.d.ts.map +0 -1
  606. package/dist/billing/modules/checkout/components/AutoPayToggle.d.ts.map +0 -1
  607. package/dist/billing/modules/checkout/components/BillingAccountSelector.d.ts.map +0 -1
  608. package/dist/billing/modules/checkout/components/CompactAutoPayToggle.d.ts.map +0 -1
  609. package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.d.ts.map +0 -1
  610. package/dist/billing/modules/checkout/components/CreditsAmountInput.d.ts.map +0 -1
  611. package/dist/billing/modules/checkout/components/CreditsPaymentOption.d.ts.map +0 -1
  612. package/dist/billing/modules/checkout/components/CurrencySelector.d.ts.map +0 -1
  613. package/dist/billing/modules/checkout/components/NativeCheckoutView.d.ts.map +0 -1
  614. package/dist/billing/modules/checkout/components/OrderSummary.d.ts.map +0 -1
  615. package/dist/billing/modules/checkout/components/PaymentProviderSelector.d.ts.map +0 -1
  616. package/dist/billing/modules/checkout/components/PromoCodeInput.d.ts.map +0 -1
  617. package/dist/billing/modules/checkout/components/RazorpayPaymentButton.d.ts.map +0 -1
  618. package/dist/billing/modules/checkout/components/SavedCardSelector.d.ts.map +0 -1
  619. package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.d.ts.map +0 -1
  620. package/dist/billing/modules/checkout/components/StoreShippingSection.d.ts.map +0 -1
  621. package/dist/billing/modules/checkout/components/StripePaymentForm.d.ts.map +0 -1
  622. package/dist/billing/modules/checkout/components/SubscriptionSelector.d.ts.map +0 -1
  623. package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.d.ts.map +0 -1
  624. package/dist/billing/modules/checkout/components/WebCheckoutRedirectView.d.ts.map +0 -1
  625. package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.d.ts.map +0 -1
  626. package/dist/billing/modules/checkout/components/index.d.ts.map +0 -1
  627. package/dist/billing/modules/checkout/hooks/index.d.ts.map +0 -1
  628. package/dist/billing/modules/checkout/hooks/useCheckout.d.ts.map +0 -1
  629. package/dist/billing/modules/checkout/hooks/useNativeCheckout.d.ts.map +0 -1
  630. package/dist/billing/modules/checkout/hooks/usePaymentProviders.d.ts.map +0 -1
  631. package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.d.ts.map +0 -1
  632. package/dist/billing/modules/checkout/hooks/useStoreShipping.d.ts.map +0 -1
  633. package/dist/billing/modules/checkout/index.d.ts.map +0 -1
  634. package/dist/billing/modules/checkout/pages/CheckoutPage.d.ts.map +0 -1
  635. package/dist/billing/modules/checkout/pages/index.d.ts.map +0 -1
  636. package/dist/billing/modules/checkout/types/index.d.ts.map +0 -1
  637. package/dist/billing/modules/checkout/utils/storeOrder.d.ts.map +0 -1
  638. package/dist/billing/modules/coupons/index.d.ts.map +0 -1
  639. package/dist/billing/modules/coupons/pages/CouponDetailPage.d.ts.map +0 -1
  640. package/dist/billing/modules/coupons/pages/CouponsListPage.d.ts.map +0 -1
  641. package/dist/billing/modules/coupons/pages/CreateCouponPage.d.ts.map +0 -1
  642. package/dist/billing/modules/coupons/pages/EditCouponPage.d.ts.map +0 -1
  643. package/dist/billing/modules/coupons/pages/index.d.ts.map +0 -1
  644. package/dist/billing/modules/credits/hooks/index.d.ts.map +0 -1
  645. package/dist/billing/modules/credits/hooks/useCredits.d.ts.map +0 -1
  646. package/dist/billing/modules/credits/index.d.ts.map +0 -1
  647. package/dist/billing/modules/credits/pages/AdminCreditsPage.d.ts.map +0 -1
  648. package/dist/billing/modules/credits/pages/CreditTransactionsPage.d.ts.map +0 -1
  649. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.d.ts.map +0 -1
  650. package/dist/billing/modules/credits/pages/CreditsPage.d.ts.map +0 -1
  651. package/dist/billing/modules/credits/pages/index.d.ts.map +0 -1
  652. package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.d.ts.map +0 -1
  653. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.d.ts.map +0 -1
  654. package/dist/billing/modules/dashboard/components/BillingAccountCard.d.ts.map +0 -1
  655. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.d.ts.map +0 -1
  656. package/dist/billing/modules/dashboard/components/PaymentMethodsSection.d.ts.map +0 -1
  657. package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.d.ts.map +0 -1
  658. package/dist/billing/modules/dashboard/components/index.d.ts.map +0 -1
  659. package/dist/billing/modules/dashboard/hooks/index.d.ts.map +0 -1
  660. package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.d.ts.map +0 -1
  661. package/dist/billing/modules/dashboard/hooks/useDashboard.d.ts.map +0 -1
  662. package/dist/billing/modules/dashboard/index.d.ts.map +0 -1
  663. package/dist/billing/modules/dashboard/pages/OverviewPage.d.ts.map +0 -1
  664. package/dist/billing/modules/dashboard/pages/index.d.ts.map +0 -1
  665. package/dist/billing/modules/discounts/index.d.ts.map +0 -1
  666. package/dist/billing/modules/discounts/pages/DiscountsListPage.d.ts.map +0 -1
  667. package/dist/billing/modules/discounts/pages/index.d.ts.map +0 -1
  668. package/dist/billing/modules/earnings/api.d.ts.map +0 -1
  669. package/dist/billing/modules/earnings/index.d.ts.map +0 -1
  670. package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.d.ts.map +0 -1
  671. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.d.ts.map +0 -1
  672. package/dist/billing/modules/earnings/pages/EarningsPage.d.ts.map +0 -1
  673. package/dist/billing/modules/earnings/pages/PayoutAdminPage.d.ts.map +0 -1
  674. package/dist/billing/modules/earnings/pages/PayoutsPage.d.ts.map +0 -1
  675. package/dist/billing/modules/earnings/payoutAccountStatus.d.ts.map +0 -1
  676. package/dist/billing/modules/plans/constants/enterprise.d.ts.map +0 -1
  677. package/dist/billing/modules/plans/constants/featuredQuotas.d.ts.map +0 -1
  678. package/dist/billing/modules/plans/hooks/index.d.ts.map +0 -1
  679. package/dist/billing/modules/plans/hooks/usePlans.d.ts.map +0 -1
  680. package/dist/billing/modules/plans/hooks/useQuotas.d.ts.map +0 -1
  681. package/dist/billing/modules/plans/index.d.ts.map +0 -1
  682. package/dist/billing/modules/plans/pages/PlanAssignFreePage.d.ts.map +0 -1
  683. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.d.ts.map +0 -1
  684. package/dist/billing/modules/plans/pages/PlanCreatePage.d.ts.map +0 -1
  685. package/dist/billing/modules/plans/pages/PlanDetailPage.d.ts.map +0 -1
  686. package/dist/billing/modules/plans/pages/PlanEditPage.d.ts.map +0 -1
  687. package/dist/billing/modules/plans/pages/PlansBrowsePage.d.ts.map +0 -1
  688. package/dist/billing/modules/plans/pages/PlansListPage.d.ts.map +0 -1
  689. package/dist/billing/modules/plans/pages/index.d.ts.map +0 -1
  690. package/dist/billing/modules/plans/utils/currencyPriceOverrides.d.ts.map +0 -1
  691. package/dist/billing/modules/plans/utils/planSelector.d.ts.map +0 -1
  692. package/dist/billing/modules/promotions/index.d.ts.map +0 -1
  693. package/dist/billing/modules/promotions/pages/CreatePromotionPage.d.ts.map +0 -1
  694. package/dist/billing/modules/promotions/pages/PromotionsListPage.d.ts.map +0 -1
  695. package/dist/billing/modules/promotions/pages/index.d.ts.map +0 -1
  696. package/dist/billing/modules/quota/hooks/index.d.ts.map +0 -1
  697. package/dist/billing/modules/quota/hooks/useQuota.d.ts.map +0 -1
  698. package/dist/billing/modules/quota/hooks/useQuotaTemplates.d.ts.map +0 -1
  699. package/dist/billing/modules/quota/index.d.ts.map +0 -1
  700. package/dist/billing/modules/quota/pages/QuotaAssignFreePage.d.ts.map +0 -1
  701. package/dist/billing/modules/quota/pages/QuotaPage.d.ts.map +0 -1
  702. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.d.ts.map +0 -1
  703. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.d.ts.map +0 -1
  704. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.d.ts.map +0 -1
  705. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.d.ts.map +0 -1
  706. package/dist/billing/modules/quota/pages/index.d.ts.map +0 -1
  707. package/dist/billing/modules/quota/utils/quotaSelector.d.ts.map +0 -1
  708. package/dist/billing/modules/settings/index.d.ts.map +0 -1
  709. package/dist/billing/modules/settings/pages/SettingsPage.d.ts.map +0 -1
  710. package/dist/billing/modules/settings/pages/TeamPermissionsPage.d.ts.map +0 -1
  711. package/dist/billing/modules/settings/pages/index.d.ts.map +0 -1
  712. package/dist/billing/modules/store/graphql/index.d.ts.map +0 -1
  713. package/dist/billing/modules/store/index.d.ts.map +0 -1
  714. package/dist/billing/modules/store/pages/StoreCheckoutPage.d.ts.map +0 -1
  715. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.d.ts.map +0 -1
  716. package/dist/billing/modules/subscriptions/hooks/index.d.ts.map +0 -1
  717. package/dist/billing/modules/subscriptions/hooks/useSubscriptions.d.ts.map +0 -1
  718. package/dist/billing/modules/subscriptions/index.d.ts.map +0 -1
  719. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.d.ts.map +0 -1
  720. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.d.ts.map +0 -1
  721. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.d.ts.map +0 -1
  722. package/dist/billing/modules/subscriptions/pages/index.d.ts.map +0 -1
  723. package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.d.ts.map +0 -1
  724. package/dist/billing/modules/usage/hooks/index.d.ts.map +0 -1
  725. package/dist/billing/modules/usage/hooks/useUsage.d.ts.map +0 -1
  726. package/dist/billing/modules/usage/hooks/useWorkspaceAiSpend.d.ts.map +0 -1
  727. package/dist/billing/modules/usage/index.d.ts.map +0 -1
  728. package/dist/billing/modules/usage/pages/UsagePage.d.ts.map +0 -1
  729. package/dist/billing/modules/usage/pages/index.d.ts.map +0 -1
  730. package/dist/billing/modules/usage/utils/aiSpend.d.ts.map +0 -1
  731. package/dist/billing/providers/BillingProvider.d.ts.map +0 -1
  732. package/dist/billing/shared/components/AccessDenied.d.ts.map +0 -1
  733. package/dist/billing/shared/components/ActorIdentity.d.ts.map +0 -1
  734. package/dist/billing/shared/components/CurrencyPriceOverridesEditor.d.ts.map +0 -1
  735. package/dist/billing/shared/components/EmptyState.d.ts.map +0 -1
  736. package/dist/billing/shared/components/GeoPricingOverridesEditor.d.ts.map +0 -1
  737. package/dist/billing/shared/components/PageHeader.d.ts.map +0 -1
  738. package/dist/billing/shared/components/PushPermissionNudge.d.ts.map +0 -1
  739. package/dist/billing/shared/components/ServerError.d.ts.map +0 -1
  740. package/dist/billing/shared/components/StatCard.d.ts.map +0 -1
  741. package/dist/billing/shared/components/index.d.ts.map +0 -1
  742. package/dist/billing/shared/hooks/index.d.ts.map +0 -1
  743. package/dist/billing/shared/hooks/useActorProfiles.d.ts.map +0 -1
  744. package/dist/billing/shared/hooks/useTr.d.ts.map +0 -1
  745. package/dist/billing/shared/index.d.ts.map +0 -1
  746. package/dist/billing/shared/types/graphql.d.ts.map +0 -1
  747. package/dist/billing/shared/types/index.d.ts.map +0 -1
  748. package/dist/billing/shared/ui/Card.d.ts.map +0 -1
  749. package/dist/billing/shared/ui/MetricCard.d.ts.map +0 -1
  750. package/dist/billing/shared/ui/ProgressBar.d.ts.map +0 -1
  751. package/dist/billing/shared/ui/SectionHeader.d.ts.map +0 -1
  752. package/dist/billing/shared/ui/StatusPill.d.ts.map +0 -1
  753. package/dist/billing/shared/ui/index.d.ts.map +0 -1
  754. package/dist/billing/shared/utils/directActivityGraphql.d.ts.map +0 -1
  755. package/dist/billing/shared/utils/directBillingGraphql.d.ts.map +0 -1
  756. package/dist/billing/shared/utils/error.d.ts.map +0 -1
  757. package/dist/billing/shared/utils/format.d.ts.map +0 -1
  758. package/dist/billing/shared/utils/gatewayGraphql.d.ts.map +0 -1
  759. package/dist/billing/shared/utils/index.d.ts.map +0 -1
  760. package/dist/billing/shared/utils/navigation.d.ts.map +0 -1
  761. package/dist/billing/shared/utils/paymentTheme.d.ts.map +0 -1
  762. package/dist/billing/shared/utils/planFeatureQuantity.d.ts.map +0 -1
  763. package/dist/billing/shared/utils/status.d.ts.map +0 -1
  764. package/dist/billing/shared/utils/tokens.d.ts.map +0 -1
  765. package/dist/billing/translations/en.d.ts.map +0 -1
  766. package/dist/billing/types/index.d.ts.map +0 -1
  767. package/dist/dev/main.d.ts.map +0 -1
  768. package/dist/generated/global-operations.d.ts.map +0 -1
  769. package/dist/generated/global-types.d.ts.map +0 -1
  770. package/dist/generated/wspace-operations.d.ts.map +0 -1
  771. package/dist/generated/wspace-types.d.ts.map +0 -1
  772. package/dist/index.d.ts.map +0 -1
  773. package/dist/utils/nativeBridge.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"PayoutsPage.js","names":[],"sources":["../../../../../src/billing/modules/earnings/pages/PayoutsPage.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useState, type FC } from 'react';\nimport { Landmark, RefreshCw, Send } from 'lucide-react';\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n ResponsiveTable,\n type ResponsiveTableColumn,\n} from '@burdenoff/fe-libs/ui';\n\nimport { useBillingPermissions } from '../../../hooks/useBillingPermissions';\nimport { useBillingEventEmitter } from '../../../hooks/useBillingEventEmitter';\nimport { useBilling } from '../../../providers/BillingProvider';\nimport { AccessDenied, PageHeader, ServerError } from '../../../shared/components';\nimport { PagePurpose, IllustratedEmptyState } from '@burdenoff/fe-libs/ui';\nimport { formatCurrency, formatDateTime, isServerError } from '../../../shared/utils';\nimport { useGetDefaultBillingAccountSettingsQuery } from '../../../../generated/global-operations';\nimport {\n addPayoutAccount,\n archivePayoutAccount,\n fetchPayoutAccounts,\n fetchPayoutRequests,\n requestPayout,\n setDefaultPayoutAccount,\n updatePayoutAccount,\n type PayoutAccount,\n type PayoutRequest,\n} from '../api';\nimport {\n PAYOUT_ACCOUNT_TONE_CLASSES,\n isPayoutAccountPayable,\n payoutAccountStatusView,\n pickPayableAccountId,\n} from '../payoutAccountStatus';\n\nconst payoutRequestColumns: ResponsiveTableColumn<PayoutRequest>[] = [\n {\n key: 'amount',\n header: 'Amount',\n priority: 'primary',\n cell: (request) => (\n <span className=\"tabular-nums\">\n {formatCurrency(request.requestedAmount, request.currency)}\n </span>\n ),\n },\n { key: 'provider', header: 'Provider', cell: (request) => request.provider },\n { key: 'status', header: 'Status', cell: (request) => request.status },\n {\n key: 'account',\n header: 'Account',\n cell: (request) => request.payoutAccount?.label || '-',\n },\n {\n key: 'created',\n header: 'Created',\n cell: (request) => formatDateTime(request.createdAt),\n },\n];\n\nexport const PayoutsPage: FC = () => {\n const permissions = useBillingPermissions();\n const { emit } = useBillingEventEmitter();\n const { apiGatewayUrl, authToken, orgId } = useBilling();\n const { data: billingAccountData } = useGetDefaultBillingAccountSettingsQuery({});\n const billingAccountId = billingAccountData?.getDefaultBillingAccount?.id;\n\n const [accounts, setAccounts] = useState<PayoutAccount[]>([]);\n const [requests, setRequests] = useState<PayoutRequest[]>([]);\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState<Error | null>(null);\n const [accountForm, setAccountForm] = useState({\n label: '',\n type: 'BANK_ACCOUNT',\n providerPreference: 'AUTO',\n country: 'US',\n currency: 'USD',\n accountHolderName: '',\n bankName: '',\n accountNumber: '',\n routingNumber: '',\n ifsc: '',\n upiId: '',\n });\n const [requestAmount, setRequestAmount] = useState('');\n const [selectedAccountId, setSelectedAccountId] = useState<string>('');\n const [editingAccountId, setEditingAccountId] = useState<string | null>(null);\n const [archiveAccountId, setArchiveAccountId] = useState<string | null>(null);\n const [notice, setNotice] = useState<string | null>(null);\n\n const requestContext = useMemo(\n () => ({\n apiGatewayUrl,\n authToken,\n orgId,\n }),\n [apiGatewayUrl, authToken, orgId]\n );\n\n const loadData = useCallback(async () => {\n if (!billingAccountId) return;\n setLoading(true);\n setError(null);\n try {\n const [loadedAccounts, loadedRequests] = await Promise.all([\n fetchPayoutAccounts(billingAccountId, requestContext),\n fetchPayoutRequests(billingAccountId, requestContext),\n ]);\n setAccounts(loadedAccounts);\n setRequests(loadedRequests);\n // Only verified accounts can be paid out to (BOFF-10953).\n setSelectedAccountId((current) => pickPayableAccountId(loadedAccounts, current));\n } catch (loadError) {\n setError(loadError instanceof Error ? loadError : new Error('Failed to load payout data'));\n } finally {\n setLoading(false);\n }\n }, [billingAccountId, requestContext]);\n\n useEffect(() => {\n void loadData();\n }, [loadData]);\n\n if (!permissions.canManagePaymentMethods) {\n return <AccessDenied message=\"You don't have permission to manage payout accounts.\" />;\n }\n\n if (error && isServerError(error)) {\n return (\n <ServerError\n title=\"Payout data unavailable\"\n message={error.message}\n onRetry={() => void loadData()}\n showRetry\n />\n );\n }\n\n const handleAddAccount = async () => {\n if (!billingAccountId) return;\n setNotice(null);\n const payload = {\n billingAccountId,\n ...accountForm,\n };\n\n if (editingAccountId) {\n await updatePayoutAccount(editingAccountId, payload, requestContext);\n emit('billing.payout_account.updated', {\n route: '/billing/payouts',\n entityId: editingAccountId,\n source: 'payouts',\n });\n } else {\n const created = await addPayoutAccount(payload, requestContext);\n emit('billing.payout_account.added', {\n route: '/billing/payouts',\n entityId: billingAccountId,\n source: 'payouts',\n });\n // RazorpayX and Stripe Connect accounts stay pending until processor\n // onboarding verifies them (BOFF-10895); say so instead of implying the\n // account is ready to receive payouts.\n setNotice(\n created.status === 'ACTIVE'\n ? 'Payout account saved and ready to receive payouts.'\n : 'Payout account saved. It stays pending until the payout processor verifies it; you can request payouts to it once it is verified.'\n );\n }\n\n setAccountForm({\n label: '',\n type: 'BANK_ACCOUNT',\n providerPreference: 'AUTO',\n country: 'US',\n currency: 'USD',\n accountHolderName: '',\n bankName: '',\n accountNumber: '',\n routingNumber: '',\n ifsc: '',\n upiId: '',\n });\n setEditingAccountId(null);\n await loadData();\n };\n\n const handleSetDefault = async (accountId: string) => {\n setNotice(null);\n await setDefaultPayoutAccount(accountId, requestContext);\n await loadData();\n };\n\n const handleArchive = async (accountId: string) => {\n setNotice(null);\n await archivePayoutAccount(accountId, requestContext);\n emit('billing.payout_account.archived', {\n route: '/billing/payouts',\n entityId: accountId,\n source: 'payouts',\n });\n await loadData();\n };\n\n const handleEditAccount = (account: PayoutAccount) => {\n setNotice(null);\n setEditingAccountId(account.id);\n setAccountForm((current) => ({\n ...current,\n label: account.label,\n type: account.type,\n providerPreference: account.providerPreference,\n country: account.country || current.country,\n currency: account.currency,\n accountHolderName: account.displayName || current.accountHolderName,\n bankName: '',\n accountNumber: '',\n routingNumber: '',\n ifsc: '',\n upiId: '',\n }));\n };\n\n const selectedAccount = accounts.find((account) => account.id === selectedAccountId);\n const hasPayableAccount = accounts.some(isPayoutAccountPayable);\n\n const handleRequestPayout = async () => {\n if (!billingAccountId || !selectedAccountId || !requestAmount) return;\n if (!selectedAccount || !isPayoutAccountPayable(selectedAccount)) return;\n await requestPayout(\n {\n billingAccountId,\n payoutAccountId: selectedAccountId,\n amount: Number(requestAmount),\n currency: selectedAccount.currency,\n },\n requestContext\n );\n emit('billing.payout.requested', {\n route: '/billing/payouts',\n entityId: selectedAccountId,\n source: 'payouts',\n amount: Number(requestAmount),\n currency: selectedAccount.currency,\n });\n setRequestAmount('');\n await loadData();\n };\n\n return (\n <div className=\"space-y-6 p-6\">\n <PageHeader\n title=\"Payouts\"\n description=\"Register payout accounts, request withdrawals, and track disbursement status.\"\n />\n\n <PagePurpose>\n Get your earnings paid out to a real bank account or UPI. Register where you want to be\n paid, request a withdrawal of your available balance, and track each request from submission\n through to disbursement here.\n </PagePurpose>\n\n {notice ? (\n <div\n role=\"status\"\n className=\"rounded-lg border border-border-subtle bg-status-info-bg-subtle p-4 text-sm text-status-info-text\"\n >\n {notice}\n </div>\n ) : null}\n\n {error && !isServerError(error) ? (\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-4 text-sm text-status-error-text\">\n {error.message}\n </div>\n ) : null}\n\n <div className=\"grid gap-6 xl:grid-cols-[1.05fr,1.95fr]\">\n <section className=\"rounded-lg border border-border-subtle bg-bg-surface p-4\">\n <h2 className=\"mb-4 text-lg font-semibold text-text-primary\">\n {editingAccountId ? 'Edit payout account' : 'Add payout account'}\n </h2>\n <div className=\"space-y-3\">\n <input\n value={accountForm.label}\n onChange={(event) =>\n setAccountForm((current) => ({ ...current, label: event.target.value }))\n }\n placeholder=\"Label\"\n className=\"w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary\"\n />\n <div className=\"grid gap-3 md:grid-cols-2\">\n <select\n value={accountForm.type}\n onChange={(event) =>\n setAccountForm((current) => ({ ...current, type: event.target.value }))\n }\n className=\"rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary\"\n >\n <option value=\"BANK_ACCOUNT\">Bank account</option>\n <option value=\"UPI\">UPI</option>\n <option value=\"WALLET\">Wallet</option>\n </select>\n <select\n value={accountForm.providerPreference}\n onChange={(event) =>\n setAccountForm((current) => ({\n ...current,\n providerPreference: event.target.value,\n }))\n }\n className=\"rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary\"\n >\n <option value=\"AUTO\">Auto</option>\n <option value=\"STRIPE\">Stripe</option>\n <option value=\"RAZORPAY\">Razorpay</option>\n <option value=\"MANUAL\">Manual</option>\n </select>\n </div>\n <div className=\"grid gap-3 md:grid-cols-2\">\n <input\n value={accountForm.country}\n onChange={(event) =>\n setAccountForm((current) => ({\n ...current,\n country: event.target.value.toUpperCase(),\n }))\n }\n placeholder=\"Country\"\n className=\"rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary\"\n />\n <input\n value={accountForm.currency}\n onChange={(event) =>\n setAccountForm((current) => ({\n ...current,\n currency: event.target.value.toUpperCase(),\n }))\n }\n placeholder=\"Currency\"\n className=\"rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary\"\n />\n </div>\n <input\n value={accountForm.accountHolderName}\n onChange={(event) =>\n setAccountForm((current) => ({ ...current, accountHolderName: event.target.value }))\n }\n placeholder=\"Account holder name\"\n className=\"w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary\"\n />\n {accountForm.type === 'BANK_ACCOUNT' ? (\n <>\n <input\n value={accountForm.bankName}\n onChange={(event) =>\n setAccountForm((current) => ({ ...current, bankName: event.target.value }))\n }\n placeholder=\"Bank name\"\n className=\"w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary\"\n />\n <input\n value={accountForm.accountNumber}\n onChange={(event) =>\n setAccountForm((current) => ({ ...current, accountNumber: event.target.value }))\n }\n placeholder=\"Account number\"\n className=\"w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary\"\n />\n <input\n value={\n accountForm.country === 'IN' ? accountForm.ifsc : accountForm.routingNumber\n }\n onChange={(event) =>\n setAccountForm((current) =>\n current.country === 'IN'\n ? { ...current, ifsc: event.target.value }\n : { ...current, routingNumber: event.target.value }\n )\n }\n placeholder={accountForm.country === 'IN' ? 'IFSC' : 'Routing number'}\n className=\"w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary\"\n />\n </>\n ) : accountForm.type === 'UPI' ? (\n <input\n value={accountForm.upiId}\n onChange={(event) =>\n setAccountForm((current) => ({ ...current, upiId: event.target.value }))\n }\n placeholder=\"UPI ID\"\n className=\"w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary\"\n />\n ) : null}\n </div>\n <button\n type=\"button\"\n onClick={() => void handleAddAccount()}\n className=\"mt-4 inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text\"\n >\n <Landmark className=\"size-4\" />\n {editingAccountId ? 'Update payout account' : 'Save payout account'}\n </button>\n {editingAccountId ? (\n <button\n type=\"button\"\n onClick={() => {\n setEditingAccountId(null);\n setAccountForm({\n label: '',\n type: 'BANK_ACCOUNT',\n providerPreference: 'AUTO',\n country: 'US',\n currency: 'USD',\n accountHolderName: '',\n bankName: '',\n accountNumber: '',\n routingNumber: '',\n ifsc: '',\n upiId: '',\n });\n }}\n className=\"mt-4 ml-3 inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary\"\n >\n Cancel edit\n </button>\n ) : null}\n </section>\n\n <section className=\"space-y-4\">\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-4\">\n <div className=\"mb-4 flex items-center justify-between\">\n <h2 className=\"text-lg font-semibold text-text-primary\">Request payout</h2>\n <button\n type=\"button\"\n onClick={() => void loadData()}\n className=\"inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary\"\n >\n <RefreshCw className=\"size-4\" />\n Refresh\n </button>\n </div>\n {accounts.length === 0 && !loading ? (\n <IllustratedEmptyState\n illustration=\"empty-generic\"\n title=\"No payout accounts yet\"\n description=\"Add a payout account before requesting a withdrawal.\"\n />\n ) : (\n <div className=\"space-y-3\">\n <select\n value={selectedAccountId}\n onChange={(event) => setSelectedAccountId(event.target.value)}\n className=\"w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary\"\n >\n {!hasPayableAccount ? (\n <option value=\"\">No verified payout account yet</option>\n ) : null}\n {accounts.map((account) => (\n <option\n key={account.id}\n value={account.id}\n disabled={!isPayoutAccountPayable(account)}\n >\n {account.label} · {account.currency} ·{' '}\n {payoutAccountStatusView(account.status).label}\n </option>\n ))}\n </select>\n {!hasPayableAccount ? (\n <p className=\"text-sm text-text-secondary\">\n Payouts can be requested once one of your payout accounts is verified.\n </p>\n ) : null}\n <label className=\"block space-y-1 text-sm font-medium text-text-primary\">\n <span>Amount</span>\n <input\n value={requestAmount}\n onChange={(event) => setRequestAmount(event.target.value)}\n inputMode=\"decimal\"\n placeholder=\"0.00\"\n className=\"w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm font-normal text-text-primary\"\n />\n </label>\n <button\n type=\"button\"\n onClick={() => void handleRequestPayout()}\n disabled={!selectedAccount || !isPayoutAccountPayable(selectedAccount)}\n className=\"inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text disabled:cursor-not-allowed disabled:opacity-50\"\n >\n <Send className=\"size-4\" />\n Request payout\n </button>\n </div>\n )}\n\n {accounts.length > 0 ? (\n <div className=\"mt-4 space-y-3 rounded-md border border-border-subtle bg-bg-surface/60 p-3\">\n <h3 className=\"text-sm font-semibold text-text-primary\">Saved payout accounts</h3>\n {accounts.map((account) => {\n const statusView = payoutAccountStatusView(account.status);\n return (\n <div\n key={account.id}\n className=\"flex flex-wrap items-center justify-between gap-3 rounded-md border border-border-subtle/70 bg-bg-surface px-3 py-2 text-sm\"\n >\n <div>\n <p className=\"flex flex-wrap items-center gap-2 font-medium text-text-primary\">\n {account.label} {account.isDefault ? '• Default' : ''}\n <span\n className={`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${PAYOUT_ACCOUNT_TONE_CLASSES[statusView.tone]}`}\n >\n {statusView.label}\n </span>\n </p>\n <p className=\"text-text-secondary\">\n {account.providerPreference} · {account.currency}\n </p>\n {statusView.hint ? (\n <p className=\"mt-1 text-xs text-text-secondary\">{statusView.hint}</p>\n ) : null}\n </div>\n <div className=\"flex flex-wrap gap-2\">\n <button\n type=\"button\"\n onClick={() => handleEditAccount(account)}\n className=\"rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary\"\n >\n Edit\n </button>\n {!account.isDefault ? (\n <button\n type=\"button\"\n onClick={() => void handleSetDefault(account.id)}\n className=\"rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary\"\n >\n Make default\n </button>\n ) : null}\n <button\n type=\"button\"\n onClick={() => setArchiveAccountId(account.id)}\n className=\"rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-status-error-text\"\n >\n Archive\n </button>\n </div>\n </div>\n );\n })}\n </div>\n ) : null}\n </div>\n\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-4\">\n <h2 className=\"mb-4 text-lg font-semibold text-text-primary\">Payout requests</h2>\n {requests.length === 0 && !loading ? (\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title=\"No payout requests yet\"\n description=\"Your payout requests and processing updates will appear here.\"\n />\n ) : (\n <ResponsiveTable\n data={requests}\n rowKey={(request) => request.id}\n columns={payoutRequestColumns}\n />\n )}\n </div>\n </section>\n </div>\n\n <AlertDialog\n open={archiveAccountId !== null}\n onOpenChange={(open) => {\n if (!open) setArchiveAccountId(null);\n }}\n >\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>Archive payout account?</AlertDialogTitle>\n <AlertDialogDescription>\n Archive this payout account? You can add a new one at any time.\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>Cancel</AlertDialogCancel>\n <AlertDialogAction\n onClick={() => {\n const id = archiveAccountId;\n setArchiveAccountId(null);\n if (id) void handleArchive(id);\n }}\n >\n Archive\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAwCA,IAAM,IAA+D;CACnE;EACE,KAAK;EACL,QAAQ;EACR,UAAU;EACV,OAAO,MACL,kBAAC,QAAD;GAAM,WAAU;aACb,EAAe,EAAQ,iBAAiB,EAAQ,QAAQ;EACrD,CAAA;CAEV;CACA;EAAE,KAAK;EAAY,QAAQ;EAAY,OAAO,MAAY,EA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f,CACE,kBAAC,MAAD;OAAI,WAAU;iBAA+C;MAAmB,CAAA,GAC/E,EAAS,WAAW,KAAK,CAAC,IACzB,kBAAC,GAAD;OACE,cAAa;OACb,OAAM;OACN,aAAY;MACb,CAAA,IAED,kBAAC,GAAD;OACE,MAAM;OACN,SAAS,MAAY,EAAQ;OAC7B,SAAS;MACV,CAAA,CAEA;OACE;MACN;;GAEL,kBAAC,IAAD;IACE,MAAM,MAAqB;IAC3B,eAAe,MAAS;KACtB,AAAK,KAAM,EAAoB,IAAI;IACrC;cAEA,kBAAC,IAAD,EAAA,UAAA,CACE,kBAAC,IAAD,EAAA,UAAA,CACE,kBAAC,GAAD,EAAA,UAAkB,0BAAyC,CAAA,GAC3D,kBAAC,IAAD,EAAA,UAAwB,kEAEA,CAAA,CACP,EAAA,CAAA,GACnB,kBAAC,IAAD,EAAA,UAAA,CACE,kBAAC,IAAD,EAAA,UAAmB,SAAyB,CAAA,GAC5C,kBAAC,IAAD;KACE,eAAe;MACb,IAAM,IAAK;MAEX,AADA,EAAoB,IAAI,GACpB,KAAI,GAAmB,CAAE;KAC/B;eACD;IAEkB,CAAA,CACF,EAAA,CAAA,CACD,EAAA,CAAA;GACT,CAAA;EACV;;AAET"}
1
+ {"version":3,"file":"PayoutsPage.js","names":["_Fragment","Fragment$1","payoutRequestColumns","formatCurrency","request","formatDateTime","PayoutsPage","permissions","useBillingPermissions","useBillingEventEmitter","useBilling","billingAccountData","useGetDefaultBillingAccountSettingsQuery","billingAccountId","accounts","setAccounts","useState","requests","setRequests","loading","setLoading","error","setError","accountForm","setAccountForm","requestAmount","setRequestAmount","selectedAccountId","setSelectedAccountId","editingAccountId","setEditingAccountId","archiveAccountId","setArchiveAccountId","notice","setNotice","requestContext","useMemo","apiGatewayUrl","authToken","orgId","loadData","useCallback","loadedAccounts","loadedRequests","fetchPayoutAccounts","fetchPayoutRequests","pickPayableAccountId","current","loadError","useEffect","AccessDenied","isServerError","ServerError","handleAddAccount","payload","updatePayoutAccount","emit","created","addPayoutAccount","handleSetDefault","setDefaultPayoutAccount","accountId","handleArchive","archivePayoutAccount","handleEditAccount","account","selectedAccount","hasPayableAccount","isPayoutAccountPayable","handleRequestPayout","requestPayout","PageHeader","PagePurpose","event","Landmark","RefreshCw","IllustratedEmptyState","payoutAccountStatusView","Send","statusView","PAYOUT_ACCOUNT_TONE_CLASSES","ResponsiveTable","AlertDialog","open","AlertDialogContent","AlertDialogHeader","AlertDialogTitle","AlertDialogDescription","AlertDialogFooter","AlertDialogCancel","AlertDialogAction","id"],"sources":["../../../../../src/billing/modules/earnings/pages/PayoutsPage.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useState, type FC } from 'react';\nimport { Landmark, RefreshCw, Send } from 'lucide-react';\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n ResponsiveTable,\n type ResponsiveTableColumn,\n} from '@burdenoff/fe-libs/ui';\n\nimport { useBillingPermissions } from '../../../hooks/useBillingPermissions';\nimport { useBillingEventEmitter } from '../../../hooks/useBillingEventEmitter';\nimport { useBilling } from '../../../providers/BillingProvider';\nimport { AccessDenied, PageHeader, ServerError } from '../../../shared/components';\nimport { PagePurpose, IllustratedEmptyState } from '@burdenoff/fe-libs/ui';\nimport { formatCurrency, formatDateTime, isServerError } from '../../../shared/utils';\nimport { useGetDefaultBillingAccountSettingsQuery } from '../../../../generated/global-operations';\nimport {\n addPayoutAccount,\n archivePayoutAccount,\n fetchPayoutAccounts,\n fetchPayoutRequests,\n requestPayout,\n setDefaultPayoutAccount,\n updatePayoutAccount,\n type PayoutAccount,\n type PayoutRequest,\n} from '../api';\nimport {\n PAYOUT_ACCOUNT_TONE_CLASSES,\n isPayoutAccountPayable,\n payoutAccountStatusView,\n pickPayableAccountId,\n} from '../payoutAccountStatus';\n\nconst payoutRequestColumns: ResponsiveTableColumn<PayoutRequest>[] = [\n {\n key: 'amount',\n header: 'Amount',\n priority: 'primary',\n cell: (request) => (\n <span className=\"tabular-nums\">\n {formatCurrency(request.requestedAmount, request.currency)}\n </span>\n ),\n },\n { key: 'provider', header: 'Provider', cell: (request) => request.provider },\n { key: 'status', header: 'Status', cell: (request) => request.status },\n {\n key: 'account',\n header: 'Account',\n cell: (request) => request.payoutAccount?.label || '-',\n },\n {\n key: 'created',\n header: 'Created',\n cell: (request) => formatDateTime(request.createdAt),\n },\n];\n\nexport const PayoutsPage: FC = () => {\n const permissions = useBillingPermissions();\n const { emit } = useBillingEventEmitter();\n const { apiGatewayUrl, authToken, orgId } = useBilling();\n const { data: billingAccountData } = useGetDefaultBillingAccountSettingsQuery({});\n const billingAccountId = billingAccountData?.getDefaultBillingAccount?.id;\n\n const [accounts, setAccounts] = useState<PayoutAccount[]>([]);\n const [requests, setRequests] = useState<PayoutRequest[]>([]);\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState<Error | null>(null);\n const [accountForm, setAccountForm] = useState({\n label: '',\n type: 'BANK_ACCOUNT',\n providerPreference: 'AUTO',\n country: 'US',\n currency: 'USD',\n accountHolderName: '',\n bankName: '',\n accountNumber: '',\n routingNumber: '',\n ifsc: '',\n upiId: '',\n });\n const [requestAmount, setRequestAmount] = useState('');\n const [selectedAccountId, setSelectedAccountId] = useState<string>('');\n const [editingAccountId, setEditingAccountId] = useState<string | null>(null);\n const [archiveAccountId, setArchiveAccountId] = useState<string | null>(null);\n const [notice, setNotice] = useState<string | null>(null);\n\n const requestContext = useMemo(\n () => ({\n apiGatewayUrl,\n authToken,\n orgId,\n }),\n [apiGatewayUrl, authToken, orgId]\n );\n\n const loadData = useCallback(async () => {\n if (!billingAccountId) return;\n setLoading(true);\n setError(null);\n try {\n const [loadedAccounts, loadedRequests] = await Promise.all([\n fetchPayoutAccounts(billingAccountId, requestContext),\n fetchPayoutRequests(billingAccountId, requestContext),\n ]);\n setAccounts(loadedAccounts);\n setRequests(loadedRequests);\n // Only verified accounts can be paid out to (BOFF-10953).\n setSelectedAccountId((current) => pickPayableAccountId(loadedAccounts, current));\n } catch (loadError) {\n setError(loadError instanceof Error ? loadError : new Error('Failed to load payout data'));\n } finally {\n setLoading(false);\n }\n }, [billingAccountId, requestContext]);\n\n useEffect(() => {\n void loadData();\n }, [loadData]);\n\n if (!permissions.canManagePaymentMethods) {\n return <AccessDenied message=\"You don't have permission to manage payout accounts.\" />;\n }\n\n if (error && isServerError(error)) {\n return (\n <ServerError\n title=\"Payout data unavailable\"\n message={error.message}\n onRetry={() => void loadData()}\n showRetry\n />\n );\n }\n\n const handleAddAccount = async () => {\n if (!billingAccountId) return;\n setNotice(null);\n const payload = {\n billingAccountId,\n ...accountForm,\n };\n\n if (editingAccountId) {\n await updatePayoutAccount(editingAccountId, payload, requestContext);\n emit('billing.payout_account.updated', {\n route: '/billing/payouts',\n entityId: editingAccountId,\n source: 'payouts',\n });\n } else {\n const created = await addPayoutAccount(payload, requestContext);\n emit('billing.payout_account.added', {\n route: '/billing/payouts',\n entityId: billingAccountId,\n source: 'payouts',\n });\n // RazorpayX and Stripe Connect accounts stay pending until processor\n // onboarding verifies them (BOFF-10895); say so instead of implying the\n // account is ready to receive payouts.\n setNotice(\n created.status === 'ACTIVE'\n ? 'Payout account saved and ready to receive payouts.'\n : 'Payout account saved. It stays pending until the payout processor verifies it; you can request payouts to it once it is verified.'\n );\n }\n\n setAccountForm({\n label: '',\n type: 'BANK_ACCOUNT',\n providerPreference: 'AUTO',\n country: 'US',\n currency: 'USD',\n accountHolderName: '',\n bankName: '',\n accountNumber: '',\n routingNumber: '',\n ifsc: '',\n upiId: '',\n });\n setEditingAccountId(null);\n await loadData();\n };\n\n const handleSetDefault = async (accountId: string) => {\n setNotice(null);\n await setDefaultPayoutAccount(accountId, requestContext);\n await loadData();\n };\n\n const handleArchive = async (accountId: string) => {\n setNotice(null);\n await archivePayoutAccount(accountId, requestContext);\n emit('billing.payout_account.archived', {\n route: '/billing/payouts',\n entityId: accountId,\n source: 'payouts',\n });\n await loadData();\n };\n\n const handleEditAccount = (account: PayoutAccount) => {\n setNotice(null);\n setEditingAccountId(account.id);\n setAccountForm((current) => ({\n ...current,\n label: account.label,\n type: account.type,\n providerPreference: account.providerPreference,\n country: account.country || current.country,\n currency: account.currency,\n accountHolderName: account.displayName || current.accountHolderName,\n bankName: '',\n accountNumber: '',\n routingNumber: '',\n ifsc: '',\n upiId: '',\n }));\n };\n\n const selectedAccount = accounts.find((account) => account.id === selectedAccountId);\n const hasPayableAccount = accounts.some(isPayoutAccountPayable);\n\n const handleRequestPayout = async () => {\n if (!billingAccountId || !selectedAccountId || !requestAmount) return;\n if (!selectedAccount || !isPayoutAccountPayable(selectedAccount)) return;\n await requestPayout(\n {\n billingAccountId,\n payoutAccountId: selectedAccountId,\n amount: Number(requestAmount),\n currency: selectedAccount.currency,\n },\n requestContext\n );\n emit('billing.payout.requested', {\n route: '/billing/payouts',\n entityId: selectedAccountId,\n source: 'payouts',\n amount: Number(requestAmount),\n currency: selectedAccount.currency,\n });\n setRequestAmount('');\n await loadData();\n };\n\n return (\n <div className=\"space-y-6 p-6\">\n <PageHeader\n title=\"Payouts\"\n description=\"Register payout accounts, request withdrawals, and track disbursement status.\"\n />\n\n <PagePurpose>\n Get your earnings paid out to a real bank account or UPI. Register where you want to be\n paid, request a withdrawal of your available balance, and track each request from submission\n through to disbursement here.\n </PagePurpose>\n\n {notice ? (\n <div\n role=\"status\"\n className=\"rounded-lg border border-border-subtle bg-status-info-bg-subtle p-4 text-sm text-status-info-text\"\n >\n {notice}\n </div>\n ) : null}\n\n {error && !isServerError(error) ? (\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-4 text-sm text-status-error-text\">\n {error.message}\n </div>\n ) : null}\n\n <div className=\"grid gap-6 xl:grid-cols-[1.05fr,1.95fr]\">\n <section className=\"rounded-lg border border-border-subtle bg-bg-surface p-4\">\n <h2 className=\"mb-4 text-lg font-semibold text-text-primary\">\n {editingAccountId ? 'Edit payout account' : 'Add payout account'}\n </h2>\n <div className=\"space-y-3\">\n <input\n value={accountForm.label}\n onChange={(event) =>\n setAccountForm((current) => ({ ...current, label: event.target.value }))\n }\n placeholder=\"Label\"\n className=\"w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary\"\n />\n <div className=\"grid gap-3 md:grid-cols-2\">\n <select\n value={accountForm.type}\n onChange={(event) =>\n setAccountForm((current) => ({ ...current, type: event.target.value }))\n }\n className=\"rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary\"\n >\n <option value=\"BANK_ACCOUNT\">Bank account</option>\n <option value=\"UPI\">UPI</option>\n <option value=\"WALLET\">Wallet</option>\n </select>\n <select\n value={accountForm.providerPreference}\n onChange={(event) =>\n setAccountForm((current) => ({\n ...current,\n providerPreference: event.target.value,\n }))\n }\n className=\"rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary\"\n >\n <option value=\"AUTO\">Auto</option>\n <option value=\"STRIPE\">Stripe</option>\n <option value=\"RAZORPAY\">Razorpay</option>\n <option value=\"MANUAL\">Manual</option>\n </select>\n </div>\n <div className=\"grid gap-3 md:grid-cols-2\">\n <input\n value={accountForm.country}\n onChange={(event) =>\n setAccountForm((current) => ({\n ...current,\n country: event.target.value.toUpperCase(),\n }))\n }\n placeholder=\"Country\"\n className=\"rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary\"\n />\n <input\n value={accountForm.currency}\n onChange={(event) =>\n setAccountForm((current) => ({\n ...current,\n currency: event.target.value.toUpperCase(),\n }))\n }\n placeholder=\"Currency\"\n className=\"rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary\"\n />\n </div>\n <input\n value={accountForm.accountHolderName}\n onChange={(event) =>\n setAccountForm((current) => ({ ...current, accountHolderName: event.target.value }))\n }\n placeholder=\"Account holder name\"\n className=\"w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary\"\n />\n {accountForm.type === 'BANK_ACCOUNT' ? (\n <>\n <input\n value={accountForm.bankName}\n onChange={(event) =>\n setAccountForm((current) => ({ ...current, bankName: event.target.value }))\n }\n placeholder=\"Bank name\"\n className=\"w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary\"\n />\n <input\n value={accountForm.accountNumber}\n onChange={(event) =>\n setAccountForm((current) => ({ ...current, accountNumber: event.target.value }))\n }\n placeholder=\"Account number\"\n className=\"w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary\"\n />\n <input\n value={\n accountForm.country === 'IN' ? accountForm.ifsc : accountForm.routingNumber\n }\n onChange={(event) =>\n setAccountForm((current) =>\n current.country === 'IN'\n ? { ...current, ifsc: event.target.value }\n : { ...current, routingNumber: event.target.value }\n )\n }\n placeholder={accountForm.country === 'IN' ? 'IFSC' : 'Routing number'}\n className=\"w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary\"\n />\n </>\n ) : accountForm.type === 'UPI' ? (\n <input\n value={accountForm.upiId}\n onChange={(event) =>\n setAccountForm((current) => ({ ...current, upiId: event.target.value }))\n }\n placeholder=\"UPI ID\"\n className=\"w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary\"\n />\n ) : null}\n </div>\n <button\n type=\"button\"\n onClick={() => void handleAddAccount()}\n className=\"mt-4 inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text\"\n >\n <Landmark className=\"size-4\" />\n {editingAccountId ? 'Update payout account' : 'Save payout account'}\n </button>\n {editingAccountId ? (\n <button\n type=\"button\"\n onClick={() => {\n setEditingAccountId(null);\n setAccountForm({\n label: '',\n type: 'BANK_ACCOUNT',\n providerPreference: 'AUTO',\n country: 'US',\n currency: 'USD',\n accountHolderName: '',\n bankName: '',\n accountNumber: '',\n routingNumber: '',\n ifsc: '',\n upiId: '',\n });\n }}\n className=\"mt-4 ml-3 inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary\"\n >\n Cancel edit\n </button>\n ) : null}\n </section>\n\n <section className=\"space-y-4\">\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-4\">\n <div className=\"mb-4 flex items-center justify-between\">\n <h2 className=\"text-lg font-semibold text-text-primary\">Request payout</h2>\n <button\n type=\"button\"\n onClick={() => void loadData()}\n className=\"inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary\"\n >\n <RefreshCw className=\"size-4\" />\n Refresh\n </button>\n </div>\n {accounts.length === 0 && !loading ? (\n <IllustratedEmptyState\n illustration=\"empty-generic\"\n title=\"No payout accounts yet\"\n description=\"Add a payout account before requesting a withdrawal.\"\n />\n ) : (\n <div className=\"space-y-3\">\n <select\n value={selectedAccountId}\n onChange={(event) => setSelectedAccountId(event.target.value)}\n className=\"w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary\"\n >\n {!hasPayableAccount ? (\n <option value=\"\">No verified payout account yet</option>\n ) : null}\n {accounts.map((account) => (\n <option\n key={account.id}\n value={account.id}\n disabled={!isPayoutAccountPayable(account)}\n >\n {account.label} · {account.currency} ·{' '}\n {payoutAccountStatusView(account.status).label}\n </option>\n ))}\n </select>\n {!hasPayableAccount ? (\n <p className=\"text-sm text-text-secondary\">\n Payouts can be requested once one of your payout accounts is verified.\n </p>\n ) : null}\n <label className=\"block space-y-1 text-sm font-medium text-text-primary\">\n <span>Amount</span>\n <input\n value={requestAmount}\n onChange={(event) => setRequestAmount(event.target.value)}\n inputMode=\"decimal\"\n placeholder=\"0.00\"\n className=\"w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm font-normal text-text-primary\"\n />\n </label>\n <button\n type=\"button\"\n onClick={() => void handleRequestPayout()}\n disabled={!selectedAccount || !isPayoutAccountPayable(selectedAccount)}\n className=\"inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text disabled:cursor-not-allowed disabled:opacity-50\"\n >\n <Send className=\"size-4\" />\n Request payout\n </button>\n </div>\n )}\n\n {accounts.length > 0 ? (\n <div className=\"mt-4 space-y-3 rounded-md border border-border-subtle bg-bg-surface/60 p-3\">\n <h3 className=\"text-sm font-semibold text-text-primary\">Saved payout accounts</h3>\n {accounts.map((account) => {\n const statusView = payoutAccountStatusView(account.status);\n return (\n <div\n key={account.id}\n className=\"flex flex-wrap items-center justify-between gap-3 rounded-md border border-border-subtle/70 bg-bg-surface px-3 py-2 text-sm\"\n >\n <div>\n <p className=\"flex flex-wrap items-center gap-2 font-medium text-text-primary\">\n {account.label} {account.isDefault ? '• Default' : ''}\n <span\n className={`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${PAYOUT_ACCOUNT_TONE_CLASSES[statusView.tone]}`}\n >\n {statusView.label}\n </span>\n </p>\n <p className=\"text-text-secondary\">\n {account.providerPreference} · {account.currency}\n </p>\n {statusView.hint ? (\n <p className=\"mt-1 text-xs text-text-secondary\">{statusView.hint}</p>\n ) : null}\n </div>\n <div className=\"flex flex-wrap gap-2\">\n <button\n type=\"button\"\n onClick={() => handleEditAccount(account)}\n className=\"rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary\"\n >\n Edit\n </button>\n {!account.isDefault ? (\n <button\n type=\"button\"\n onClick={() => void handleSetDefault(account.id)}\n className=\"rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary\"\n >\n Make default\n </button>\n ) : null}\n <button\n type=\"button\"\n onClick={() => setArchiveAccountId(account.id)}\n className=\"rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-status-error-text\"\n >\n Archive\n </button>\n </div>\n </div>\n );\n })}\n </div>\n ) : null}\n </div>\n\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-4\">\n <h2 className=\"mb-4 text-lg font-semibold text-text-primary\">Payout requests</h2>\n {requests.length === 0 && !loading ? (\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title=\"No payout requests yet\"\n description=\"Your payout requests and processing updates will appear here.\"\n />\n ) : (\n <ResponsiveTable\n data={requests}\n rowKey={(request) => request.id}\n columns={payoutRequestColumns}\n />\n )}\n </div>\n </section>\n </div>\n\n <AlertDialog\n open={archiveAccountId !== null}\n onOpenChange={(open) => {\n if (!open) setArchiveAccountId(null);\n }}\n >\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>Archive payout account?</AlertDialogTitle>\n <AlertDialogDescription>\n Archive this payout account? You can add a new one at any time.\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>Cancel</AlertDialogCancel>\n <AlertDialogAction\n onClick={() => {\n const id = archiveAccountId;\n setArchiveAccountId(null);\n if (id) void handleArchive(id);\n }}\n >\n Archive\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAwCA,IAAME,IAA+D;CACnE;EACE,KAAK;EACL,QAAQ;EACR,UAAU;EACV,OAAO,MACL,kBAAC,QAAD;GAAM,WAAU;GACb,UAAAC,EAAeC,EAAQ,iBAAiBA,EAAQ,QAAQ;EACrD,CAAA;CAEV;CACA;EAAE,KAAK;EAAY,QAAQ;EAAY,OAAO,MAAYA,EAAQ;CAAS;CAC3E;EAAE,KAAK;EAAU,QAAQ;EAAU,OAAO,MAAYA,EAAQ;CAAO;CACrE;EACE,KAAK;EACL,QAAQ;EACR,OAAO,MAAYA,EAAQ,eAAe,SAAS;CACrD;CACA;EACE,KAAK;EACL,QAAQ;EACR,OAAO,MAAYC,EAAeD,EAAQ,SAAS;CACrD;AACF,GAEaE,UAAwB;CACnC,IAAMC,IAAc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6B,CAAE;KAC/B;KACD,UAAA;IAEkB,CAAA,CACF,EAAA,CAAA,CACD,EAAA,CAAA;GACT,CAAA;EACV;;AAET"}
@@ -25,4 +25,3 @@ export declare function isPayoutAccountPayable(account: Pick<PayoutAccount, 'sta
25
25
  * one, else none.
26
26
  */
27
27
  export declare function pickPayableAccountId(accounts: ReadonlyArray<Pick<PayoutAccount, 'id' | 'status' | 'isDefault'>>, currentId: string): string;
28
- //# sourceMappingURL=payoutAccountStatus.d.ts.map
@@ -1,4 +1,4 @@
1
- //#region src/billing/modules/earnings/payoutAccountStatus.ts
1
+ // src/billing/modules/earnings/payoutAccountStatus.ts
2
2
  function e(e) {
3
3
  switch (e) {
4
4
  case "ACTIVE": return {
@@ -41,7 +41,6 @@ function r(e, t) {
41
41
  let r = e.filter(n);
42
42
  return r.some((e) => e.id === t) ? t : (r.find((e) => e.isDefault) ?? r[0])?.id ?? "";
43
43
  }
44
- //#endregion
45
44
  export { t as PAYOUT_ACCOUNT_TONE_CLASSES, n as isPayoutAccountPayable, e as payoutAccountStatusView, r as pickPayableAccountId };
46
45
 
47
46
  //# sourceMappingURL=payoutAccountStatus.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"payoutAccountStatus.js","names":[],"sources":["../../../../src/billing/modules/earnings/payoutAccountStatus.ts"],"sourcesContent":["import type { PayoutAccount } from './api';\n\n/**\n * How a payout account's status reads on the Payouts page (BOFF-10953).\n *\n * Since BOFF-10895, global-billing-svc keeps RazorpayX and Stripe Connect\n * accounts PENDING_VERIFICATION until processor onboarding (fund-account\n * validation or Stripe Express onboarding) verifies them; only ACTIVE\n * accounts can actually be paid out to. The page shows that state instead of\n * treating every saved account as ready.\n */\nexport type PayoutAccountTone = 'success' | 'warning' | 'error' | 'neutral';\n\nexport interface PayoutAccountStatusView {\n label: string;\n tone: PayoutAccountTone;\n hint: string | null;\n}\n\nexport function payoutAccountStatusView(\n status: PayoutAccount['status'] | string\n): PayoutAccountStatusView {\n switch (status) {\n case 'ACTIVE':\n return { label: 'Verified', tone: 'success', hint: null };\n case 'PENDING_VERIFICATION':\n return {\n label: 'Pending verification',\n tone: 'warning',\n hint: 'The payout processor is verifying this account. You can request payouts to it once it is verified.',\n };\n case 'FAILED_VERIFICATION':\n return {\n label: 'Verification failed',\n tone: 'error',\n hint: 'The payout processor could not verify this account. Check the details, or archive it and add another account.',\n };\n case 'ARCHIVED':\n return { label: 'Archived', tone: 'neutral', hint: null };\n default:\n return { label: status, tone: 'neutral', hint: null };\n }\n}\n\n/** Semantic token classes for each tone (no raw colours). */\nexport const PAYOUT_ACCOUNT_TONE_CLASSES: Record<PayoutAccountTone, string> = {\n success: 'bg-status-success-bg-subtle text-status-success-text',\n warning: 'bg-status-warning-bg-subtle text-status-warning-text',\n error: 'bg-status-error-bg-subtle text-status-error-text',\n neutral: 'bg-bg-sunken text-text-secondary',\n};\n\n/** Only verified (ACTIVE) accounts can receive a payout. */\nexport function isPayoutAccountPayable(account: Pick<PayoutAccount, 'status'>): boolean {\n return account.status === 'ACTIVE';\n}\n\n/**\n * The account a payout request should target: the current selection when it\n * is still payable, else the default payable account, else the first payable\n * one, else none.\n */\nexport function pickPayableAccountId(\n accounts: ReadonlyArray<Pick<PayoutAccount, 'id' | 'status' | 'isDefault'>>,\n currentId: string\n): string {\n const payable = accounts.filter(isPayoutAccountPayable);\n if (payable.some((a) => a.id === currentId)) return currentId;\n return (payable.find((a) => a.isDefault) ?? payable[0])?.id ?? '';\n}\n"],"mappings":";AAmBA,SAAgB,EACd,GACyB;CACzB,QAAQ,GAAR;EACE,KAAK,UACH,OAAO;GAAE,OAAO;GAAY,MAAM;GAAW,MAAM;EAAK;EAC1D,KAAK,wBACH,OAAO;GACL,OAAO;GACP,MAAM;GACN,MAAM;EACR;EACF,KAAK,uBACH,OAAO;GACL,OAAO;GACP,MAAM;GACN,MAAM;EACR;EACF,KAAK,YACH,OAAO;GAAE,OAAO;GAAY,MAAM;GAAW,MAAM;EAAK;EAC1D,SACE,OAAO;GAAE,OAAO;GAAQ,MAAM;GAAW,MAAM;EAAK;CACxD;AACF;AAGA,IAAa,IAAiE;CAC5E,SAAS;CACT,SAAS;CACT,OAAO;CACP,SAAS;AACX;AAGA,SAAgB,EAAuB,GAAiD;CACtF,OAAO,EAAQ,WAAW;AAC5B;AAOA,SAAgB,EACd,GACA,GACQ;CACR,IAAM,IAAU,EAAS,OAAO,CAAsB;CAEtD,OADI,EAAQ,MAAM,MAAM,EAAE,OAAO,CAAS,IAAU,KAC5C,EAAQ,MAAM,MAAM,EAAE,SAAS,KAAK,EAAQ,KAAK,MAAM;AACjE"}
1
+ {"version":3,"file":"payoutAccountStatus.js","names":["payoutAccountStatusView","status","PAYOUT_ACCOUNT_TONE_CLASSES","isPayoutAccountPayable","account","pickPayableAccountId","payable","accounts","a","currentId"],"sources":["../../../../src/billing/modules/earnings/payoutAccountStatus.ts"],"sourcesContent":["import type { PayoutAccount } from './api';\n\n/**\n * How a payout account's status reads on the Payouts page (BOFF-10953).\n *\n * Since BOFF-10895, global-billing-svc keeps RazorpayX and Stripe Connect\n * accounts PENDING_VERIFICATION until processor onboarding (fund-account\n * validation or Stripe Express onboarding) verifies them; only ACTIVE\n * accounts can actually be paid out to. The page shows that state instead of\n * treating every saved account as ready.\n */\nexport type PayoutAccountTone = 'success' | 'warning' | 'error' | 'neutral';\n\nexport interface PayoutAccountStatusView {\n label: string;\n tone: PayoutAccountTone;\n hint: string | null;\n}\n\nexport function payoutAccountStatusView(\n status: PayoutAccount['status'] | string\n): PayoutAccountStatusView {\n switch (status) {\n case 'ACTIVE':\n return { label: 'Verified', tone: 'success', hint: null };\n case 'PENDING_VERIFICATION':\n return {\n label: 'Pending verification',\n tone: 'warning',\n hint: 'The payout processor is verifying this account. You can request payouts to it once it is verified.',\n };\n case 'FAILED_VERIFICATION':\n return {\n label: 'Verification failed',\n tone: 'error',\n hint: 'The payout processor could not verify this account. Check the details, or archive it and add another account.',\n };\n case 'ARCHIVED':\n return { label: 'Archived', tone: 'neutral', hint: null };\n default:\n return { label: status, tone: 'neutral', hint: null };\n }\n}\n\n/** Semantic token classes for each tone (no raw colours). */\nexport const PAYOUT_ACCOUNT_TONE_CLASSES: Record<PayoutAccountTone, string> = {\n success: 'bg-status-success-bg-subtle text-status-success-text',\n warning: 'bg-status-warning-bg-subtle text-status-warning-text',\n error: 'bg-status-error-bg-subtle text-status-error-text',\n neutral: 'bg-bg-sunken text-text-secondary',\n};\n\n/** Only verified (ACTIVE) accounts can receive a payout. */\nexport function isPayoutAccountPayable(account: Pick<PayoutAccount, 'status'>): boolean {\n return account.status === 'ACTIVE';\n}\n\n/**\n * The account a payout request should target: the current selection when it\n * is still payable, else the default payable account, else the first payable\n * one, else none.\n */\nexport function pickPayableAccountId(\n accounts: ReadonlyArray<Pick<PayoutAccount, 'id' | 'status' | 'isDefault'>>,\n currentId: string\n): string {\n const payable = accounts.filter(isPayoutAccountPayable);\n if (payable.some((a) => a.id === currentId)) return currentId;\n return (payable.find((a) => a.isDefault) ?? payable[0])?.id ?? '';\n}\n"],"mappings":";AAmBA,SAAgBA,EACd,GACyB;CACzB,QAAQC,GAAR;EACE,KAAK,UACH,OAAO;GAAE,OAAO;GAAY,MAAM;GAAW,MAAM;EAAK;EAC1D,KAAK,wBACH,OAAO;GACL,OAAO;GACP,MAAM;GACN,MAAM;EACR;EACF,KAAK,uBACH,OAAO;GACL,OAAO;GACP,MAAM;GACN,MAAM;EACR;EACF,KAAK,YACH,OAAO;GAAE,OAAO;GAAY,MAAM;GAAW,MAAM;EAAK;EAC1D,SACE,OAAO;GAAE,OAAOA;GAAQ,MAAM;GAAW,MAAM;EAAK;CACxD;AACF;AAGA,IAAaC,IAAiE;CAC5E,SAAS;CACT,SAAS;CACT,OAAO;CACP,SAAS;AACX;AAGA,SAAgBC,EAAuB,GAAiD;CACtF,OAAOC,EAAQ,WAAW;AAC5B;AAOA,SAAgBC,EACd,GACA,GACQ;CACR,IAAMC,IAAUC,EAAS,OAAOJ,CAAsB;CAEtD,OADIG,EAAQ,MAAM,MAAME,EAAE,OAAOC,CAAS,IAAUA,KAC5CH,EAAQ,MAAM,MAAME,EAAE,SAAS,KAAKF,EAAQ,GAAA,EAAK,MAAM;AACjE"}
@@ -17,4 +17,3 @@ export interface EnterpriseOffer {
17
17
  }
18
18
  export declare function getEnterpriseOffer(productId: string | null | undefined): EnterpriseOffer;
19
19
  export declare function enterpriseMailto(offer: EnterpriseOffer): string;
20
- //# sourceMappingURL=enterprise.d.ts.map
@@ -1,4 +1,4 @@
1
- //#region src/billing/modules/plans/constants/enterprise.ts
1
+ // src/billing/modules/plans/constants/enterprise.ts
2
2
  var e = {
3
3
  highlights: [
4
4
  "Pricing tailored to your organization",
@@ -114,7 +114,6 @@ function r(r) {
114
114
  function i(e) {
115
115
  return `mailto:${e.contactEmail}?subject=Enterprise%20Plan%20Inquiry`;
116
116
  }
117
- //#endregion
118
117
  export { i as enterpriseMailto, r as getEnterpriseOffer };
119
118
 
120
119
  //# sourceMappingURL=enterprise.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"enterprise.js","names":[],"sources":["../../../../../src/billing/modules/plans/constants/enterprise.ts"],"sourcesContent":["/**\n * Enterprise \"Contact Us\" copy for the plans browse page.\n *\n * Enterprise is contact-sales in every product and has no backend plan\n * record, so its card is static. The highlights are product-specific and must\n * match the product website's Enterprise card, so a FluidGrids shell never\n * shows VibeControls wording (and vice versa). Products without curated copy\n * fall back to product-neutral highlights.\n */\n\nexport interface EnterpriseOffer {\n /** Bullet points on the grid card, in display order. */\n highlights: readonly string[];\n /** One-line summary for the compact list row. */\n summary: string;\n /** Sales inbox the Contact Us button opens. */\n contactEmail: string;\n}\n\n/**\n * Fallback for products without curated copy. It deliberately makes no\n * capability claims (no SSO, SLA, residency, dedicated infra, ...): those\n * differ per product, and an unverified claim on a page where customers pay\n * is misleading. It only describes the commercial shape of a sales contract.\n */\nconst DEFAULT_ENTERPRISE_OFFER: EnterpriseOffer = {\n highlights: [\n 'Pricing tailored to your organization',\n 'Volume and multi-year terms',\n 'Contract and invoicing that fit your procurement process',\n 'Talk to our team about your requirements',\n ],\n summary: 'Custom contract · Volume pricing',\n contactEmail: 'contact@burdenoff.com',\n};\n\n/** Keyed by billing product id. Mirrors each product website's Enterprise card. */\nconst ENTERPRISE_OFFERS: Readonly<Record<string, EnterpriseOffer>> = {\n // bigconsole-website src/config/product.ts (tier \"enterprise\")\n bigconsole: {\n highlights: [\n 'Everything in Professional',\n 'Dedicated support',\n 'SLA guarantee',\n 'Unlimited storage',\n 'Advanced security',\n 'Built-in integrations',\n 'SSO & SAML',\n 'Audit logs',\n 'SCIM user provisioning',\n 'Dedicated account manager',\n ],\n summary: 'SSO/SCIM · SLA guarantee · Dedicated account manager',\n contactEmail: 'contact@bigconsole.com',\n },\n // botmanor-website src/config/product.ts (tier \"enterprise\")\n botmanor: {\n highlights: [\n 'Everything in Pro',\n 'Unlimited scale',\n 'Multi-agent orchestration',\n 'SSO & SAML',\n 'Advanced RBAC & audit exports',\n 'Your own MCP servers & LLM endpoints',\n 'Configurable quotas',\n 'Custom SLA & dedicated CSM',\n ],\n summary: 'Multi-agent orchestration · SSO · Custom SLA',\n contactEmail: 'contact@botmanor.com',\n },\n // fluidgrids-website src/config/product.ts (plan key \"enterprise\")\n fluidgrids: {\n highlights: [\n 'Custom workflow and run volumes',\n 'Custom storage and retention',\n 'SSO & SAML',\n 'SCIM provisioning',\n '99.95%+ uptime SLA',\n 'Dedicated support with SLA',\n 'OEM embedding of the builder SDK',\n 'Data residency options',\n ],\n summary: 'Custom volumes · SSO/SCIM · OEM builder SDK',\n contactEmail: 'contact@fluidgrids.com',\n },\n // hookmovies-website src/config/product.ts (tier \"enterprise\")\n hookmovies: {\n highlights: [\n 'Everything in higher consumer tiers',\n 'Studio / channel production-ops',\n 'FAST channels & live events',\n 'Advanced audience & revenue analytics',\n 'Rights & distribution manager',\n 'Multi-seat with org-wide RBAC',\n 'API, embeddable player & webhooks',\n 'SSO & configurable rev-share',\n ],\n summary: 'Studio production-ops · FAST channels · SSO',\n contactEmail: 'contact@hookmovies.com',\n },\n // labsofscience-specs business/pricing/internal/01-tier-plans.md §7.1 (contracted\n // Enterprise tier). Deployment and compliance obligations are separately priced\n // line items there, so they are labelled as add-ons rather than included.\n labsofscience: {\n highlights: [\n 'Contracted per-seat pricing that declines with volume',\n 'Academic and commercial rate cards',\n 'Unlimited experiments, runs, notebook entries and datasets',\n 'Annual contract, minimum $25,000/yr',\n 'Dedicated tenant or self-hosting (priced separately)',\n 'Data residency and customer-managed keys (priced separately)',\n ],\n summary: 'Contracted seats · Academic & commercial rates · Deployment add-ons',\n contactEmail: 'contact@labsofscience.com',\n },\n // subscriberbot-website src/config/product.ts (tier \"enterprise\")\n subscriberbot: {\n highlights: [\n 'Everything in Pro',\n 'Enterprise Control Tower',\n 'License & usage analytics',\n 'Contract Intelligence',\n 'Risk & shadow-IT detection',\n 'SSO, SCIM & advanced RBAC',\n 'Immutable audit log',\n 'Dedicated support & SLA',\n ],\n summary: 'Control Tower · SSO/SCIM · Dedicated support & SLA',\n contactEmail: 'contact@subscriberbot.com',\n },\n // vibecontrols-website src/config/product.ts VC_ENTERPRISE_FEATURES\n vibecontrols: {\n highlights: [\n 'Everything in Pro',\n 'Unlimited agents & seats',\n 'Production SSO/SCIM · SIEM streaming',\n 'Data residency · customer-managed keys',\n 'Dedicated tenant / self-host',\n 'Custom SLA · dedicated support',\n ],\n summary: 'Dedicated tenant · SSO/SCIM · Custom SLA',\n contactEmail: 'contact@vibecontrols.com',\n },\n};\n\n/** Legacy product ids still accepted on input (never emitted). */\nconst PRODUCT_ID_ALIASES: Readonly<Record<string, string>> = {\n botlit: 'botmanor',\n};\n\nexport function getEnterpriseOffer(productId: string | null | undefined): EnterpriseOffer {\n if (!productId) return DEFAULT_ENTERPRISE_OFFER;\n const raw = productId.trim().toLowerCase();\n // Own-property checks so ids such as \"constructor\" never resolve to Object.prototype members.\n const key = Object.hasOwn(PRODUCT_ID_ALIASES, raw) ? PRODUCT_ID_ALIASES[raw] : raw;\n return Object.hasOwn(ENTERPRISE_OFFERS, key) ? ENTERPRISE_OFFERS[key] : DEFAULT_ENTERPRISE_OFFER;\n}\n\nexport function enterpriseMailto(offer: EnterpriseOffer): string {\n return `mailto:${offer.contactEmail}?subject=${encodeURIComponent('Enterprise Plan Inquiry')}`;\n}\n"],"mappings":";AAyBA,IAAM,IAA4C;CAChD,YAAY;EACV;EACA;EACA;EACA;CACF;CACA,SAAS;CACT,cAAc;AAChB,GAGM,IAA+D;CAEnE,YAAY;EACV,YAAY;GACV;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,SAAS;EACT,cAAc;CAChB;CAEA,UAAU;EACR,YAAY;GACV;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,SAAS;EACT,cAAc;CAChB;CAEA,YAAY;EACV,YAAY;GACV;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,SAAS;EACT,cAAc;CAChB;CAEA,YAAY;EACV,YAAY;GACV;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,SAAS;EACT,cAAc;CAChB;CAIA,eAAe;EACb,YAAY;GACV;GACA;GACA;GACA;GACA;GACA;EACF;EACA,SAAS;EACT,cAAc;CAChB;CAEA,eAAe;EACb,YAAY;GACV;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,SAAS;EACT,cAAc;CAChB;CAEA,cAAc;EACZ,YAAY;GACV;GACA;GACA;GACA;GACA;GACA;EACF;EACA,SAAS;EACT,cAAc;CAChB;AACF,GAGM,IAAuD,EAC3D,QAAQ,WACV;AAEA,SAAgB,EAAmB,GAAuD;CACxF,IAAI,CAAC,GAAW,OAAO;CACvB,IAAM,IAAM,EAAU,KAAK,EAAE,YAAY,GAEnC,IAAM,OAAO,OAAO,GAAoB,CAAG,IAAI,EAAmB,KAAO;CAC/E,OAAO,OAAO,OAAO,GAAmB,CAAG,IAAI,EAAkB,KAAO;AAC1E;AAEA,SAAgB,EAAiB,GAAgC;CAC/D,OAAO,UAAU,EAAM,aAAa;AACtC"}
1
+ {"version":3,"file":"enterprise.js","names":["DEFAULT_ENTERPRISE_OFFER","ENTERPRISE_OFFERS","PRODUCT_ID_ALIASES","getEnterpriseOffer","productId","raw","key","enterpriseMailto","offer"],"sources":["../../../../../src/billing/modules/plans/constants/enterprise.ts"],"sourcesContent":["/**\n * Enterprise \"Contact Us\" copy for the plans browse page.\n *\n * Enterprise is contact-sales in every product and has no backend plan\n * record, so its card is static. The highlights are product-specific and must\n * match the product website's Enterprise card, so a FluidGrids shell never\n * shows VibeControls wording (and vice versa). Products without curated copy\n * fall back to product-neutral highlights.\n */\n\nexport interface EnterpriseOffer {\n /** Bullet points on the grid card, in display order. */\n highlights: readonly string[];\n /** One-line summary for the compact list row. */\n summary: string;\n /** Sales inbox the Contact Us button opens. */\n contactEmail: string;\n}\n\n/**\n * Fallback for products without curated copy. It deliberately makes no\n * capability claims (no SSO, SLA, residency, dedicated infra, ...): those\n * differ per product, and an unverified claim on a page where customers pay\n * is misleading. It only describes the commercial shape of a sales contract.\n */\nconst DEFAULT_ENTERPRISE_OFFER: EnterpriseOffer = {\n highlights: [\n 'Pricing tailored to your organization',\n 'Volume and multi-year terms',\n 'Contract and invoicing that fit your procurement process',\n 'Talk to our team about your requirements',\n ],\n summary: 'Custom contract · Volume pricing',\n contactEmail: 'contact@burdenoff.com',\n};\n\n/** Keyed by billing product id. Mirrors each product website's Enterprise card. */\nconst ENTERPRISE_OFFERS: Readonly<Record<string, EnterpriseOffer>> = {\n // bigconsole-website src/config/product.ts (tier \"enterprise\")\n bigconsole: {\n highlights: [\n 'Everything in Professional',\n 'Dedicated support',\n 'SLA guarantee',\n 'Unlimited storage',\n 'Advanced security',\n 'Built-in integrations',\n 'SSO & SAML',\n 'Audit logs',\n 'SCIM user provisioning',\n 'Dedicated account manager',\n ],\n summary: 'SSO/SCIM · SLA guarantee · Dedicated account manager',\n contactEmail: 'contact@bigconsole.com',\n },\n // botmanor-website src/config/product.ts (tier \"enterprise\")\n botmanor: {\n highlights: [\n 'Everything in Pro',\n 'Unlimited scale',\n 'Multi-agent orchestration',\n 'SSO & SAML',\n 'Advanced RBAC & audit exports',\n 'Your own MCP servers & LLM endpoints',\n 'Configurable quotas',\n 'Custom SLA & dedicated CSM',\n ],\n summary: 'Multi-agent orchestration · SSO · Custom SLA',\n contactEmail: 'contact@botmanor.com',\n },\n // fluidgrids-website src/config/product.ts (plan key \"enterprise\")\n fluidgrids: {\n highlights: [\n 'Custom workflow and run volumes',\n 'Custom storage and retention',\n 'SSO & SAML',\n 'SCIM provisioning',\n '99.95%+ uptime SLA',\n 'Dedicated support with SLA',\n 'OEM embedding of the builder SDK',\n 'Data residency options',\n ],\n summary: 'Custom volumes · SSO/SCIM · OEM builder SDK',\n contactEmail: 'contact@fluidgrids.com',\n },\n // hookmovies-website src/config/product.ts (tier \"enterprise\")\n hookmovies: {\n highlights: [\n 'Everything in higher consumer tiers',\n 'Studio / channel production-ops',\n 'FAST channels & live events',\n 'Advanced audience & revenue analytics',\n 'Rights & distribution manager',\n 'Multi-seat with org-wide RBAC',\n 'API, embeddable player & webhooks',\n 'SSO & configurable rev-share',\n ],\n summary: 'Studio production-ops · FAST channels · SSO',\n contactEmail: 'contact@hookmovies.com',\n },\n // labsofscience-specs business/pricing/internal/01-tier-plans.md §7.1 (contracted\n // Enterprise tier). Deployment and compliance obligations are separately priced\n // line items there, so they are labelled as add-ons rather than included.\n labsofscience: {\n highlights: [\n 'Contracted per-seat pricing that declines with volume',\n 'Academic and commercial rate cards',\n 'Unlimited experiments, runs, notebook entries and datasets',\n 'Annual contract, minimum $25,000/yr',\n 'Dedicated tenant or self-hosting (priced separately)',\n 'Data residency and customer-managed keys (priced separately)',\n ],\n summary: 'Contracted seats · Academic & commercial rates · Deployment add-ons',\n contactEmail: 'contact@labsofscience.com',\n },\n // subscriberbot-website src/config/product.ts (tier \"enterprise\")\n subscriberbot: {\n highlights: [\n 'Everything in Pro',\n 'Enterprise Control Tower',\n 'License & usage analytics',\n 'Contract Intelligence',\n 'Risk & shadow-IT detection',\n 'SSO, SCIM & advanced RBAC',\n 'Immutable audit log',\n 'Dedicated support & SLA',\n ],\n summary: 'Control Tower · SSO/SCIM · Dedicated support & SLA',\n contactEmail: 'contact@subscriberbot.com',\n },\n // vibecontrols-website src/config/product.ts VC_ENTERPRISE_FEATURES\n vibecontrols: {\n highlights: [\n 'Everything in Pro',\n 'Unlimited agents & seats',\n 'Production SSO/SCIM · SIEM streaming',\n 'Data residency · customer-managed keys',\n 'Dedicated tenant / self-host',\n 'Custom SLA · dedicated support',\n ],\n summary: 'Dedicated tenant · SSO/SCIM · Custom SLA',\n contactEmail: 'contact@vibecontrols.com',\n },\n};\n\n/** Legacy product ids still accepted on input (never emitted). */\nconst PRODUCT_ID_ALIASES: Readonly<Record<string, string>> = {\n botlit: 'botmanor',\n};\n\nexport function getEnterpriseOffer(productId: string | null | undefined): EnterpriseOffer {\n if (!productId) return DEFAULT_ENTERPRISE_OFFER;\n const raw = productId.trim().toLowerCase();\n // Own-property checks so ids such as \"constructor\" never resolve to Object.prototype members.\n const key = Object.hasOwn(PRODUCT_ID_ALIASES, raw) ? PRODUCT_ID_ALIASES[raw] : raw;\n return Object.hasOwn(ENTERPRISE_OFFERS, key) ? ENTERPRISE_OFFERS[key] : DEFAULT_ENTERPRISE_OFFER;\n}\n\nexport function enterpriseMailto(offer: EnterpriseOffer): string {\n return `mailto:${offer.contactEmail}?subject=${encodeURIComponent('Enterprise Plan Inquiry')}`;\n}\n"],"mappings":";AAyBA,IAAMA,IAA4C;CAChD,YAAY;EACV;EACA;EACA;EACA;CACF;CACA,SAAS;CACT,cAAc;AAChB,GAGMC,IAA+D;CAEnE,YAAY;EACV,YAAY;GACV;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,SAAS;EACT,cAAc;CAChB;CAEA,UAAU;EACR,YAAY;GACV;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,SAAS;EACT,cAAc;CAChB;CAEA,YAAY;EACV,YAAY;GACV;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,SAAS;EACT,cAAc;CAChB;CAEA,YAAY;EACV,YAAY;GACV;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,SAAS;EACT,cAAc;CAChB;CAIA,eAAe;EACb,YAAY;GACV;GACA;GACA;GACA;GACA;GACA;EACF;EACA,SAAS;EACT,cAAc;CAChB;CAEA,eAAe;EACb,YAAY;GACV;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,SAAS;EACT,cAAc;CAChB;CAEA,cAAc;EACZ,YAAY;GACV;GACA;GACA;GACA;GACA;GACA;EACF;EACA,SAAS;EACT,cAAc;CAChB;AACF,GAGMC,IAAuD,EAC3D,QAAQ,WACV;AAEA,SAAgBC,EAAmB,GAAuD;CACxF,IAAI,CAACC,GAAW,OAAOJ;CACvB,IAAMK,IAAMD,EAAU,KAAK,CAAC,CAAC,YAAY,GAEnCE,IAAM,OAAO,OAAOJ,GAAoBG,CAAG,IAAIH,EAAmBG,KAAOA;CAC/E,OAAO,OAAO,OAAOJ,GAAmBK,CAAG,IAAIL,EAAkBK,KAAON;AAC1E;AAEA,SAAgBO,EAAiB,GAAgC;CAC/D,OAAO,UAAUC,EAAM,aAAa;AACtC"}
@@ -7,4 +7,3 @@ export declare const FEATURED_QUOTA_NAMES: readonly ["vibecontrols.agents.count"
7
7
  export declare const FEATURED_QUOTA_LABELS: Record<string, string>;
8
8
  /** Format a featured quota value for display (e.g. hours → minutes, days suffix). */
9
9
  export declare function formatFeaturedQuotaValue(name: string, value: number): string;
10
- //# sourceMappingURL=featuredQuotas.d.ts.map
@@ -1,4 +1,4 @@
1
- //#region src/billing/modules/plans/constants/featuredQuotas.ts
1
+ // src/billing/modules/plans/constants/featuredQuotas.ts
2
2
  var e = [
3
3
  "vibecontrols.agents.count",
4
4
  "vibecontrols.sessions.active",
@@ -31,7 +31,6 @@ var e = [
31
31
  function n(e, t) {
32
32
  return e === "vibecontrols.sandbox.runtime_hours" ? `${(t * 60).toLocaleString()} min` : e === "vibecontrols.audit.retention_days" ? `${t.toLocaleString()} days` : t.toLocaleString();
33
33
  }
34
- //#endregion
35
34
  export { t as FEATURED_QUOTA_LABELS, e as FEATURED_QUOTA_NAMES, n as formatFeaturedQuotaValue };
36
35
 
37
36
  //# sourceMappingURL=featuredQuotas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"featuredQuotas.js","names":[],"sources":["../../../../../src/billing/modules/plans/constants/featuredQuotas.ts"],"sourcesContent":["/**\n * The subset of quotas shown prominently on plan cards.\n * Order here determines display order. All other quotas are shown only on\n * the plan detail page.\n */\nexport const FEATURED_QUOTA_NAMES = [\n 'vibecontrols.agents.count',\n 'vibecontrols.sessions.active',\n 'vibecontrols.vibes.count',\n 'vibecontrols.sandbox.runtime_hours',\n 'vibecontrols.tunnels.custom_domains',\n 'vibecontrols.audit.retention_days',\n 'vibecontrols.actions.count',\n 'vibecontrols.vibedeck.boards',\n 'vibecontrols.scheduler.executions',\n 'vibecontrols.security.vaults',\n 'vibecontrols.catalogs.count',\n 'vibecontrols.docs.compilations',\n 'vibecontrols.organizations.count',\n] as const;\n\nexport const FEATURED_QUOTA_LABELS: Record<string, string> = {\n 'vibecontrols.agents.count': 'Agents',\n 'vibecontrols.sessions.active': 'Concurrent Sessions',\n 'vibecontrols.vibes.count': 'Vibes',\n 'vibecontrols.sandbox.runtime_hours': 'Sandbox Minutes',\n 'vibecontrols.tunnels.custom_domains': 'Custom Domains (VibeTunnels)',\n 'vibecontrols.audit.retention_days': 'Audit Log Retention',\n 'vibecontrols.actions.count': 'Actions',\n 'vibecontrols.vibedeck.boards': 'Vibe Decks',\n 'vibecontrols.scheduler.executions': 'Scheduled Task Executions',\n 'vibecontrols.security.vaults': 'Vaults',\n 'vibecontrols.catalogs.count': 'Catalogs',\n 'vibecontrols.docs.compilations': 'Doc Builds',\n 'vibecontrols.organizations.count': 'Organizations & Workspaces',\n};\n\n/** Format a featured quota value for display (e.g. hours → minutes, days suffix). */\nexport function formatFeaturedQuotaValue(name: string, value: number): string {\n if (name === 'vibecontrols.sandbox.runtime_hours') {\n const minutes = value * 60;\n return `${minutes.toLocaleString()} min`;\n }\n if (name === 'vibecontrols.audit.retention_days') {\n return `${value.toLocaleString()} days`;\n }\n return value.toLocaleString();\n}\n"],"mappings":";AAKA,IAAa,IAAuB;CAClC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,GAEa,IAAgD;CAC3D,6BAA6B;CAC7B,gCAAgC;CAChC,4BAA4B;CAC5B,sCAAsC;CACtC,uCAAuC;CACvC,qCAAqC;CACrC,8BAA8B;CAC9B,gCAAgC;CAChC,qCAAqC;CACrC,gCAAgC;CAChC,+BAA+B;CAC/B,kCAAkC;CAClC,oCAAoC;AACtC;AAGA,SAAgB,EAAyB,GAAc,GAAuB;CAQ5E,OAPI,MAAS,uCAEJ,IADS,IAAQ,IACN,eAAe,EAAE,QAEjC,MAAS,sCACJ,GAAG,EAAM,eAAe,EAAE,SAE5B,EAAM,eAAe;AAC9B"}
1
+ {"version":3,"file":"featuredQuotas.js","names":["FEATURED_QUOTA_NAMES","FEATURED_QUOTA_LABELS","formatFeaturedQuotaValue","name","value"],"sources":["../../../../../src/billing/modules/plans/constants/featuredQuotas.ts"],"sourcesContent":["/**\n * The subset of quotas shown prominently on plan cards.\n * Order here determines display order. All other quotas are shown only on\n * the plan detail page.\n */\nexport const FEATURED_QUOTA_NAMES = [\n 'vibecontrols.agents.count',\n 'vibecontrols.sessions.active',\n 'vibecontrols.vibes.count',\n 'vibecontrols.sandbox.runtime_hours',\n 'vibecontrols.tunnels.custom_domains',\n 'vibecontrols.audit.retention_days',\n 'vibecontrols.actions.count',\n 'vibecontrols.vibedeck.boards',\n 'vibecontrols.scheduler.executions',\n 'vibecontrols.security.vaults',\n 'vibecontrols.catalogs.count',\n 'vibecontrols.docs.compilations',\n 'vibecontrols.organizations.count',\n] as const;\n\nexport const FEATURED_QUOTA_LABELS: Record<string, string> = {\n 'vibecontrols.agents.count': 'Agents',\n 'vibecontrols.sessions.active': 'Concurrent Sessions',\n 'vibecontrols.vibes.count': 'Vibes',\n 'vibecontrols.sandbox.runtime_hours': 'Sandbox Minutes',\n 'vibecontrols.tunnels.custom_domains': 'Custom Domains (VibeTunnels)',\n 'vibecontrols.audit.retention_days': 'Audit Log Retention',\n 'vibecontrols.actions.count': 'Actions',\n 'vibecontrols.vibedeck.boards': 'Vibe Decks',\n 'vibecontrols.scheduler.executions': 'Scheduled Task Executions',\n 'vibecontrols.security.vaults': 'Vaults',\n 'vibecontrols.catalogs.count': 'Catalogs',\n 'vibecontrols.docs.compilations': 'Doc Builds',\n 'vibecontrols.organizations.count': 'Organizations & Workspaces',\n};\n\n/** Format a featured quota value for display (e.g. hours → minutes, days suffix). */\nexport function formatFeaturedQuotaValue(name: string, value: number): string {\n if (name === 'vibecontrols.sandbox.runtime_hours') {\n const minutes = value * 60;\n return `${minutes.toLocaleString()} min`;\n }\n if (name === 'vibecontrols.audit.retention_days') {\n return `${value.toLocaleString()} days`;\n }\n return value.toLocaleString();\n}\n"],"mappings":";AAKA,IAAaA,IAAuB;CAClC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,GAEaC,IAAgD;CAC3D,6BAA6B;CAC7B,gCAAgC;CAChC,4BAA4B;CAC5B,sCAAsC;CACtC,uCAAuC;CACvC,qCAAqC;CACrC,8BAA8B;CAC9B,gCAAgC;CAChC,qCAAqC;CACrC,gCAAgC;CAChC,+BAA+B;CAC/B,kCAAkC;CAClC,oCAAoC;AACtC;AAGA,SAAgBC,EAAyB,GAAc,GAAuB;CAQ5E,OAPIC,MAAS,uCAEJ,IADSC,IAAQ,GAAA,CACN,eAAe,EAAE,QAEjCD,MAAS,sCACJ,GAAGC,EAAM,eAAe,EAAE,SAE5BA,EAAM,eAAe;AAC9B"}
@@ -4,4 +4,3 @@
4
4
  */
5
5
  export { usePlans, usePlan, usePlanMutations } from './usePlans';
6
6
  export { useQuotas, useQuotaMutations } from './useQuotas';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,3 @@
1
- import "./usePlans.js";
2
- import "./useQuotas.js";
1
+ import { usePlan as e, usePlanMutations as t, usePlans as n } from "./usePlans.js";
2
+ import { useQuotas as r } from "./useQuotas.js";
3
+ export { e as usePlan, t as usePlanMutations, n as usePlans, r as useQuotas };
@@ -42,4 +42,3 @@ export declare function usePlan(id: string | undefined): UsePlanResult;
42
42
  */
43
43
  export declare function usePlanMutations(): UsePlanMutationsResult;
44
44
  export {};
45
- //# sourceMappingURL=usePlans.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { GetAllPlansDocument as e, useCreatePlanMutation as t, useGetAllPlansQuery as n, useGetPlanQuery as r, useTogglePlanMutation as i, useUpdatePlanMutation as a } from "../../../../generated/global-operations.js";
2
2
  import { useCallback as o } from "react";
3
3
  import { useApolloClient as s } from "@apollo/client/react";
4
- //#region src/billing/modules/plans/hooks/usePlans.ts
4
+ // src/billing/modules/plans/hooks/usePlans.ts
5
5
  function c(e = {}) {
6
6
  let { onlyActive: t = !1, productId: r, includeFree: i } = e, a = {
7
7
  ...r === void 0 ? {} : { productId: r },
@@ -71,7 +71,6 @@ function u() {
71
71
  isToggling: f
72
72
  };
73
73
  }
74
- //#endregion
75
74
  export { l as usePlan, u as usePlanMutations, c as usePlans };
76
75
 
77
76
  //# sourceMappingURL=usePlans.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePlans.js","names":[],"sources":["../../../../../src/billing/modules/plans/hooks/usePlans.ts"],"sourcesContent":["/**\n * Plans Module - usePlans Hook\n * Provides access to plans data and mutations\n */\n\nimport { useApolloClient } from '@apollo/client/react';\nimport { useCallback } from 'react';\nimport {\n useGetAllPlansQuery,\n useGetPlanQuery,\n useCreatePlanMutation,\n useUpdatePlanMutation,\n useTogglePlanMutation,\n GetAllPlansDocument,\n} from '../../../../generated/global-operations';\nimport type { Plan, CreatePlanInput, UpdatePlanInput } from '../../../shared/types';\n\ninterface UsePlansOptions {\n onlyActive?: boolean;\n /** Filter by product ID — pushed to backend query, not client-side. */\n productId?: string;\n /**\n * When false, free plans (price = 0) are excluded at the backend.\n * Use false on user-facing browse pages; omit or set true for admin pages.\n */\n includeFree?: boolean;\n}\n\ninterface UsePlansResult {\n plans: Plan[];\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n}\n\ninterface UsePlanResult {\n plan: Plan | null;\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n}\n\ninterface UsePlanMutationsResult {\n createPlan: (input: CreatePlanInput) => Promise<boolean>;\n updatePlan: (input: UpdatePlanInput) => Promise<boolean>;\n togglePlan: (planId: string, status: boolean) => Promise<boolean>;\n isCreating: boolean;\n isUpdating: boolean;\n isToggling: boolean;\n}\n\n/**\n * Hook for fetching all plans\n */\nexport function usePlans(options: UsePlansOptions = {}): UsePlansResult {\n const { onlyActive = false, productId, includeFree } = options;\n\n const filter = {\n ...(productId !== undefined ? { productId } : {}),\n ...(includeFree !== undefined ? { includeFree } : {}),\n };\n\n const { data, loading, error, refetch } = useGetAllPlansQuery({\n variables: { filter: Object.keys(filter).length > 0 ? filter : undefined },\n fetchPolicy: 'cache-and-network',\n });\n\n let plans: Plan[] = data?.getAllPlans || [];\n\n if (onlyActive) {\n plans = plans.filter((plan: Plan) => plan.isActive);\n }\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n return {\n plans,\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for fetching a single plan by ID\n */\nexport function usePlan(id: string | undefined): UsePlanResult {\n const { data, loading, error, refetch } = useGetPlanQuery({\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 plan: data?.getPlan || null,\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for plan mutations (create, update, toggle)\n */\nexport function usePlanMutations(): UsePlanMutationsResult {\n const client = useApolloClient();\n\n const [createPlanMutation, { loading: isCreating }] = useCreatePlanMutation();\n const [updatePlanMutation, { loading: isUpdating }] = useUpdatePlanMutation();\n const [togglePlanMutation, { loading: isToggling }] = useTogglePlanMutation();\n\n const createPlan = useCallback(\n async (input: CreatePlanInput): Promise<boolean> => {\n try {\n const { data } = await createPlanMutation({\n variables: {\n input: input as unknown as Parameters<\n typeof createPlanMutation\n >[0]['variables']['input'],\n },\n });\n // Refetch plans list after creation\n await client.refetchQueries({ include: [GetAllPlansDocument] });\n return data?.createPlan ?? false;\n } catch (error) {\n console.error('Failed to create plan:', error);\n throw error;\n }\n },\n [createPlanMutation, client]\n );\n\n const updatePlan = useCallback(\n async (input: UpdatePlanInput): Promise<boolean> => {\n try {\n const { data } = await updatePlanMutation({\n variables: {\n input: input as unknown as Parameters<\n typeof updatePlanMutation\n >[0]['variables']['input'],\n },\n });\n // Refetch plans list after update\n await client.refetchQueries({ include: [GetAllPlansDocument] });\n return data?.updatePlan ?? false;\n } catch (error) {\n console.error('Failed to update plan:', error);\n throw error;\n }\n },\n [updatePlanMutation, client]\n );\n\n const togglePlan = useCallback(\n async (planId: string, status: boolean): Promise<boolean> => {\n try {\n const { data } = await togglePlanMutation({\n variables: { planID: planId, status },\n });\n // Refetch plans list after toggle\n await client.refetchQueries({ include: [GetAllPlansDocument] });\n return data?.togglePlan ?? false;\n } catch (error) {\n console.error('Failed to toggle plan:', error);\n throw error;\n }\n },\n [togglePlanMutation, client]\n );\n\n return {\n createPlan,\n updatePlan,\n togglePlan,\n isCreating,\n isUpdating,\n isToggling,\n };\n}\n"],"mappings":";;;;AAsDA,SAAgB,EAAS,IAA2B,CAAC,GAAmB;CACtE,IAAM,EAAE,gBAAa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GAAO;IAEd,MADA,QAAQ,MAAM,0BAA0B,CAAK,GACvC;GACR;EACF,GACA,CAAC,GAAoB,CAAM,CA0C3B;EACA,YAxCiB,EACjB,OAAO,MAA6C;GAClD,IAAI;IACF,IAAM,EAAE,YAAS,MAAM,EAAmB,EACxC,WAAW,EACF,SAGT,EACF,CAAC;IAGD,OADA,MAAM,EAAO,eAAe,EAAE,SAAS,CAAC,CAAmB,EAAE,CAAC,GACvD,GAAM,cAAc;GAC7B,SAAS,GAAO;IAEd,MADA,QAAQ,MAAM,0BAA0B,CAAK,GACvC;GACR;EACF,GACA,CAAC,GAAoB,CAAM,CAsB3B;EACA,YApBiB,EACjB,OAAO,GAAgB,MAAsC;GAC3D,IAAI;IACF,IAAM,EAAE,YAAS,MAAM,EAAmB,EACxC,WAAW;KAAE,QAAQ;KAAQ;IAAO,EACtC,CAAC;IAGD,OADA,MAAM,EAAO,eAAe,EAAE,SAAS,CAAC,CAAmB,EAAE,CAAC,GACvD,GAAM,cAAc;GAC7B,SAAS,GAAO;IAEd,MADA,QAAQ,MAAM,0BAA0B,CAAK,GACvC;GACR;EACF,GACA,CAAC,GAAoB,CAAM,CAM3B;EACA;EACA;EACA;CACF;AACF"}
1
+ {"version":3,"file":"usePlans.js","names":["usePlans","options","filter","productId","includeFree","useGetAllPlansQuery","plans","data","onlyActive","plan","handleRefetch","useCallback","refetch","loading","usePlan","useGetPlanQuery","id","usePlanMutations","client","useApolloClient","createPlanMutation","isCreating","useCreatePlanMutation","updatePlanMutation","isUpdating","useUpdatePlanMutation","togglePlanMutation","isToggling","useTogglePlanMutation","GetAllPlansDocument","error","planId"],"sources":["../../../../../src/billing/modules/plans/hooks/usePlans.ts"],"sourcesContent":["/**\n * Plans Module - usePlans Hook\n * Provides access to plans data and mutations\n */\n\nimport { useApolloClient } from '@apollo/client/react';\nimport { useCallback } from 'react';\nimport {\n useGetAllPlansQuery,\n useGetPlanQuery,\n useCreatePlanMutation,\n useUpdatePlanMutation,\n useTogglePlanMutation,\n GetAllPlansDocument,\n} from '../../../../generated/global-operations';\nimport type { Plan, CreatePlanInput, UpdatePlanInput } from '../../../shared/types';\n\ninterface UsePlansOptions {\n onlyActive?: boolean;\n /** Filter by product ID — pushed to backend query, not client-side. */\n productId?: string;\n /**\n * When false, free plans (price = 0) are excluded at the backend.\n * Use false on user-facing browse pages; omit or set true for admin pages.\n */\n includeFree?: boolean;\n}\n\ninterface UsePlansResult {\n plans: Plan[];\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n}\n\ninterface UsePlanResult {\n plan: Plan | null;\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n}\n\ninterface UsePlanMutationsResult {\n createPlan: (input: CreatePlanInput) => Promise<boolean>;\n updatePlan: (input: UpdatePlanInput) => Promise<boolean>;\n togglePlan: (planId: string, status: boolean) => Promise<boolean>;\n isCreating: boolean;\n isUpdating: boolean;\n isToggling: boolean;\n}\n\n/**\n * Hook for fetching all plans\n */\nexport function usePlans(options: UsePlansOptions = {}): UsePlansResult {\n const { onlyActive = false, productId, includeFree } = options;\n\n const filter = {\n ...(productId !== undefined ? { productId } : {}),\n ...(includeFree !== undefined ? { includeFree } : {}),\n };\n\n const { data, loading, error, refetch } = useGetAllPlansQuery({\n variables: { filter: Object.keys(filter).length > 0 ? filter : undefined },\n fetchPolicy: 'cache-and-network',\n });\n\n let plans: Plan[] = data?.getAllPlans || [];\n\n if (onlyActive) {\n plans = plans.filter((plan: Plan) => plan.isActive);\n }\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n return {\n plans,\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for fetching a single plan by ID\n */\nexport function usePlan(id: string | undefined): UsePlanResult {\n const { data, loading, error, refetch } = useGetPlanQuery({\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 plan: data?.getPlan || null,\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for plan mutations (create, update, toggle)\n */\nexport function usePlanMutations(): UsePlanMutationsResult {\n const client = useApolloClient();\n\n const [createPlanMutation, { loading: isCreating }] = useCreatePlanMutation();\n const [updatePlanMutation, { loading: isUpdating }] = useUpdatePlanMutation();\n const [togglePlanMutation, { loading: isToggling }] = useTogglePlanMutation();\n\n const createPlan = useCallback(\n async (input: CreatePlanInput): Promise<boolean> => {\n try {\n const { data } = await createPlanMutation({\n variables: {\n input: input as unknown as Parameters<\n typeof createPlanMutation\n >[0]['variables']['input'],\n },\n });\n // Refetch plans list after creation\n await client.refetchQueries({ include: [GetAllPlansDocument] });\n return data?.createPlan ?? false;\n } catch (error) {\n console.error('Failed to create plan:', error);\n throw error;\n }\n },\n [createPlanMutation, client]\n );\n\n const updatePlan = useCallback(\n async (input: UpdatePlanInput): Promise<boolean> => {\n try {\n const { data } = await updatePlanMutation({\n variables: {\n input: input as unknown as Parameters<\n typeof updatePlanMutation\n >[0]['variables']['input'],\n },\n });\n // Refetch plans list after update\n await client.refetchQueries({ include: [GetAllPlansDocument] });\n return data?.updatePlan ?? false;\n } catch (error) {\n console.error('Failed to update plan:', error);\n throw error;\n }\n },\n [updatePlanMutation, client]\n );\n\n const togglePlan = useCallback(\n async (planId: string, status: boolean): Promise<boolean> => {\n try {\n const { data } = await togglePlanMutation({\n variables: { planID: planId, status },\n });\n // Refetch plans list after toggle\n await client.refetchQueries({ include: [GetAllPlansDocument] });\n return data?.togglePlan ?? false;\n } catch (error) {\n console.error('Failed to toggle plan:', error);\n throw error;\n }\n },\n [togglePlanMutation, client]\n );\n\n return {\n createPlan,\n updatePlan,\n togglePlan,\n isCreating,\n isUpdating,\n isToggling,\n };\n}\n"],"mappings":";;;;AAsDA,SAAgBA,EAAS,IAA2B,CAAC,GAAmB;CACtE,IAAM,EAAE,gBAAa,IAAO,cAAW,mBAAg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GAAM,cAAc;GAC7B,SAASuB,GAAO;IAEd,MADA,QAAQ,MAAM,0BAA0BA,CAAK,GACvCA;GACR;EACF,GACA,CAACV,GAAoBF,CAAM,CA0C3B;EACA,YAxCiBP,EACjB,OAAO,MAA6C;GAClD,IAAI;IACF,IAAM,EAAE,YAAS,MAAMY,EAAmB,EACxC,WAAW,EACF,SAGT,EACF,CAAC;IAGD,OADA,MAAML,EAAO,eAAe,EAAE,SAAS,CAACW,CAAmB,EAAE,CAAC,GACvDtB,GAAM,cAAc;GAC7B,SAASuB,GAAO;IAEd,MADA,QAAQ,MAAM,0BAA0BA,CAAK,GACvCA;GACR;EACF,GACA,CAACP,GAAoBL,CAAM,CAsB3B;EACA,YApBiBP,EACjB,OAAO,GAAgB,MAAsC;GAC3D,IAAI;IACF,IAAM,EAAE,YAAS,MAAMe,EAAmB,EACxC,WAAW;KAAE,QAAQK;KAAQ;IAAO,EACtC,CAAC;IAGD,OADA,MAAMb,EAAO,eAAe,EAAE,SAAS,CAACW,CAAmB,EAAE,CAAC,GACvDtB,GAAM,cAAc;GAC7B,SAASuB,GAAO;IAEd,MADA,QAAQ,MAAM,0BAA0BA,CAAK,GACvCA;GACR;EACF,GACA,CAACJ,GAAoBR,CAAM,CAM3B;EACA;EACA;EACA;CACF;AACF"}
@@ -23,4 +23,3 @@ export declare function useQuotas(options?: UseQuotasOptions): UseQuotasResult;
23
23
  */
24
24
  export declare function useQuotaMutations(): UseQuotaMutationsResult;
25
25
  export {};
26
- //# sourceMappingURL=useQuotas.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { useGetAllQuotasQuery as e } from "../../../../generated/global-operations.js";
2
2
  import { useCallback as t } from "react";
3
3
  import "@apollo/client/react";
4
- //#region src/billing/modules/plans/hooks/useQuotas.ts
4
+ // src/billing/modules/plans/hooks/useQuotas.ts
5
5
  function n(n = {}) {
6
6
  let { onlyActive: r = !1 } = n, { data: i, loading: a, error: o, refetch: s } = e({ fetchPolicy: "cache-and-network" }), c = i?.getAllQuotas || [];
7
7
  r && (c = c.filter((e) => e.isActive));
@@ -15,7 +15,6 @@ function n(n = {}) {
15
15
  refetch: l
16
16
  };
17
17
  }
18
- //#endregion
19
18
  export { n as useQuotas };
20
19
 
21
20
  //# sourceMappingURL=useQuotas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useQuotas.js","names":[],"sources":["../../../../../src/billing/modules/plans/hooks/useQuotas.ts"],"sourcesContent":["/**\n * Plans Module - useQuotas Hook\n * Provides access to quotas data and mutations\n */\n\nimport { useApolloClient } from '@apollo/client/react';\nimport { useCallback } from 'react';\nimport {\n useGetAllQuotasQuery,\n useCreateQuotaMutation,\n useUpdateQuotaMutation,\n GetAllQuotasDocument,\n} from '../../../../generated/global-operations';\nimport type { Quota, CreateQuotaInput, UpdateQuotaInput } from '../../../shared/types';\n\ninterface UseQuotasOptions {\n onlyActive?: boolean;\n}\n\ninterface UseQuotasResult {\n quotas: Quota[];\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n}\n\ninterface UseQuotaMutationsResult {\n createQuota: (input: CreateQuotaInput) => Promise<boolean>;\n updateQuota: (input: UpdateQuotaInput) => Promise<boolean>;\n isCreating: boolean;\n isUpdating: boolean;\n}\n\n/**\n * Hook for fetching all quotas\n */\nexport function useQuotas(options: UseQuotasOptions = {}): UseQuotasResult {\n const { onlyActive = false } = options;\n\n const { data, loading, error, refetch } = useGetAllQuotasQuery({\n fetchPolicy: 'cache-and-network',\n });\n\n let quotas: Quota[] = data?.getAllQuotas || [];\n\n // Filter by active status if requested\n if (onlyActive) {\n quotas = quotas.filter((quota: Quota) => quota.isActive);\n }\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n return {\n quotas,\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for quota mutations (create, update)\n */\nexport function useQuotaMutations(): UseQuotaMutationsResult {\n const client = useApolloClient();\n\n const [createQuotaMutation, { loading: isCreating }] = useCreateQuotaMutation();\n const [updateQuotaMutation, { loading: isUpdating }] = useUpdateQuotaMutation();\n\n const createQuota = useCallback(\n async (input: CreateQuotaInput): Promise<boolean> => {\n try {\n const { data } = await createQuotaMutation({\n variables: { input },\n });\n // Refetch quotas list after creation\n await client.refetchQueries({ include: [GetAllQuotasDocument] });\n return data?.createQuota ?? false;\n } catch (error) {\n console.error('Failed to create quota:', error);\n throw error;\n }\n },\n [createQuotaMutation, client]\n );\n\n const updateQuota = useCallback(\n async (input: UpdateQuotaInput): Promise<boolean> => {\n try {\n const { data } = await updateQuotaMutation({\n variables: { input },\n });\n // Refetch quotas list after update\n await client.refetchQueries({ include: [GetAllQuotasDocument] });\n return data?.updateQuota ?? false;\n } catch (error) {\n console.error('Failed to update quota:', error);\n throw error;\n }\n },\n [updateQuotaMutation, client]\n );\n\n return {\n createQuota,\n updateQuota,\n isCreating,\n isUpdating,\n };\n}\n"],"mappings":";;;;AAoCA,SAAgB,EAAU,IAA4B,CAAC,GAAoB;CACzE,IAAM,EAAE,gBAAa,OAAU,GAEzB,EAAE,SAAM,YAAS,UAAO,eAAY,EAAqB,EAC7D,aAAa,oBACf,CAAC,GAEG,IAAkB,GAAM,gBAAgB,CAAC;CAG7C,AAAI,MACF,IAAS,EAAO,QAAQ,MAAiB,EAAM,QAAQ;CAGzD,IAAM,IAAgB,EAAY,YAAY;EAC5C,MAAM,EAAQ;CAChB,GAAG,CAAC,CAAO,CAAC;CAEZ,OAAO;EACL;EACA,WAAW;EACJ;EACP,SAAS;CACX;AACF"}
1
+ {"version":3,"file":"useQuotas.js","names":["useQuotas","options","useGetAllQuotasQuery","quotas","data","onlyActive","quota","handleRefetch","useCallback","refetch","loading"],"sources":["../../../../../src/billing/modules/plans/hooks/useQuotas.ts"],"sourcesContent":["/**\n * Plans Module - useQuotas Hook\n * Provides access to quotas data and mutations\n */\n\nimport { useApolloClient } from '@apollo/client/react';\nimport { useCallback } from 'react';\nimport {\n useGetAllQuotasQuery,\n useCreateQuotaMutation,\n useUpdateQuotaMutation,\n GetAllQuotasDocument,\n} from '../../../../generated/global-operations';\nimport type { Quota, CreateQuotaInput, UpdateQuotaInput } from '../../../shared/types';\n\ninterface UseQuotasOptions {\n onlyActive?: boolean;\n}\n\ninterface UseQuotasResult {\n quotas: Quota[];\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n}\n\ninterface UseQuotaMutationsResult {\n createQuota: (input: CreateQuotaInput) => Promise<boolean>;\n updateQuota: (input: UpdateQuotaInput) => Promise<boolean>;\n isCreating: boolean;\n isUpdating: boolean;\n}\n\n/**\n * Hook for fetching all quotas\n */\nexport function useQuotas(options: UseQuotasOptions = {}): UseQuotasResult {\n const { onlyActive = false } = options;\n\n const { data, loading, error, refetch } = useGetAllQuotasQuery({\n fetchPolicy: 'cache-and-network',\n });\n\n let quotas: Quota[] = data?.getAllQuotas || [];\n\n // Filter by active status if requested\n if (onlyActive) {\n quotas = quotas.filter((quota: Quota) => quota.isActive);\n }\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n return {\n quotas,\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for quota mutations (create, update)\n */\nexport function useQuotaMutations(): UseQuotaMutationsResult {\n const client = useApolloClient();\n\n const [createQuotaMutation, { loading: isCreating }] = useCreateQuotaMutation();\n const [updateQuotaMutation, { loading: isUpdating }] = useUpdateQuotaMutation();\n\n const createQuota = useCallback(\n async (input: CreateQuotaInput): Promise<boolean> => {\n try {\n const { data } = await createQuotaMutation({\n variables: { input },\n });\n // Refetch quotas list after creation\n await client.refetchQueries({ include: [GetAllQuotasDocument] });\n return data?.createQuota ?? false;\n } catch (error) {\n console.error('Failed to create quota:', error);\n throw error;\n }\n },\n [createQuotaMutation, client]\n );\n\n const updateQuota = useCallback(\n async (input: UpdateQuotaInput): Promise<boolean> => {\n try {\n const { data } = await updateQuotaMutation({\n variables: { input },\n });\n // Refetch quotas list after update\n await client.refetchQueries({ include: [GetAllQuotasDocument] });\n return data?.updateQuota ?? false;\n } catch (error) {\n console.error('Failed to update quota:', error);\n throw error;\n }\n },\n [updateQuotaMutation, client]\n );\n\n return {\n createQuota,\n updateQuota,\n isCreating,\n isUpdating,\n };\n}\n"],"mappings":";;;;AAoCA,SAAgBA,EAAU,IAA4B,CAAC,GAAoB;CACzE,IAAM,EAAE,gBAAa,OAAUC,GAEzB,EAAE,SAAM,YAAS,UAAO,eAAYC,EAAqB,EAC7D,aAAa,oBACf,CAAC,GAEGC,IAAkBC,GAAM,gBAAgB,CAAC;CAG7C,AAAIC,MACF,IAASF,EAAO,QAAQ,MAAiBG,EAAM,QAAQ;CAGzD,IAAMC,IAAgBC,EAAY,YAAY;EAC5C,MAAMC,EAAQ;CAChB,GAAG,CAACA,CAAO,CAAC;CAEZ,OAAO;EACL;EACA,WAAWC;EACJ;EACP,SAASH;CACX;AACF"}
@@ -4,4 +4,3 @@
4
4
  */
5
5
  export * from './pages';
6
6
  export * from './hooks';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1,12 +1,12 @@
1
- import "./hooks/usePlans.js";
2
- import "./hooks/useQuotas.js";
3
- import "./hooks/index.js";
4
- import { PlansListPage as e } from "./pages/PlansListPage.js";
5
- import { PlanDetailPage as t } from "./pages/PlanDetailPage.js";
6
- import { PlanEditPage as n } from "./pages/PlanEditPage.js";
7
- import { PlanCreatePage as r } from "./pages/PlanCreatePage.js";
8
- import { PlansBrowsePage as i } from "./pages/PlansBrowsePage.js";
9
- import { PlanBrowseDetailPage as a } from "./pages/PlanBrowseDetailPage.js";
10
- import { PlanAssignFreePage as o } from "./pages/PlanAssignFreePage.js";
1
+ import { usePlan as e, usePlanMutations as t, usePlans as n } from "./hooks/usePlans.js";
2
+ import { useQuotas as r } from "./hooks/useQuotas.js";
11
3
  import "./pages/index.js";
12
- export { o as PlanAssignFreePage, a as PlanBrowseDetailPage, r as PlanCreatePage, t as PlanDetailPage, n as PlanEditPage, i as PlansBrowsePage, e as PlansListPage };
4
+ import { PlansListPage as i } from "./pages/PlansListPage.js";
5
+ import { PlanDetailPage as a } from "./pages/PlanDetailPage.js";
6
+ import { PlanEditPage as o } from "./pages/PlanEditPage.js";
7
+ import { PlanCreatePage as s } from "./pages/PlanCreatePage.js";
8
+ import { PlansBrowsePage as c } from "./pages/PlansBrowsePage.js";
9
+ import { PlanBrowseDetailPage as l } from "./pages/PlanBrowseDetailPage.js";
10
+ import { PlanAssignFreePage as u } from "./pages/PlanAssignFreePage.js";
11
+ import "./hooks/index.js";
12
+ export { u as PlanAssignFreePage, l as PlanBrowseDetailPage, s as PlanCreatePage, a as PlanDetailPage, o as PlanEditPage, c as PlansBrowsePage, i as PlansListPage, e as usePlan, t as usePlanMutations, n as usePlans, r as useQuotas };
@@ -1,3 +1,2 @@
1
1
  import { FC } from 'react';
2
2
  export declare const PlanAssignFreePage: FC;
3
- //# sourceMappingURL=PlanAssignFreePage.d.ts.map
@@ -1,9 +1,9 @@
1
1
  import { AccessDenied as e } from "../../../shared/components/AccessDenied.js";
2
2
  import { PageHeader as t } from "../../../shared/components/PageHeader.js";
3
+ import { useAssignPlanFreeMutation as n } from "../../../../generated/global-operations.js";
4
+ import { useBillingNavigate as r } from "../../../hooks/useBillingNavigate.js";
5
+ import { useBillingPermissions as i } from "../../../hooks/useBillingPermissions.js";
3
6
  import "../../../shared/components/index.js";
4
- import { useBillingPermissions as n } from "../../../hooks/useBillingPermissions.js";
5
- import { useAssignPlanFreeMutation as r } from "../../../../generated/global-operations.js";
6
- import { useBillingNavigate as i } from "../../../hooks/useBillingNavigate.js";
7
7
  import { usePlans as a } from "../hooks/usePlans.js";
8
8
  import "../hooks/index.js";
9
9
  import { filterPlans as o } from "../utils/planSelector.js";
@@ -12,22 +12,19 @@ import { Check as l, ChevronsUpDown as u } from "lucide-react";
12
12
  import { jsx as d, jsxs as f } from "react/jsx-runtime";
13
13
  import { useI18n as p } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
14
14
  import { Command as m, CommandEmpty as h, CommandInput as g, CommandItem as _, CommandList as v, PagePurpose as y, Popover as b, PopoverContent as x, PopoverTrigger as S } from "@burdenoff/fe-libs/ui";
15
- //#region src/billing/modules/plans/pages/PlanAssignFreePage.tsx
15
+ // src/billing/modules/plans/pages/PlanAssignFreePage.tsx
16
16
  var C = () => {
17
17
  let { t: C } = p(), w = (e, t) => {
18
18
  let n = C(e);
19
19
  return n === e ? t : n;
20
- }, T = i(), E = n(), [D, O] = c(""), [k, A] = c(""), [j, M] = c(""), [N, P] = c(!1), [F, I] = c(""), [L, R] = c(""), [z, B] = c(null), { plans: V, isLoading: H } = a({ includeFree: !0 }), U = s(() => o(V, F), [V, F]), [W, { loading: G }] = r();
20
+ }, T = r(), E = i(), [D, O] = c(""), [k, A] = c(""), [j, M] = c(""), [N, P] = c(!1), [F, I] = c(""), [L, R] = c(""), [z, B] = c(null), { plans: V, isLoading: H } = a({ includeFree: !0 }), U = s(() => o(V, F), [V, F]), [W, { loading: G }] = n();
21
21
  if (!E.canManagePlans) return /* @__PURE__ */ d(e, { message: w("billing.assignFree.noPermission", "You don't have permission to access this page.") });
22
22
  let K = async (e) => {
23
- if (e.preventDefault(), B(null), !D.trim() || !k.trim() || !j) {
24
- B({
25
- success: !1,
26
- message: "All fields are required."
27
- });
28
- return;
29
- }
30
- try {
23
+ if (e.preventDefault(), B(null), !D.trim() || !k.trim() || !j) B({
24
+ success: !1,
25
+ message: "All fields are required."
26
+ });
27
+ else try {
31
28
  let { data: e } = await W({ variables: {
32
29
  secret: D.trim(),
33
30
  billingAccountId: k.trim(),
@@ -42,9 +39,10 @@ var C = () => {
42
39
  }), O(""), A(""), M(""), P(!1), I(""), R("");
43
40
  }
44
41
  } catch (e) {
42
+ let t = e instanceof Error ? e.message : "Failed to assign plan.";
45
43
  B({
46
44
  success: !1,
47
- message: e instanceof Error ? e.message : "Failed to assign plan."
45
+ message: t
48
46
  });
49
47
  }
50
48
  }, q = V.find((e) => e.id === j), J = (e) => {
@@ -265,7 +263,6 @@ var C = () => {
265
263
  ]
266
264
  });
267
265
  };
268
- //#endregion
269
266
  export { C as PlanAssignFreePage };
270
267
 
271
268
  //# sourceMappingURL=PlanAssignFreePage.js.map