@burdenoff/microfe-billing 2026.510.114

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (636) hide show
  1. package/README.md +12 -0
  2. package/dist/billing/BillingAdminRoutes.d.ts +6 -0
  3. package/dist/billing/BillingAdminRoutes.d.ts.map +1 -0
  4. package/dist/billing/BillingAdminRoutes.js +359 -0
  5. package/dist/billing/BillingAdminRoutes.js.map +1 -0
  6. package/dist/billing/BillingRoot.d.ts +37 -0
  7. package/dist/billing/BillingRoot.d.ts.map +1 -0
  8. package/dist/billing/BillingRoot.js +190 -0
  9. package/dist/billing/BillingRoot.js.map +1 -0
  10. package/dist/billing/BillingUserRoutes.d.ts +7 -0
  11. package/dist/billing/BillingUserRoutes.d.ts.map +1 -0
  12. package/dist/billing/BillingUserRoutes.js +479 -0
  13. package/dist/billing/BillingUserRoutes.js.map +1 -0
  14. package/dist/billing/constants/permissions.d.ts +18 -0
  15. package/dist/billing/constants/permissions.d.ts.map +1 -0
  16. package/dist/billing/hooks/useBillingAccountSelection.d.ts +36 -0
  17. package/dist/billing/hooks/useBillingAccountSelection.d.ts.map +1 -0
  18. package/dist/billing/hooks/useBillingAccountSelection.js +81 -0
  19. package/dist/billing/hooks/useBillingAccountSelection.js.map +1 -0
  20. package/dist/billing/hooks/useBillingEventEmitter.d.ts +8 -0
  21. package/dist/billing/hooks/useBillingEventEmitter.d.ts.map +1 -0
  22. package/dist/billing/hooks/useBillingEventEmitter.js +15 -0
  23. package/dist/billing/hooks/useBillingEventEmitter.js.map +1 -0
  24. package/dist/billing/hooks/useBillingNavigate.d.ts +30 -0
  25. package/dist/billing/hooks/useBillingNavigate.d.ts.map +1 -0
  26. package/dist/billing/hooks/useBillingNavigate.js +23 -0
  27. package/dist/billing/hooks/useBillingNavigate.js.map +1 -0
  28. package/dist/billing/hooks/useBillingPermissions.d.ts +94 -0
  29. package/dist/billing/hooks/useBillingPermissions.d.ts.map +1 -0
  30. package/dist/billing/hooks/useBillingPermissions.js +78 -0
  31. package/dist/billing/hooks/useBillingPermissions.js.map +1 -0
  32. package/dist/billing/hooks/useDefaultBillingCurrency.d.ts +14 -0
  33. package/dist/billing/hooks/useDefaultBillingCurrency.d.ts.map +1 -0
  34. package/dist/billing/hooks/useDefaultBillingCurrency.js +23 -0
  35. package/dist/billing/hooks/useDefaultBillingCurrency.js.map +1 -0
  36. package/dist/billing/index.d.ts +31 -0
  37. package/dist/billing/index.d.ts.map +1 -0
  38. package/dist/billing/lib/native-purchases.d.ts +51 -0
  39. package/dist/billing/lib/native-purchases.d.ts.map +1 -0
  40. package/dist/billing/lib/native-purchases.js +44 -0
  41. package/dist/billing/lib/native-purchases.js.map +1 -0
  42. package/dist/billing/modules/addons/components/FloatingCartDrawer.d.ts +4 -0
  43. package/dist/billing/modules/addons/components/FloatingCartDrawer.d.ts.map +1 -0
  44. package/dist/billing/modules/addons/components/FloatingCartDrawer.js +179 -0
  45. package/dist/billing/modules/addons/components/FloatingCartDrawer.js.map +1 -0
  46. package/dist/billing/modules/addons/components/index.d.ts +5 -0
  47. package/dist/billing/modules/addons/components/index.d.ts.map +1 -0
  48. package/dist/billing/modules/addons/hooks/index.d.ts +6 -0
  49. package/dist/billing/modules/addons/hooks/index.d.ts.map +1 -0
  50. package/dist/billing/modules/addons/hooks/index.js +1 -0
  51. package/dist/billing/modules/addons/hooks/useAddons.d.ts +55 -0
  52. package/dist/billing/modules/addons/hooks/useAddons.d.ts.map +1 -0
  53. package/dist/billing/modules/addons/hooks/useAddons.js +77 -0
  54. package/dist/billing/modules/addons/hooks/useAddons.js.map +1 -0
  55. package/dist/billing/modules/addons/index.d.ts +7 -0
  56. package/dist/billing/modules/addons/index.d.ts.map +1 -0
  57. package/dist/billing/modules/addons/index.js +10 -0
  58. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.d.ts +4 -0
  59. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.d.ts.map +1 -0
  60. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js +266 -0
  61. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js.map +1 -0
  62. package/dist/billing/modules/addons/pages/AddonCreatePage.d.ts +4 -0
  63. package/dist/billing/modules/addons/pages/AddonCreatePage.d.ts.map +1 -0
  64. package/dist/billing/modules/addons/pages/AddonCreatePage.js +369 -0
  65. package/dist/billing/modules/addons/pages/AddonCreatePage.js.map +1 -0
  66. package/dist/billing/modules/addons/pages/AddonDetailPage.d.ts +4 -0
  67. package/dist/billing/modules/addons/pages/AddonDetailPage.d.ts.map +1 -0
  68. package/dist/billing/modules/addons/pages/AddonDetailPage.js +280 -0
  69. package/dist/billing/modules/addons/pages/AddonDetailPage.js.map +1 -0
  70. package/dist/billing/modules/addons/pages/AddonEditPage.d.ts +4 -0
  71. package/dist/billing/modules/addons/pages/AddonEditPage.d.ts.map +1 -0
  72. package/dist/billing/modules/addons/pages/AddonEditPage.js +396 -0
  73. package/dist/billing/modules/addons/pages/AddonEditPage.js.map +1 -0
  74. package/dist/billing/modules/addons/pages/AddonsBrowsePage.d.ts +4 -0
  75. package/dist/billing/modules/addons/pages/AddonsBrowsePage.d.ts.map +1 -0
  76. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +582 -0
  77. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js.map +1 -0
  78. package/dist/billing/modules/addons/pages/AddonsListPage.d.ts +4 -0
  79. package/dist/billing/modules/addons/pages/AddonsListPage.d.ts.map +1 -0
  80. package/dist/billing/modules/addons/pages/AddonsListPage.js +744 -0
  81. package/dist/billing/modules/addons/pages/AddonsListPage.js.map +1 -0
  82. package/dist/billing/modules/addons/pages/index.d.ts +11 -0
  83. package/dist/billing/modules/addons/pages/index.d.ts.map +1 -0
  84. package/dist/billing/modules/addons/pages/index.js +6 -0
  85. package/dist/billing/modules/addons/store/addonCartStore.d.ts +38 -0
  86. package/dist/billing/modules/addons/store/addonCartStore.d.ts.map +1 -0
  87. package/dist/billing/modules/addons/store/addonCartStore.js +74 -0
  88. package/dist/billing/modules/addons/store/addonCartStore.js.map +1 -0
  89. package/dist/billing/modules/affiliate/api.d.ts +101 -0
  90. package/dist/billing/modules/affiliate/api.d.ts.map +1 -0
  91. package/dist/billing/modules/affiliate/api.js +38 -0
  92. package/dist/billing/modules/affiliate/api.js.map +1 -0
  93. package/dist/billing/modules/affiliate/index.d.ts +2 -0
  94. package/dist/billing/modules/affiliate/index.d.ts.map +1 -0
  95. package/dist/billing/modules/affiliate/index.js +2 -0
  96. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.d.ts +4 -0
  97. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.d.ts.map +1 -0
  98. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +464 -0
  99. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -0
  100. package/dist/billing/modules/analytics/index.d.ts +5 -0
  101. package/dist/billing/modules/analytics/index.d.ts.map +1 -0
  102. package/dist/billing/modules/analytics/index.js +3 -0
  103. package/dist/billing/modules/analytics/pages/AnalyticsPage.d.ts +4 -0
  104. package/dist/billing/modules/analytics/pages/AnalyticsPage.d.ts.map +1 -0
  105. package/dist/billing/modules/analytics/pages/AnalyticsPage.js +469 -0
  106. package/dist/billing/modules/analytics/pages/AnalyticsPage.js.map +1 -0
  107. package/dist/billing/modules/analytics/pages/index.d.ts +5 -0
  108. package/dist/billing/modules/analytics/pages/index.d.ts.map +1 -0
  109. package/dist/billing/modules/analytics/pages/index.js +1 -0
  110. package/dist/billing/modules/billing/hooks/index.d.ts +10 -0
  111. package/dist/billing/modules/billing/hooks/index.d.ts.map +1 -0
  112. package/dist/billing/modules/billing/hooks/index.js +4 -0
  113. package/dist/billing/modules/billing/hooks/useInvoices.d.ts +67 -0
  114. package/dist/billing/modules/billing/hooks/useInvoices.d.ts.map +1 -0
  115. package/dist/billing/modules/billing/hooks/useInvoices.js +87 -0
  116. package/dist/billing/modules/billing/hooks/useInvoices.js.map +1 -0
  117. package/dist/billing/modules/billing/hooks/usePayments.d.ts +62 -0
  118. package/dist/billing/modules/billing/hooks/usePayments.d.ts.map +1 -0
  119. package/dist/billing/modules/billing/hooks/usePayments.js +3 -0
  120. package/dist/billing/modules/billing/hooks/useRefunds.d.ts +191 -0
  121. package/dist/billing/modules/billing/hooks/useRefunds.d.ts.map +1 -0
  122. package/dist/billing/modules/billing/hooks/useRefunds.js +162 -0
  123. package/dist/billing/modules/billing/hooks/useRefunds.js.map +1 -0
  124. package/dist/billing/modules/billing/hooks/useTransactions.d.ts +41 -0
  125. package/dist/billing/modules/billing/hooks/useTransactions.d.ts.map +1 -0
  126. package/dist/billing/modules/billing/hooks/useTransactions.js +55 -0
  127. package/dist/billing/modules/billing/hooks/useTransactions.js.map +1 -0
  128. package/dist/billing/modules/billing/index.d.ts +7 -0
  129. package/dist/billing/modules/billing/index.d.ts.map +1 -0
  130. package/dist/billing/modules/billing/index.js +11 -0
  131. package/dist/billing/modules/billing/pages/InvoiceDetailPage.d.ts +4 -0
  132. package/dist/billing/modules/billing/pages/InvoiceDetailPage.d.ts.map +1 -0
  133. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +631 -0
  134. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -0
  135. package/dist/billing/modules/billing/pages/InvoicesListPage.d.ts +4 -0
  136. package/dist/billing/modules/billing/pages/InvoicesListPage.d.ts.map +1 -0
  137. package/dist/billing/modules/billing/pages/InvoicesListPage.js +382 -0
  138. package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -0
  139. package/dist/billing/modules/billing/pages/PaymentMethodsPage.d.ts +4 -0
  140. package/dist/billing/modules/billing/pages/PaymentMethodsPage.d.ts.map +1 -0
  141. package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +147 -0
  142. package/dist/billing/modules/billing/pages/PaymentMethodsPage.js.map +1 -0
  143. package/dist/billing/modules/billing/pages/RefundsPage.d.ts +4 -0
  144. package/dist/billing/modules/billing/pages/RefundsPage.d.ts.map +1 -0
  145. package/dist/billing/modules/billing/pages/RefundsPage.js +1074 -0
  146. package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -0
  147. package/dist/billing/modules/billing/pages/TransactionsPage.d.ts +4 -0
  148. package/dist/billing/modules/billing/pages/TransactionsPage.d.ts.map +1 -0
  149. package/dist/billing/modules/billing/pages/TransactionsPage.js +587 -0
  150. package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -0
  151. package/dist/billing/modules/billing/pages/index.d.ts +10 -0
  152. package/dist/billing/modules/billing/pages/index.d.ts.map +1 -0
  153. package/dist/billing/modules/billing/pages/index.js +5 -0
  154. package/dist/billing/modules/checkout/components/AutoPayToggle.d.ts +14 -0
  155. package/dist/billing/modules/checkout/components/AutoPayToggle.d.ts.map +1 -0
  156. package/dist/billing/modules/checkout/components/AutoPayToggle.js +3 -0
  157. package/dist/billing/modules/checkout/components/BillingAccountSelector.d.ts +14 -0
  158. package/dist/billing/modules/checkout/components/BillingAccountSelector.d.ts.map +1 -0
  159. package/dist/billing/modules/checkout/components/BillingAccountSelector.js +151 -0
  160. package/dist/billing/modules/checkout/components/BillingAccountSelector.js.map +1 -0
  161. package/dist/billing/modules/checkout/components/CompactAutoPayToggle.d.ts +14 -0
  162. package/dist/billing/modules/checkout/components/CompactAutoPayToggle.d.ts.map +1 -0
  163. package/dist/billing/modules/checkout/components/CompactAutoPayToggle.js +4 -0
  164. package/dist/billing/modules/checkout/components/CreditsAmountInput.d.ts +14 -0
  165. package/dist/billing/modules/checkout/components/CreditsAmountInput.d.ts.map +1 -0
  166. package/dist/billing/modules/checkout/components/CreditsAmountInput.js +130 -0
  167. package/dist/billing/modules/checkout/components/CreditsAmountInput.js.map +1 -0
  168. package/dist/billing/modules/checkout/components/CreditsPaymentOption.d.ts +16 -0
  169. package/dist/billing/modules/checkout/components/CreditsPaymentOption.d.ts.map +1 -0
  170. package/dist/billing/modules/checkout/components/CreditsPaymentOption.js +5 -0
  171. package/dist/billing/modules/checkout/components/CurrencySelector.d.ts +19 -0
  172. package/dist/billing/modules/checkout/components/CurrencySelector.d.ts.map +1 -0
  173. package/dist/billing/modules/checkout/components/CurrencySelector.js +5 -0
  174. package/dist/billing/modules/checkout/components/NativeCheckoutView.d.ts +14 -0
  175. package/dist/billing/modules/checkout/components/NativeCheckoutView.d.ts.map +1 -0
  176. package/dist/billing/modules/checkout/components/NativeCheckoutView.js +273 -0
  177. package/dist/billing/modules/checkout/components/NativeCheckoutView.js.map +1 -0
  178. package/dist/billing/modules/checkout/components/OrderSummary.d.ts +22 -0
  179. package/dist/billing/modules/checkout/components/OrderSummary.d.ts.map +1 -0
  180. package/dist/billing/modules/checkout/components/OrderSummary.js +293 -0
  181. package/dist/billing/modules/checkout/components/OrderSummary.js.map +1 -0
  182. package/dist/billing/modules/checkout/components/PaymentProviderSelector.d.ts +19 -0
  183. package/dist/billing/modules/checkout/components/PaymentProviderSelector.d.ts.map +1 -0
  184. package/dist/billing/modules/checkout/components/PaymentProviderSelector.js +3 -0
  185. package/dist/billing/modules/checkout/components/PromoCodeInput.d.ts +19 -0
  186. package/dist/billing/modules/checkout/components/PromoCodeInput.d.ts.map +1 -0
  187. package/dist/billing/modules/checkout/components/PromoCodeInput.js +102 -0
  188. package/dist/billing/modules/checkout/components/PromoCodeInput.js.map +1 -0
  189. package/dist/billing/modules/checkout/components/RazorpayPaymentButton.d.ts +25 -0
  190. package/dist/billing/modules/checkout/components/RazorpayPaymentButton.d.ts.map +1 -0
  191. package/dist/billing/modules/checkout/components/RazorpayPaymentButton.js +169 -0
  192. package/dist/billing/modules/checkout/components/RazorpayPaymentButton.js.map +1 -0
  193. package/dist/billing/modules/checkout/components/SavedCardSelector.d.ts +13 -0
  194. package/dist/billing/modules/checkout/components/SavedCardSelector.d.ts.map +1 -0
  195. package/dist/billing/modules/checkout/components/SavedCardSelector.js +4 -0
  196. package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.d.ts +13 -0
  197. package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.d.ts.map +1 -0
  198. package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.js +78 -0
  199. package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.js.map +1 -0
  200. package/dist/billing/modules/checkout/components/StripePaymentForm.d.ts +16 -0
  201. package/dist/billing/modules/checkout/components/StripePaymentForm.d.ts.map +1 -0
  202. package/dist/billing/modules/checkout/components/StripePaymentForm.js +253 -0
  203. package/dist/billing/modules/checkout/components/StripePaymentForm.js.map +1 -0
  204. package/dist/billing/modules/checkout/components/SubscriptionSelector.d.ts +26 -0
  205. package/dist/billing/modules/checkout/components/SubscriptionSelector.d.ts.map +1 -0
  206. package/dist/billing/modules/checkout/components/SubscriptionSelector.js +84 -0
  207. package/dist/billing/modules/checkout/components/SubscriptionSelector.js.map +1 -0
  208. package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.d.ts +23 -0
  209. package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.d.ts.map +1 -0
  210. package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.js +229 -0
  211. package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.js.map +1 -0
  212. package/dist/billing/modules/checkout/components/index.d.ts +20 -0
  213. package/dist/billing/modules/checkout/components/index.d.ts.map +1 -0
  214. package/dist/billing/modules/checkout/components/index.js +16 -0
  215. package/dist/billing/modules/checkout/graphql/index.d.ts +6 -0
  216. package/dist/billing/modules/checkout/graphql/index.d.ts.map +1 -0
  217. package/dist/billing/modules/checkout/hooks/index.d.ts +9 -0
  218. package/dist/billing/modules/checkout/hooks/index.d.ts.map +1 -0
  219. package/dist/billing/modules/checkout/hooks/index.js +4 -0
  220. package/dist/billing/modules/checkout/hooks/useCheckout.d.ts +69 -0
  221. package/dist/billing/modules/checkout/hooks/useCheckout.d.ts.map +1 -0
  222. package/dist/billing/modules/checkout/hooks/useCheckout.js +377 -0
  223. package/dist/billing/modules/checkout/hooks/useCheckout.js.map +1 -0
  224. package/dist/billing/modules/checkout/hooks/useNativeCheckout.d.ts +26 -0
  225. package/dist/billing/modules/checkout/hooks/useNativeCheckout.d.ts.map +1 -0
  226. package/dist/billing/modules/checkout/hooks/useNativeCheckout.js +88 -0
  227. package/dist/billing/modules/checkout/hooks/useNativeCheckout.js.map +1 -0
  228. package/dist/billing/modules/checkout/hooks/usePaymentProviders.d.ts +19 -0
  229. package/dist/billing/modules/checkout/hooks/usePaymentProviders.d.ts.map +1 -0
  230. package/dist/billing/modules/checkout/hooks/usePaymentProviders.js +16 -0
  231. package/dist/billing/modules/checkout/hooks/usePaymentProviders.js.map +1 -0
  232. package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.d.ts +59 -0
  233. package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.d.ts.map +1 -0
  234. package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.js +107 -0
  235. package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.js.map +1 -0
  236. package/dist/billing/modules/checkout/index.d.ts +24 -0
  237. package/dist/billing/modules/checkout/index.d.ts.map +1 -0
  238. package/dist/billing/modules/checkout/index.js +19 -0
  239. package/dist/billing/modules/checkout/pages/CheckoutPage.d.ts +4 -0
  240. package/dist/billing/modules/checkout/pages/CheckoutPage.d.ts.map +1 -0
  241. package/dist/billing/modules/checkout/pages/CheckoutPage.js +1248 -0
  242. package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -0
  243. package/dist/billing/modules/checkout/pages/index.d.ts +5 -0
  244. package/dist/billing/modules/checkout/pages/index.d.ts.map +1 -0
  245. package/dist/billing/modules/checkout/pages/index.js +1 -0
  246. package/dist/billing/modules/checkout/types/index.d.ts +270 -0
  247. package/dist/billing/modules/checkout/types/index.d.ts.map +1 -0
  248. package/dist/billing/modules/checkout/utils/storeOrder.d.ts +20 -0
  249. package/dist/billing/modules/checkout/utils/storeOrder.d.ts.map +1 -0
  250. package/dist/billing/modules/checkout/utils/storeOrder.js +27 -0
  251. package/dist/billing/modules/checkout/utils/storeOrder.js.map +1 -0
  252. package/dist/billing/modules/coupons/index.d.ts +5 -0
  253. package/dist/billing/modules/coupons/index.d.ts.map +1 -0
  254. package/dist/billing/modules/coupons/index.js +6 -0
  255. package/dist/billing/modules/coupons/pages/CouponDetailPage.d.ts +4 -0
  256. package/dist/billing/modules/coupons/pages/CouponDetailPage.d.ts.map +1 -0
  257. package/dist/billing/modules/coupons/pages/CouponDetailPage.js +489 -0
  258. package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -0
  259. package/dist/billing/modules/coupons/pages/CouponsListPage.d.ts +4 -0
  260. package/dist/billing/modules/coupons/pages/CouponsListPage.d.ts.map +1 -0
  261. package/dist/billing/modules/coupons/pages/CouponsListPage.js +544 -0
  262. package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -0
  263. package/dist/billing/modules/coupons/pages/CreateCouponPage.d.ts +4 -0
  264. package/dist/billing/modules/coupons/pages/CreateCouponPage.d.ts.map +1 -0
  265. package/dist/billing/modules/coupons/pages/CreateCouponPage.js +421 -0
  266. package/dist/billing/modules/coupons/pages/CreateCouponPage.js.map +1 -0
  267. package/dist/billing/modules/coupons/pages/EditCouponPage.d.ts +4 -0
  268. package/dist/billing/modules/coupons/pages/EditCouponPage.d.ts.map +1 -0
  269. package/dist/billing/modules/coupons/pages/EditCouponPage.js +379 -0
  270. package/dist/billing/modules/coupons/pages/EditCouponPage.js.map +1 -0
  271. package/dist/billing/modules/coupons/pages/index.d.ts +8 -0
  272. package/dist/billing/modules/coupons/pages/index.d.ts.map +1 -0
  273. package/dist/billing/modules/coupons/pages/index.js +4 -0
  274. package/dist/billing/modules/credits/hooks/index.d.ts +5 -0
  275. package/dist/billing/modules/credits/hooks/index.d.ts.map +1 -0
  276. package/dist/billing/modules/credits/hooks/index.js +1 -0
  277. package/dist/billing/modules/credits/hooks/useCredits.d.ts +75 -0
  278. package/dist/billing/modules/credits/hooks/useCredits.d.ts.map +1 -0
  279. package/dist/billing/modules/credits/hooks/useCredits.js +78 -0
  280. package/dist/billing/modules/credits/hooks/useCredits.js.map +1 -0
  281. package/dist/billing/modules/credits/index.d.ts +6 -0
  282. package/dist/billing/modules/credits/index.d.ts.map +1 -0
  283. package/dist/billing/modules/credits/index.js +8 -0
  284. package/dist/billing/modules/credits/pages/AdminCreditsPage.d.ts +4 -0
  285. package/dist/billing/modules/credits/pages/AdminCreditsPage.d.ts.map +1 -0
  286. package/dist/billing/modules/credits/pages/AdminCreditsPage.js +140 -0
  287. package/dist/billing/modules/credits/pages/AdminCreditsPage.js.map +1 -0
  288. package/dist/billing/modules/credits/pages/CreditTransactionsPage.d.ts +4 -0
  289. package/dist/billing/modules/credits/pages/CreditTransactionsPage.d.ts.map +1 -0
  290. package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +331 -0
  291. package/dist/billing/modules/credits/pages/CreditTransactionsPage.js.map +1 -0
  292. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.d.ts +4 -0
  293. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.d.ts.map +1 -0
  294. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +770 -0
  295. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js.map +1 -0
  296. package/dist/billing/modules/credits/pages/CreditsPage.d.ts +4 -0
  297. package/dist/billing/modules/credits/pages/CreditsPage.d.ts.map +1 -0
  298. package/dist/billing/modules/credits/pages/CreditsPage.js +324 -0
  299. package/dist/billing/modules/credits/pages/CreditsPage.js.map +1 -0
  300. package/dist/billing/modules/credits/pages/index.d.ts +8 -0
  301. package/dist/billing/modules/credits/pages/index.d.ts.map +1 -0
  302. package/dist/billing/modules/credits/pages/index.js +4 -0
  303. package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.d.ts +14 -0
  304. package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.d.ts.map +1 -0
  305. package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js +185 -0
  306. package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js.map +1 -0
  307. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.d.ts +111 -0
  308. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.d.ts.map +1 -0
  309. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js +388 -0
  310. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js.map +1 -0
  311. package/dist/billing/modules/dashboard/components/BillingAccountCard.d.ts +16 -0
  312. package/dist/billing/modules/dashboard/components/BillingAccountCard.d.ts.map +1 -0
  313. package/dist/billing/modules/dashboard/components/BillingAccountCard.js +146 -0
  314. package/dist/billing/modules/dashboard/components/BillingAccountCard.js.map +1 -0
  315. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.d.ts +13 -0
  316. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.d.ts.map +1 -0
  317. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js +1044 -0
  318. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js.map +1 -0
  319. package/dist/billing/modules/dashboard/components/PaymentMethodsSection.d.ts +15 -0
  320. package/dist/billing/modules/dashboard/components/PaymentMethodsSection.d.ts.map +1 -0
  321. package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js +216 -0
  322. package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js.map +1 -0
  323. package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.d.ts +27 -0
  324. package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.d.ts.map +1 -0
  325. package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js +193 -0
  326. package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js.map +1 -0
  327. package/dist/billing/modules/dashboard/components/index.d.ts +10 -0
  328. package/dist/billing/modules/dashboard/components/index.d.ts.map +1 -0
  329. package/dist/billing/modules/dashboard/components/index.js +6 -0
  330. package/dist/billing/modules/dashboard/hooks/index.d.ts +6 -0
  331. package/dist/billing/modules/dashboard/hooks/index.d.ts.map +1 -0
  332. package/dist/billing/modules/dashboard/hooks/index.js +2 -0
  333. package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.d.ts +17 -0
  334. package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.d.ts.map +1 -0
  335. package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.js +42 -0
  336. package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.js.map +1 -0
  337. package/dist/billing/modules/dashboard/hooks/useDashboard.d.ts +145 -0
  338. package/dist/billing/modules/dashboard/hooks/useDashboard.d.ts.map +1 -0
  339. package/dist/billing/modules/dashboard/hooks/useDashboard.js +118 -0
  340. package/dist/billing/modules/dashboard/hooks/useDashboard.js.map +1 -0
  341. package/dist/billing/modules/dashboard/index.d.ts +8 -0
  342. package/dist/billing/modules/dashboard/index.d.ts.map +1 -0
  343. package/dist/billing/modules/dashboard/index.js +12 -0
  344. package/dist/billing/modules/dashboard/pages/OverviewPage.d.ts +4 -0
  345. package/dist/billing/modules/dashboard/pages/OverviewPage.d.ts.map +1 -0
  346. package/dist/billing/modules/dashboard/pages/OverviewPage.js +478 -0
  347. package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -0
  348. package/dist/billing/modules/dashboard/pages/index.d.ts +5 -0
  349. package/dist/billing/modules/dashboard/pages/index.d.ts.map +1 -0
  350. package/dist/billing/modules/dashboard/pages/index.js +1 -0
  351. package/dist/billing/modules/discounts/index.d.ts +6 -0
  352. package/dist/billing/modules/discounts/index.d.ts.map +1 -0
  353. package/dist/billing/modules/discounts/index.js +3 -0
  354. package/dist/billing/modules/discounts/pages/DiscountsListPage.d.ts +4 -0
  355. package/dist/billing/modules/discounts/pages/DiscountsListPage.d.ts.map +1 -0
  356. package/dist/billing/modules/discounts/pages/DiscountsListPage.js +1009 -0
  357. package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -0
  358. package/dist/billing/modules/discounts/pages/index.d.ts +6 -0
  359. package/dist/billing/modules/discounts/pages/index.d.ts.map +1 -0
  360. package/dist/billing/modules/discounts/pages/index.js +1 -0
  361. package/dist/billing/modules/earnings/api.d.ts +131 -0
  362. package/dist/billing/modules/earnings/api.d.ts.map +1 -0
  363. package/dist/billing/modules/earnings/api.js +122 -0
  364. package/dist/billing/modules/earnings/api.js.map +1 -0
  365. package/dist/billing/modules/earnings/index.d.ts +4 -0
  366. package/dist/billing/modules/earnings/index.d.ts.map +1 -0
  367. package/dist/billing/modules/earnings/index.js +4 -0
  368. package/dist/billing/modules/earnings/pages/EarningsPage.d.ts +4 -0
  369. package/dist/billing/modules/earnings/pages/EarningsPage.d.ts.map +1 -0
  370. package/dist/billing/modules/earnings/pages/EarningsPage.js +435 -0
  371. package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -0
  372. package/dist/billing/modules/earnings/pages/PayoutAdminPage.d.ts +4 -0
  373. package/dist/billing/modules/earnings/pages/PayoutAdminPage.d.ts.map +1 -0
  374. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +273 -0
  375. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -0
  376. package/dist/billing/modules/earnings/pages/PayoutsPage.d.ts +4 -0
  377. package/dist/billing/modules/earnings/pages/PayoutsPage.d.ts.map +1 -0
  378. package/dist/billing/modules/earnings/pages/PayoutsPage.js +480 -0
  379. package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -0
  380. package/dist/billing/modules/plans/hooks/index.d.ts +7 -0
  381. package/dist/billing/modules/plans/hooks/index.d.ts.map +1 -0
  382. package/dist/billing/modules/plans/hooks/index.js +2 -0
  383. package/dist/billing/modules/plans/hooks/usePlans.d.ts +46 -0
  384. package/dist/billing/modules/plans/hooks/usePlans.d.ts.map +1 -0
  385. package/dist/billing/modules/plans/hooks/usePlans.js +77 -0
  386. package/dist/billing/modules/plans/hooks/usePlans.js.map +1 -0
  387. package/dist/billing/modules/plans/hooks/useQuotas.d.ts +27 -0
  388. package/dist/billing/modules/plans/hooks/useQuotas.d.ts.map +1 -0
  389. package/dist/billing/modules/plans/hooks/useQuotas.js +21 -0
  390. package/dist/billing/modules/plans/hooks/useQuotas.js.map +1 -0
  391. package/dist/billing/modules/plans/index.d.ts +7 -0
  392. package/dist/billing/modules/plans/index.d.ts.map +1 -0
  393. package/dist/billing/modules/plans/index.js +11 -0
  394. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.d.ts +4 -0
  395. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.d.ts.map +1 -0
  396. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +264 -0
  397. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js.map +1 -0
  398. package/dist/billing/modules/plans/pages/PlanCreatePage.d.ts +4 -0
  399. package/dist/billing/modules/plans/pages/PlanCreatePage.d.ts.map +1 -0
  400. package/dist/billing/modules/plans/pages/PlanCreatePage.js +368 -0
  401. package/dist/billing/modules/plans/pages/PlanCreatePage.js.map +1 -0
  402. package/dist/billing/modules/plans/pages/PlanDetailPage.d.ts +4 -0
  403. package/dist/billing/modules/plans/pages/PlanDetailPage.d.ts.map +1 -0
  404. package/dist/billing/modules/plans/pages/PlanDetailPage.js +356 -0
  405. package/dist/billing/modules/plans/pages/PlanDetailPage.js.map +1 -0
  406. package/dist/billing/modules/plans/pages/PlanEditPage.d.ts +4 -0
  407. package/dist/billing/modules/plans/pages/PlanEditPage.d.ts.map +1 -0
  408. package/dist/billing/modules/plans/pages/PlanEditPage.js +395 -0
  409. package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -0
  410. package/dist/billing/modules/plans/pages/PlansBrowsePage.d.ts +4 -0
  411. package/dist/billing/modules/plans/pages/PlansBrowsePage.d.ts.map +1 -0
  412. package/dist/billing/modules/plans/pages/PlansBrowsePage.js +314 -0
  413. package/dist/billing/modules/plans/pages/PlansBrowsePage.js.map +1 -0
  414. package/dist/billing/modules/plans/pages/PlansListPage.d.ts +4 -0
  415. package/dist/billing/modules/plans/pages/PlansListPage.d.ts.map +1 -0
  416. package/dist/billing/modules/plans/pages/PlansListPage.js +438 -0
  417. package/dist/billing/modules/plans/pages/PlansListPage.js.map +1 -0
  418. package/dist/billing/modules/plans/pages/index.d.ts +11 -0
  419. package/dist/billing/modules/plans/pages/index.d.ts.map +1 -0
  420. package/dist/billing/modules/plans/pages/index.js +6 -0
  421. package/dist/billing/modules/quota/hooks/index.d.ts +6 -0
  422. package/dist/billing/modules/quota/hooks/index.d.ts.map +1 -0
  423. package/dist/billing/modules/quota/hooks/index.js +2 -0
  424. package/dist/billing/modules/quota/hooks/useQuota.d.ts +102 -0
  425. package/dist/billing/modules/quota/hooks/useQuota.d.ts.map +1 -0
  426. package/dist/billing/modules/quota/hooks/useQuota.js +63 -0
  427. package/dist/billing/modules/quota/hooks/useQuota.js.map +1 -0
  428. package/dist/billing/modules/quota/hooks/useQuotaTemplates.d.ts +39 -0
  429. package/dist/billing/modules/quota/hooks/useQuotaTemplates.d.ts.map +1 -0
  430. package/dist/billing/modules/quota/hooks/useQuotaTemplates.js +67 -0
  431. package/dist/billing/modules/quota/hooks/useQuotaTemplates.js.map +1 -0
  432. package/dist/billing/modules/quota/index.d.ts +6 -0
  433. package/dist/billing/modules/quota/index.d.ts.map +1 -0
  434. package/dist/billing/modules/quota/index.js +10 -0
  435. package/dist/billing/modules/quota/pages/QuotaPage.d.ts +4 -0
  436. package/dist/billing/modules/quota/pages/QuotaPage.d.ts.map +1 -0
  437. package/dist/billing/modules/quota/pages/QuotaPage.js +337 -0
  438. package/dist/billing/modules/quota/pages/QuotaPage.js.map +1 -0
  439. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.d.ts +4 -0
  440. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.d.ts.map +1 -0
  441. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +273 -0
  442. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js.map +1 -0
  443. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.d.ts +4 -0
  444. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.d.ts.map +1 -0
  445. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +272 -0
  446. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js.map +1 -0
  447. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.d.ts +4 -0
  448. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.d.ts.map +1 -0
  449. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +316 -0
  450. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js.map +1 -0
  451. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.d.ts +4 -0
  452. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.d.ts.map +1 -0
  453. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +401 -0
  454. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js.map +1 -0
  455. package/dist/billing/modules/quota/pages/index.d.ts +9 -0
  456. package/dist/billing/modules/quota/pages/index.d.ts.map +1 -0
  457. package/dist/billing/modules/quota/pages/index.js +5 -0
  458. package/dist/billing/modules/settings/index.d.ts +5 -0
  459. package/dist/billing/modules/settings/index.d.ts.map +1 -0
  460. package/dist/billing/modules/settings/index.js +4 -0
  461. package/dist/billing/modules/settings/pages/SettingsPage.d.ts +4 -0
  462. package/dist/billing/modules/settings/pages/SettingsPage.d.ts.map +1 -0
  463. package/dist/billing/modules/settings/pages/SettingsPage.js +632 -0
  464. package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -0
  465. package/dist/billing/modules/settings/pages/TeamPermissionsPage.d.ts +4 -0
  466. package/dist/billing/modules/settings/pages/TeamPermissionsPage.d.ts.map +1 -0
  467. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +270 -0
  468. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -0
  469. package/dist/billing/modules/settings/pages/index.d.ts +6 -0
  470. package/dist/billing/modules/settings/pages/index.d.ts.map +1 -0
  471. package/dist/billing/modules/settings/pages/index.js +2 -0
  472. package/dist/billing/modules/store/graphql/index.d.ts +6 -0
  473. package/dist/billing/modules/store/graphql/index.d.ts.map +1 -0
  474. package/dist/billing/modules/store/graphql/index.js +1 -0
  475. package/dist/billing/modules/store/index.d.ts +6 -0
  476. package/dist/billing/modules/store/index.d.ts.map +1 -0
  477. package/dist/billing/modules/store/index.js +3 -0
  478. package/dist/billing/modules/store/pages/StoreCheckoutPage.d.ts +11 -0
  479. package/dist/billing/modules/store/pages/StoreCheckoutPage.d.ts.map +1 -0
  480. package/dist/billing/modules/store/pages/StoreCheckoutPage.js +18 -0
  481. package/dist/billing/modules/store/pages/StoreCheckoutPage.js.map +1 -0
  482. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.d.ts +12 -0
  483. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.d.ts.map +1 -0
  484. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js +167 -0
  485. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js.map +1 -0
  486. package/dist/billing/modules/subscriptions/hooks/index.d.ts +6 -0
  487. package/dist/billing/modules/subscriptions/hooks/index.d.ts.map +1 -0
  488. package/dist/billing/modules/subscriptions/hooks/index.js +1 -0
  489. package/dist/billing/modules/subscriptions/hooks/useSubscriptions.d.ts +92 -0
  490. package/dist/billing/modules/subscriptions/hooks/useSubscriptions.d.ts.map +1 -0
  491. package/dist/billing/modules/subscriptions/hooks/useSubscriptions.js +136 -0
  492. package/dist/billing/modules/subscriptions/hooks/useSubscriptions.js.map +1 -0
  493. package/dist/billing/modules/subscriptions/index.d.ts +7 -0
  494. package/dist/billing/modules/subscriptions/index.d.ts.map +1 -0
  495. package/dist/billing/modules/subscriptions/index.js +7 -0
  496. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.d.ts +4 -0
  497. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.d.ts.map +1 -0
  498. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +551 -0
  499. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -0
  500. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.d.ts +4 -0
  501. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.d.ts.map +1 -0
  502. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +529 -0
  503. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js.map +1 -0
  504. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.d.ts +4 -0
  505. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.d.ts.map +1 -0
  506. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js +430 -0
  507. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -0
  508. package/dist/billing/modules/subscriptions/pages/index.d.ts +8 -0
  509. package/dist/billing/modules/subscriptions/pages/index.d.ts.map +1 -0
  510. package/dist/billing/modules/subscriptions/pages/index.js +3 -0
  511. package/dist/billing/modules/usage/hooks/index.d.ts +6 -0
  512. package/dist/billing/modules/usage/hooks/index.d.ts.map +1 -0
  513. package/dist/billing/modules/usage/hooks/index.js +1 -0
  514. package/dist/billing/modules/usage/hooks/useUsage.d.ts +203 -0
  515. package/dist/billing/modules/usage/hooks/useUsage.d.ts.map +1 -0
  516. package/dist/billing/modules/usage/hooks/useUsage.js +271 -0
  517. package/dist/billing/modules/usage/hooks/useUsage.js.map +1 -0
  518. package/dist/billing/modules/usage/index.d.ts +6 -0
  519. package/dist/billing/modules/usage/index.d.ts.map +1 -0
  520. package/dist/billing/modules/usage/index.js +5 -0
  521. package/dist/billing/modules/usage/pages/UsagePage.d.ts +4 -0
  522. package/dist/billing/modules/usage/pages/UsagePage.d.ts.map +1 -0
  523. package/dist/billing/modules/usage/pages/UsagePage.js +817 -0
  524. package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -0
  525. package/dist/billing/modules/usage/pages/index.d.ts +5 -0
  526. package/dist/billing/modules/usage/pages/index.d.ts.map +1 -0
  527. package/dist/billing/modules/usage/pages/index.js +1 -0
  528. package/dist/billing/providers/BillingProvider.d.ts +16 -0
  529. package/dist/billing/providers/BillingProvider.d.ts.map +1 -0
  530. package/dist/billing/providers/BillingProvider.js +40 -0
  531. package/dist/billing/providers/BillingProvider.js.map +1 -0
  532. package/dist/billing/shared/components/AccessDenied.d.ts +8 -0
  533. package/dist/billing/shared/components/AccessDenied.d.ts.map +1 -0
  534. package/dist/billing/shared/components/AccessDenied.js +44 -0
  535. package/dist/billing/shared/components/AccessDenied.js.map +1 -0
  536. package/dist/billing/shared/components/CurrencyPriceOverridesEditor.d.ts +11 -0
  537. package/dist/billing/shared/components/CurrencyPriceOverridesEditor.d.ts.map +1 -0
  538. package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js +230 -0
  539. package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js.map +1 -0
  540. package/dist/billing/shared/components/EmptyState.d.ts +11 -0
  541. package/dist/billing/shared/components/EmptyState.d.ts.map +1 -0
  542. package/dist/billing/shared/components/EmptyState.js +27 -0
  543. package/dist/billing/shared/components/EmptyState.js.map +1 -0
  544. package/dist/billing/shared/components/GeoPricingOverridesEditor.d.ts +11 -0
  545. package/dist/billing/shared/components/GeoPricingOverridesEditor.d.ts.map +1 -0
  546. package/dist/billing/shared/components/GeoPricingOverridesEditor.js +1 -0
  547. package/dist/billing/shared/components/PageHeader.d.ts +11 -0
  548. package/dist/billing/shared/components/PageHeader.d.ts.map +1 -0
  549. package/dist/billing/shared/components/PageHeader.js +25 -0
  550. package/dist/billing/shared/components/PageHeader.js.map +1 -0
  551. package/dist/billing/shared/components/ServerError.d.ts +11 -0
  552. package/dist/billing/shared/components/ServerError.d.ts.map +1 -0
  553. package/dist/billing/shared/components/ServerError.js +75 -0
  554. package/dist/billing/shared/components/ServerError.js.map +1 -0
  555. package/dist/billing/shared/components/StatCard.d.ts +15 -0
  556. package/dist/billing/shared/components/StatCard.d.ts.map +1 -0
  557. package/dist/billing/shared/components/StatCard.js +37 -0
  558. package/dist/billing/shared/components/StatCard.js.map +1 -0
  559. package/dist/billing/shared/components/index.d.ts +11 -0
  560. package/dist/billing/shared/components/index.d.ts.map +1 -0
  561. package/dist/billing/shared/components/index.js +7 -0
  562. package/dist/billing/shared/index.d.ts +8 -0
  563. package/dist/billing/shared/index.d.ts.map +1 -0
  564. package/dist/billing/shared/types/graphql.d.ts +926 -0
  565. package/dist/billing/shared/types/graphql.d.ts.map +1 -0
  566. package/dist/billing/shared/types/graphql.js +30 -0
  567. package/dist/billing/shared/types/graphql.js.map +1 -0
  568. package/dist/billing/shared/types/index.d.ts +96 -0
  569. package/dist/billing/shared/types/index.d.ts.map +1 -0
  570. package/dist/billing/shared/utils/directActivityGraphql.d.ts +13 -0
  571. package/dist/billing/shared/utils/directActivityGraphql.d.ts.map +1 -0
  572. package/dist/billing/shared/utils/directActivityGraphql.js +2 -0
  573. package/dist/billing/shared/utils/directBillingGraphql.d.ts +13 -0
  574. package/dist/billing/shared/utils/directBillingGraphql.d.ts.map +1 -0
  575. package/dist/billing/shared/utils/directBillingGraphql.js +22 -0
  576. package/dist/billing/shared/utils/directBillingGraphql.js.map +1 -0
  577. package/dist/billing/shared/utils/error.d.ts +30 -0
  578. package/dist/billing/shared/utils/error.d.ts.map +1 -0
  579. package/dist/billing/shared/utils/error.js +16 -0
  580. package/dist/billing/shared/utils/error.js.map +1 -0
  581. package/dist/billing/shared/utils/format.d.ts +28 -0
  582. package/dist/billing/shared/utils/format.d.ts.map +1 -0
  583. package/dist/billing/shared/utils/format.js +65 -0
  584. package/dist/billing/shared/utils/format.js.map +1 -0
  585. package/dist/billing/shared/utils/gatewayGraphql.d.ts +15 -0
  586. package/dist/billing/shared/utils/gatewayGraphql.d.ts.map +1 -0
  587. package/dist/billing/shared/utils/gatewayGraphql.js +27 -0
  588. package/dist/billing/shared/utils/gatewayGraphql.js.map +1 -0
  589. package/dist/billing/shared/utils/index.d.ts +13 -0
  590. package/dist/billing/shared/utils/index.d.ts.map +1 -0
  591. package/dist/billing/shared/utils/index.js +8 -0
  592. package/dist/billing/shared/utils/navigation.d.ts +2 -0
  593. package/dist/billing/shared/utils/navigation.d.ts.map +1 -0
  594. package/dist/billing/shared/utils/navigation.js +8 -0
  595. package/dist/billing/shared/utils/navigation.js.map +1 -0
  596. package/dist/billing/shared/utils/paymentTheme.d.ts +18 -0
  597. package/dist/billing/shared/utils/paymentTheme.d.ts.map +1 -0
  598. package/dist/billing/shared/utils/paymentTheme.js +32 -0
  599. package/dist/billing/shared/utils/paymentTheme.js.map +1 -0
  600. package/dist/billing/shared/utils/status.d.ts +28 -0
  601. package/dist/billing/shared/utils/status.d.ts.map +1 -0
  602. package/dist/billing/shared/utils/status.js +57 -0
  603. package/dist/billing/shared/utils/status.js.map +1 -0
  604. package/dist/billing/shared/utils/tokens.d.ts +156 -0
  605. package/dist/billing/shared/utils/tokens.d.ts.map +1 -0
  606. package/dist/billing/shared/utils/tokens.js +128 -0
  607. package/dist/billing/shared/utils/tokens.js.map +1 -0
  608. package/dist/billing/types/index.d.ts +268 -0
  609. package/dist/billing/types/index.d.ts.map +1 -0
  610. package/dist/billing/utils/index.d.ts +128 -0
  611. package/dist/billing/utils/index.d.ts.map +1 -0
  612. package/dist/dev/main.d.ts +2 -0
  613. package/dist/dev/main.d.ts.map +1 -0
  614. package/dist/generated/global-operations.d.ts +9544 -0
  615. package/dist/generated/global-operations.d.ts.map +1 -0
  616. package/dist/generated/global-operations.js +3542 -0
  617. package/dist/generated/global-operations.js.map +1 -0
  618. package/dist/generated/global-types.d.ts +22208 -0
  619. package/dist/generated/global-types.d.ts.map +1 -0
  620. package/dist/generated/global-types.js +12 -0
  621. package/dist/generated/global-types.js.map +1 -0
  622. package/dist/generated/wspace-operations.d.ts +61 -0
  623. package/dist/generated/wspace-operations.d.ts.map +1 -0
  624. package/dist/generated/wspace-operations.js +35 -0
  625. package/dist/generated/wspace-operations.js.map +1 -0
  626. package/dist/generated/wspace-types.d.ts +48578 -0
  627. package/dist/generated/wspace-types.d.ts.map +1 -0
  628. package/dist/index.d.ts +8 -0
  629. package/dist/index.d.ts.map +1 -0
  630. package/dist/index.js +2 -0
  631. package/dist/node_modules/@capacitor/core/dist/index.js +270 -0
  632. package/dist/node_modules/@capacitor/core/dist/index.js.map +1 -0
  633. package/dist/utils/nativeBridge.d.ts +3 -0
  634. package/dist/utils/nativeBridge.d.ts.map +1 -0
  635. package/dist/utils/nativeBridge.js +2 -0
  636. package/package.json +112 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useQuota.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/quota/hooks/useQuota.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAeH,OAAO,KAAK,EACV,eAAe,EACf,4BAA4B,EAC5B,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,2BAA2B,EAG5B,MAAM,uBAAuB,CAAC;AAE/B,UAAU,0BAA0B;IAClC,gBAAgB,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CAC5B;AAED,UAAU,yBAAyB;IACjC,gBAAgB,EAAE,eAAe,EAAE,CAAC;IACpC,UAAU,EAAE;QACV,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;IACzB,OAAO,EAAE,MAAM,OAAO,CAAC,IA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AM,CAAC;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAChC,KAAG,OAAO,CAAC,OAAO,CAAC;0BAkBL;QACb,gBAAgB,EAAE,MAAM,CAAC;QACzB,SAAS,EAAE,MAAM,CAAC;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAChC,KAAG,OAAO,CAAC,OAAO,CAAC;;;EAuBvB"}
@@ -0,0 +1,63 @@
1
+ import { useGetBillingAccountQuotasSummaryQuery as e, useGetQuotaAssignmentsWithAnalyticsQuery as t } from "../../../../generated/global-operations.js";
2
+ import { useCallback as n } from "react";
3
+ import "@apollo/client/react";
4
+ //#region src/billing/modules/quota/hooks/useQuota.ts
5
+ function r(e) {
6
+ let { billingAccountId: r, page: i = 1, pageSize: a = 10, searchQuery: o, status: s, fromDate: c, toDate: l, sortBy: u, sortOrder: d } = e, { data: f, loading: p, error: m, refetch: h } = t({
7
+ variables: {
8
+ billingAccountId: r,
9
+ page: i,
10
+ pageSize: a,
11
+ searchQuery: o,
12
+ status: s,
13
+ fromDate: c,
14
+ toDate: l,
15
+ sortBy: u,
16
+ sortOrder: d
17
+ },
18
+ skip: !r,
19
+ fetchPolicy: "cache-and-network"
20
+ }), g = f?.getQuotaAssignmentsWithAnalytics || {
21
+ quotaAssignments: [],
22
+ page: 1,
23
+ pageSize: 10,
24
+ totalCount: 0,
25
+ totalPages: 0
26
+ }, _ = n(async () => {
27
+ await h();
28
+ }, [h]);
29
+ return {
30
+ quotaAssignments: g.quotaAssignments,
31
+ pagination: {
32
+ page: g.page,
33
+ pageSize: g.pageSize,
34
+ totalCount: g.totalCount,
35
+ totalPages: g.totalPages
36
+ },
37
+ isLoading: p,
38
+ error: m,
39
+ refetch: _
40
+ };
41
+ }
42
+ function i(t, r) {
43
+ let { data: i, loading: a, error: o, refetch: s } = e({
44
+ variables: {
45
+ billingAccountId: t,
46
+ productId: r
47
+ },
48
+ skip: !t,
49
+ fetchPolicy: "cache-and-network"
50
+ }), c = n(async () => {
51
+ await s();
52
+ }, [s]);
53
+ return {
54
+ summary: i?.getBillingAccountQuotasSummary,
55
+ isLoading: a,
56
+ error: o,
57
+ refetch: c
58
+ };
59
+ }
60
+ //#endregion
61
+ export { i as useBillingAccountQuotasSummary, r as useQuotaAssignmentsWithAnalytics };
62
+
63
+ //# sourceMappingURL=useQuota.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useQuota.js","names":[],"sources":["../../../../../src/billing/modules/quota/hooks/useQuota.ts"],"sourcesContent":["/**\n * Quota Module - useQuota Hook\n * Provides access to quota assignments and analytics\n */\n\nimport { useApolloClient } from '@apollo/client/react';\nimport { useCallback } from 'react';\nimport {\n useGetAllQuotasAssignmentQuery,\n useGetQuotaAssignmentsWithAnalyticsQuery,\n useGetQuotaAnalyticsQuery,\n useGetBillingAccountQuotasSummaryQuery,\n useCheckQuotaExhaustedQuery,\n useAddUsageMutation,\n useFreeUpUsageMutation,\n GetAllQuotasAssignmentDocument,\n GetBillingAccountQuotasSummaryDocument,\n} from '../../../../generated/global-operations';\nimport type {\n QuotaAssignment,\n QuotaAssignmentWithAnalytics,\n QuotaUsageAnalytics,\n QuotaStatus,\n AnalyticsPeriod,\n BillingAccountQuotasSummary,\n PaginatedQuotaAssignments,\n PaginatedQuotaAssignmentsWithAnalytics,\n} from '../../../shared/types';\n\ninterface UseQuotaAssignmentsOptions {\n billingAccountId: string;\n page?: number;\n pageSize?: number;\n searchQuery?: string;\n status?: QuotaStatus[];\n fromDate?: string;\n toDate?: string;\n sortBy?: string;\n sortOrder?: 'ASC' | 'DESC';\n}\n\ninterface UseQuotaAssignmentsResult {\n quotaAssignments: QuotaAssignment[];\n pagination: {\n page: number;\n pageSize: number;\n totalCount: number;\n totalPages: number;\n };\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n}\n\ninterface UseQuotaAssignmentsWithAnalyticsResult {\n quotaAssignments: QuotaAssignmentWithAnalytics[];\n pagination: {\n page: number;\n pageSize: number;\n totalCount: number;\n totalPages: number;\n };\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n}\n\n/**\n * Hook for fetching quota assignments\n */\nexport function useQuotaAssignments(\n options: UseQuotaAssignmentsOptions\n): UseQuotaAssignmentsResult {\n const {\n billingAccountId,\n page = 1,\n pageSize = 10,\n searchQuery,\n status,\n fromDate,\n toDate,\n sortBy,\n sortOrder,\n } = options;\n\n const { data, loading, error, refetch } = useGetAllQuotasAssignmentQuery({\n variables: {\n billingAccountId,\n page,\n pageSize,\n searchQuery,\n status,\n fromDate,\n toDate,\n sortBy,\n sortOrder,\n },\n skip: !billingAccountId,\n fetchPolicy: 'cache-and-network',\n });\n\n const result: PaginatedQuotaAssignments = data?.getAllQuotasAssignment || {\n quotaAssignments: [],\n page: 1,\n pageSize: 10,\n totalCount: 0,\n totalPages: 0,\n };\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n return {\n quotaAssignments: result.quotaAssignments,\n pagination: {\n page: result.page,\n pageSize: result.pageSize,\n totalCount: result.totalCount,\n totalPages: result.totalPages,\n },\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for fetching quota assignments with analytics\n */\nexport function useQuotaAssignmentsWithAnalytics(\n options: UseQuotaAssignmentsOptions\n): UseQuotaAssignmentsWithAnalyticsResult {\n const {\n billingAccountId,\n page = 1,\n pageSize = 10,\n searchQuery,\n status,\n fromDate,\n toDate,\n sortBy,\n sortOrder,\n } = options;\n\n const { data, loading, error, refetch } = useGetQuotaAssignmentsWithAnalyticsQuery({\n variables: {\n billingAccountId,\n page,\n pageSize,\n searchQuery,\n status,\n fromDate,\n toDate,\n sortBy,\n sortOrder,\n },\n skip: !billingAccountId,\n fetchPolicy: 'cache-and-network',\n });\n\n const result: PaginatedQuotaAssignmentsWithAnalytics = data?.getQuotaAssignmentsWithAnalytics || {\n quotaAssignments: [],\n page: 1,\n pageSize: 10,\n totalCount: 0,\n totalPages: 0,\n };\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n return {\n quotaAssignments: result.quotaAssignments,\n pagination: {\n page: result.page,\n pageSize: result.pageSize,\n totalCount: result.totalCount,\n totalPages: result.totalPages,\n },\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for fetching quota analytics\n */\nexport function useQuotaAnalytics(\n quotaAssignmentId: string | undefined,\n period: AnalyticsPeriod = 'LAST_30_DAYS' as AnalyticsPeriod\n) {\n const { data, loading, error, refetch } = useGetQuotaAnalyticsQuery({\n variables: { quotaAssignmentId: quotaAssignmentId!, period },\n skip: !quotaAssignmentId,\n fetchPolicy: 'cache-and-network',\n });\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n return {\n analytics: data?.getQuotaAnalytics as QuotaUsageAnalytics | null,\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for fetching billing account quotas summary\n */\nexport function useBillingAccountQuotasSummary(\n billingAccountId: string | undefined,\n productId?: string\n) {\n const { data, loading, error, refetch } = useGetBillingAccountQuotasSummaryQuery({\n variables: { billingAccountId: billingAccountId!, productId },\n skip: !billingAccountId,\n fetchPolicy: 'cache-and-network',\n });\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n return {\n summary: data?.getBillingAccountQuotasSummary as BillingAccountQuotasSummary | null,\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for checking quota exhaustion\n */\nexport function useQuotaCheck(billingAccountId: string, quotaName: string, productId?: string) {\n const { data, loading, error } = useCheckQuotaExhaustedQuery({\n variables: { billingAccountId, quotaName, productId },\n skip: !billingAccountId || !quotaName,\n fetchPolicy: 'network-only',\n });\n\n return {\n limitLeft: data?.checkQuotaExhausted?.limitLeft ?? 0,\n noLimit: data?.checkQuotaExhausted?.noLimit ?? false,\n isExhausted: data?.checkQuotaExhausted?.limitLeft === 0 && !data?.checkQuotaExhausted?.noLimit,\n isLoading: loading,\n error: error as Error | undefined,\n };\n}\n\n/**\n * Hook for quota mutations\n */\nexport function useQuotaMutations() {\n const client = useApolloClient();\n\n const [addUsageMutation, { loading: isAdding }] = useAddUsageMutation();\n const [freeUpUsageMutation, { loading: isFreeing }] = useFreeUpUsageMutation();\n\n const addUsage = useCallback(\n async (params: {\n billingAccountId: string;\n quotaName: string;\n value: number;\n description: string;\n userId?: string;\n productId?: string;\n hash?: string;\n tags?: Record<string, unknown>;\n }): Promise<boolean> => {\n try {\n const { data } = await addUsageMutation({\n variables: params,\n });\n await client.refetchQueries({\n include: [GetAllQuotasAssignmentDocument, GetBillingAccountQuotasSummaryDocument],\n });\n return data!.addUsage;\n } catch (error) {\n console.error('Failed to add usage:', error);\n throw error;\n }\n },\n [addUsageMutation, client]\n );\n\n const freeUpUsage = useCallback(\n async (params: {\n billingAccountId: string;\n quotaName: string;\n value: number;\n description?: string;\n userId?: string;\n productId?: string;\n hash?: string;\n tags?: Record<string, unknown>;\n }): Promise<boolean> => {\n try {\n const { data } = await freeUpUsageMutation({\n variables: params,\n });\n await client.refetchQueries({\n include: [GetAllQuotasAssignmentDocument, GetBillingAccountQuotasSummaryDocument],\n });\n return data!.freeUpUsage;\n } catch (error) {\n console.error('Failed to free up usage:', error);\n throw error;\n }\n },\n [freeUpUsageMutation, client]\n );\n\n return {\n addUsage,\n freeUpUsage,\n isAdding,\n isFreeing,\n };\n}\n"],"mappings":";;;;AAkIA,SAAgB,EACd,GACwC;CACxC,IAAM,EACJ,qBACA,UAAO,GACP,cAAW,IACX,gBACA,WACA,aACA,WACA,WACA,iBACE,GAEE,EAAE,SAAM,YAAS,UAAO,eAAY,EAAyC;EACjF,WAAW;GACT;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD;EACD,MAAM,CAAC;EACP,aAAa;EACd,CAAC,EAEI,IAAiD,GAAM,oCAAoC;EAC/F,kBAAkB,EAAE;EACpB,MAAM;EACN,UAAU;EACV,YAAY;EACZ,YAAY;EACb,EAEK,IAAgB,EAAY,YAAY;AAC5C,QAAM,GAAS;IACd,CAAC,EAAQ,CAAC;AAEb,QAAO;EACL,kBAAkB,EAAO;EACzB,YAAY;GACV,MAAM,EAAO;GACb,UAAU,EAAO;GACjB,YAAY,EAAO;GACnB,YAAY,EAAO;GACpB;EACD,WAAW;EACJ;EACP,SAAS;EACV;;AA+BH,SAAgB,EACd,GACA,GACA;CACA,IAAM,EAAE,SAAM,YAAS,UAAO,eAAY,EAAuC;EAC/E,WAAW;GAAoB;GAAmB;GAAW;EAC7D,MAAM,CAAC;EACP,aAAa;EACd,CAAC,EAEI,IAAgB,EAAY,YAAY;AAC5C,QAAM,GAAS;IACd,CAAC,EAAQ,CAAC;AAEb,QAAO;EACL,SAAS,GAAM;EACf,WAAW;EACJ;EACP,SAAS;EACV"}
@@ -0,0 +1,39 @@
1
+ import { Quota, CreateQuotaInput, UpdateQuotaInput } from '../../../shared/types';
2
+
3
+ interface UseQuotaTemplatesOptions {
4
+ onlyActive?: boolean;
5
+ }
6
+ interface UseQuotaTemplatesResult {
7
+ quotas: Quota[];
8
+ isLoading: boolean;
9
+ error: Error | undefined;
10
+ refetch: () => Promise<void>;
11
+ }
12
+ interface UseQuotaTemplateResult {
13
+ quota: Quota | null;
14
+ isLoading: boolean;
15
+ error: Error | undefined;
16
+ refetch: () => Promise<void>;
17
+ }
18
+ interface UseQuotaTemplateMutationsResult {
19
+ createQuota: (input: CreateQuotaInput) => Promise<boolean>;
20
+ updateQuota: (input: UpdateQuotaInput) => Promise<boolean>;
21
+ toggleQuota: (id: string, isActive: boolean) => Promise<boolean>;
22
+ isCreating: boolean;
23
+ isUpdating: boolean;
24
+ isToggling: boolean;
25
+ }
26
+ /**
27
+ * Hook for fetching all quota templates
28
+ */
29
+ export declare function useQuotaTemplates(options?: UseQuotaTemplatesOptions): UseQuotaTemplatesResult;
30
+ /**
31
+ * Hook for fetching a single quota template by ID
32
+ */
33
+ export declare function useQuotaTemplate(quotaId: string | undefined): UseQuotaTemplateResult;
34
+ /**
35
+ * Hook for quota template mutations (create, update, toggle)
36
+ */
37
+ export declare function useQuotaTemplateMutations(): UseQuotaTemplateMutationsResult;
38
+ export {};
39
+ //# sourceMappingURL=useQuotaTemplates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useQuotaTemplates.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/quota/hooks/useQuotaTemplates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,OAAO,KAAK,EAAE,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEvF,UAAU,wBAAwB;IAChC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,UAAU,uBAAuB;IAC/B,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;IACzB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED,UAAU,sBAAsB;IAC9B,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;IACzB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED,UAAU,+BAA+B;IACvC,WAAW,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3D,WAAW,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3D,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACjE,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,GAAE,wBAA6B,GAAG,uBAAuB,CAwBjG;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,sBAAsB,CAkBpF;AAED;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,+BAA+B,CAoE3E"}
@@ -0,0 +1,67 @@
1
+ import { GetAllQuotaTemplatesDocument as e, useCreateQuotaTemplateMutation as t, useGetAllQuotaTemplatesQuery as n, useUpdateQuotaTemplateMutation as r } from "../../../../generated/global-operations.js";
2
+ import { useCallback as i } from "react";
3
+ import { useApolloClient as a } from "@apollo/client/react";
4
+ //#region src/billing/modules/quota/hooks/useQuotaTemplates.ts
5
+ function o(e = {}) {
6
+ let { onlyActive: t = !1 } = e, { data: r, loading: a, error: o, refetch: s } = n({ fetchPolicy: "cache-and-network" }), c = r?.getAllQuotas || [];
7
+ t && (c = c.filter((e) => e.isActive));
8
+ let l = i(async () => {
9
+ await s();
10
+ }, [s]);
11
+ return {
12
+ quotas: c,
13
+ isLoading: a,
14
+ error: o,
15
+ refetch: l
16
+ };
17
+ }
18
+ function s(e) {
19
+ let { data: t, loading: r, error: a, refetch: o } = n({ fetchPolicy: "cache-and-network" });
20
+ return {
21
+ quota: (t?.getAllQuotas || []).find((t) => t.id === e) || null,
22
+ isLoading: r,
23
+ error: a,
24
+ refetch: i(async () => {
25
+ await o();
26
+ }, [o])
27
+ };
28
+ }
29
+ function c() {
30
+ let n = a(), [o, { loading: s }] = t(), [c, { loading: l }] = r(), [u, { loading: d }] = r();
31
+ return {
32
+ createQuota: i(async (t) => {
33
+ try {
34
+ let { data: r } = await o({ variables: { input: t } });
35
+ return await n.refetchQueries({ include: [e] }), r?.createQuota ?? !1;
36
+ } catch (e) {
37
+ throw console.error("Failed to create quota:", e), e;
38
+ }
39
+ }, [o, n]),
40
+ updateQuota: i(async (t) => {
41
+ try {
42
+ let { data: r } = await c({ variables: { input: t } });
43
+ return await n.refetchQueries({ include: [e] }), r?.updateQuota ?? !1;
44
+ } catch (e) {
45
+ throw console.error("Failed to update quota:", e), e;
46
+ }
47
+ }, [c, n]),
48
+ toggleQuota: i(async (t, r) => {
49
+ try {
50
+ let { data: i } = await u({ variables: { input: {
51
+ id: t,
52
+ isActive: r
53
+ } } });
54
+ return await n.refetchQueries({ include: [e] }), i?.updateQuota ?? !1;
55
+ } catch (e) {
56
+ throw console.error("Failed to toggle quota:", e), e;
57
+ }
58
+ }, [u, n]),
59
+ isCreating: s,
60
+ isUpdating: l,
61
+ isToggling: d
62
+ };
63
+ }
64
+ //#endregion
65
+ export { s as useQuotaTemplate, c as useQuotaTemplateMutations, o as useQuotaTemplates };
66
+
67
+ //# sourceMappingURL=useQuotaTemplates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useQuotaTemplates.js","names":[],"sources":["../../../../../src/billing/modules/quota/hooks/useQuotaTemplates.ts"],"sourcesContent":["/**\n * Quota Module - useQuotaTemplates Hook\n * Provides access to quota template management (admin side)\n */\n\nimport { useApolloClient } from '@apollo/client/react';\nimport { useCallback } from 'react';\nimport {\n useGetAllQuotaTemplatesQuery,\n useCreateQuotaTemplateMutation,\n useUpdateQuotaTemplateMutation,\n GetAllQuotaTemplatesDocument,\n} from '../../../../generated/global-operations';\nimport type { Quota, CreateQuotaInput, UpdateQuotaInput } from '../../../shared/types';\n\ninterface UseQuotaTemplatesOptions {\n onlyActive?: boolean;\n}\n\ninterface UseQuotaTemplatesResult {\n quotas: Quota[];\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n}\n\ninterface UseQuotaTemplateResult {\n quota: Quota | null;\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n}\n\ninterface UseQuotaTemplateMutationsResult {\n createQuota: (input: CreateQuotaInput) => Promise<boolean>;\n updateQuota: (input: UpdateQuotaInput) => Promise<boolean>;\n toggleQuota: (id: string, isActive: boolean) => Promise<boolean>;\n isCreating: boolean;\n isUpdating: boolean;\n isToggling: boolean;\n}\n\n/**\n * Hook for fetching all quota templates\n */\nexport function useQuotaTemplates(options: UseQuotaTemplatesOptions = {}): UseQuotaTemplatesResult {\n const { onlyActive = false } = options;\n\n const { data, loading, error, refetch } = useGetAllQuotaTemplatesQuery({\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 fetching a single quota template by ID\n */\nexport function useQuotaTemplate(quotaId: string | undefined): UseQuotaTemplateResult {\n const { data, loading, error, refetch } = useGetAllQuotaTemplatesQuery({\n fetchPolicy: 'cache-and-network',\n });\n\n const quotas: Quota[] = data?.getAllQuotas || [];\n const quota = quotas.find((q) => q.id === quotaId) || null;\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n return {\n quota,\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for quota template mutations (create, update, toggle)\n */\nexport function useQuotaTemplateMutations(): UseQuotaTemplateMutationsResult {\n const client = useApolloClient();\n\n const [createQuotaMutation, { loading: isCreating }] = useCreateQuotaTemplateMutation();\n const [updateQuotaMutation, { loading: isUpdating }] = useUpdateQuotaTemplateMutation();\n const [toggleQuotaMutation, { loading: isToggling }] = useUpdateQuotaTemplateMutation();\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: [GetAllQuotaTemplatesDocument] });\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: [GetAllQuotaTemplatesDocument] });\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 const toggleQuota = useCallback(\n async (id: string, isActive: boolean): Promise<boolean> => {\n try {\n const { data } = await toggleQuotaMutation({\n variables: {\n input: { id, isActive },\n },\n });\n // Refetch quotas list after toggle\n await client.refetchQueries({ include: [GetAllQuotaTemplatesDocument] });\n return data?.updateQuota ?? false;\n } catch (error) {\n console.error('Failed to toggle quota:', error);\n throw error;\n }\n },\n [toggleQuotaMutation, client]\n );\n\n return {\n createQuota,\n updateQuota,\n toggleQuota,\n isCreating,\n isUpdating,\n isToggling,\n };\n}\n"],"mappings":";;;;AA6CA,SAAgB,EAAkB,IAAoC,EAAE,EAA2B;CACjG,IAAM,EAAE,gBAAa,OAAU,GAEzB,EAAE,SAAM,YAAS,UAAO,eAAY,EAA6B,EACrE,aAAa,qBACd,CAAC,EAEE,IAAkB,GAAM,gBAAgB,EAAE;AAG9C,CAAI,MACF,IAAS,EAAO,QAAQ,MAAiB,EAAM,SAAS;CAG1D,IAAM,IAAgB,EAAY,YAAY;AAC5C,QAAM,GAAS;IACd,CAAC,EAAQ,CAAC;AAEb,QAAO;EACL;EACA,WAAW;EACJ;EACP,SAAS;EACV;;AAMH,SAAgB,EAA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AAS,CAAC,EAA6B,EAAE,CAAC,EACjE,GAAM,eAAe;YACrB,GAAO;AAEd,UADA,QAAQ,MAAM,2BAA2B,EAAM,EACzC;;KAGV,CAAC,GAAqB,EAAO,CAC9B;EAMC;EACA;EACA;EACD"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Quota Module
3
+ */
4
+ export * from './pages';
5
+ export * from './hooks';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/billing/modules/quota/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
@@ -0,0 +1,10 @@
1
+ import "./hooks/useQuota.js";
2
+ import { QuotaPage as e } from "./pages/QuotaPage.js";
3
+ import "./hooks/useQuotaTemplates.js";
4
+ import "./hooks/index.js";
5
+ import { QuotaTemplatesListPage as t } from "./pages/QuotaTemplatesListPage.js";
6
+ import { QuotaTemplateDetailPage as n } from "./pages/QuotaTemplateDetailPage.js";
7
+ import { QuotaTemplateCreatePage as r } from "./pages/QuotaTemplateCreatePage.js";
8
+ import { QuotaTemplateEditPage as i } from "./pages/QuotaTemplateEditPage.js";
9
+ import "./pages/index.js";
10
+ export { e as QuotaPage, r as QuotaTemplateCreatePage, n as QuotaTemplateDetailPage, i as QuotaTemplateEditPage, t as QuotaTemplatesListPage };
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+
3
+ export declare const QuotaPage: FC;
4
+ //# sourceMappingURL=QuotaPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuotaPage.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/quota/pages/QuotaPage.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAY,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAwB1C,eAAO,MAAM,SAAS,EAAE,EAuQvB,CAAC"}
@@ -0,0 +1,337 @@
1
+ import { formatDate as e, formatNumber as t, formatPercentage as n, formatQuotaStatus as r } from "../../../shared/utils/format.js";
2
+ import { getQuotaProgressBgColor as i, getQuotaProgressColor as a, getQuotaStatusColor as o, getStatusBadgeClasses as s } from "../../../shared/utils/status.js";
3
+ import { useBillingPermissions as c } from "../../../hooks/useBillingPermissions.js";
4
+ import { useDefaultBillingAccount as l } from "../../subscriptions/hooks/useSubscriptions.js";
5
+ import "../../subscriptions/hooks/index.js";
6
+ import { useBillingAccountQuotasSummary as u, useQuotaAssignmentsWithAnalytics as d } from "../hooks/useQuota.js";
7
+ import { useState as f } from "react";
8
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
9
+ import { useI18n as h } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
10
+ //#region src/billing/modules/quota/pages/QuotaPage.tsx
11
+ var g = () => {
12
+ let { t: e } = h(), t = (t, n) => {
13
+ let r = e(t);
14
+ return r === t ? n : r;
15
+ }, n = c(), { billingAccount: i, isLoading: a } = l(), [o, s] = f("all"), [g, v] = f(""), [y, b] = f(1), { summary: x, isLoading: S } = u(i?.id), { quotaAssignments: C, pagination: w, isLoading: T, error: E, refetch: D } = d({
16
+ billingAccountId: i?.id || "",
17
+ page: y,
18
+ pageSize: 10,
19
+ searchQuery: g || void 0,
20
+ status: o === "all" ? void 0 : [o]
21
+ });
22
+ if (!n.canViewUsage) return /* @__PURE__ */ p("div", {
23
+ className: "flex items-center justify-center h-full min-h-[400px]",
24
+ children: /* @__PURE__ */ m("div", {
25
+ className: "text-center space-y-2",
26
+ children: [
27
+ /* @__PURE__ */ p("div", {
28
+ className: "w-12 h-12 mx-auto rounded-full bg-muted flex items-center justify-center",
29
+ children: /* @__PURE__ */ p("svg", {
30
+ className: "w-6 h-6 text-muted-foreground",
31
+ fill: "none",
32
+ viewBox: "0 0 24 24",
33
+ stroke: "currentColor",
34
+ children: /* @__PURE__ */ p("path", {
35
+ strokeLinecap: "round",
36
+ strokeLinejoin: "round",
37
+ strokeWidth: 2,
38
+ d: "M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"
39
+ })
40
+ })
41
+ }),
42
+ /* @__PURE__ */ p("h2", {
43
+ className: "text-lg font-semibold text-foreground",
44
+ children: "Access Denied"
45
+ }),
46
+ /* @__PURE__ */ p("p", {
47
+ className: "text-sm text-muted-foreground max-w-sm",
48
+ children: "You don't have permission to view quotas."
49
+ })
50
+ ]
51
+ })
52
+ });
53
+ if ((a || S || T) && !i) return /* @__PURE__ */ m("div", {
54
+ className: "space-y-6 p-6",
55
+ children: [/* @__PURE__ */ p("div", { className: "h-8 w-48 bg-muted animate-pulse rounded" }), /* @__PURE__ */ p("div", {
56
+ className: "grid grid-cols-1 sm:grid-cols-4 gap-4",
57
+ children: [
58
+ 1,
59
+ 2,
60
+ 3,
61
+ 4
62
+ ].map((e) => /* @__PURE__ */ m("div", {
63
+ className: "border border-border rounded-lg p-4",
64
+ children: [/* @__PURE__ */ p("div", { className: "h-4 w-20 bg-muted animate-pulse rounded mb-2" }), /* @__PURE__ */ p("div", { className: "h-8 w-16 bg-muted animate-pulse rounded" })]
65
+ }, e))
66
+ })]
67
+ });
68
+ if (E) return /* @__PURE__ */ p("div", {
69
+ className: "flex items-center justify-center h-full min-h-[400px]",
70
+ children: /* @__PURE__ */ m("div", {
71
+ className: "text-center space-y-4",
72
+ children: [
73
+ /* @__PURE__ */ p("div", {
74
+ className: "w-12 h-12 mx-auto rounded-full bg-destructive/10 flex items-center justify-center",
75
+ children: /* @__PURE__ */ p("svg", {
76
+ className: "w-6 h-6 text-destructive",
77
+ fill: "none",
78
+ viewBox: "0 0 24 24",
79
+ stroke: "currentColor",
80
+ children: /* @__PURE__ */ p("path", {
81
+ strokeLinecap: "round",
82
+ strokeLinejoin: "round",
83
+ strokeWidth: 2,
84
+ d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
85
+ })
86
+ })
87
+ }),
88
+ /* @__PURE__ */ p("h2", {
89
+ className: "text-lg font-semibold text-foreground",
90
+ children: t("billing.quota.failedToLoad", "Failed to load quotas")
91
+ }),
92
+ /* @__PURE__ */ p("p", {
93
+ className: "text-sm text-muted-foreground",
94
+ children: E.message
95
+ }),
96
+ /* @__PURE__ */ p("button", {
97
+ onClick: () => D(),
98
+ className: "px-4 py-2 text-sm font-medium bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",
99
+ children: "Try Again"
100
+ })
101
+ ]
102
+ })
103
+ });
104
+ let O = [...x?.pooledQuotas || [], ...x?.subscriptionQuotas || []], k = O.filter((e) => e.usagePercentage < 75).length, A = O.filter((e) => e.usagePercentage >= 75 && e.usagePercentage < 90).length, j = O.filter((e) => e.usagePercentage >= 90 && e.usagePercentage < 100).length, M = O.filter((e) => e.usagePercentage >= 100).length;
105
+ return /* @__PURE__ */ m("div", {
106
+ className: "space-y-6 p-6",
107
+ children: [
108
+ /* @__PURE__ */ p("div", {
109
+ className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
110
+ children: /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h1", {
111
+ className: "text-2xl font-bold text-foreground",
112
+ children: t("billing.quota.title", "Quotas")
113
+ }), /* @__PURE__ */ p("p", {
114
+ className: "text-sm text-muted-foreground mt-1",
115
+ children: "Monitor your quota allocations and usage"
116
+ })] })
117
+ }),
118
+ /* @__PURE__ */ m("div", {
119
+ className: "grid grid-cols-2 sm:grid-cols-4 gap-4",
120
+ children: [
121
+ /* @__PURE__ */ m("div", {
122
+ className: "border border-border rounded-lg bg-status-success-bg-subtle p-4",
123
+ children: [/* @__PURE__ */ p("p", {
124
+ className: "text-sm text-status-success-text",
125
+ children: t("billing.quota.healthy", "Healthy")
126
+ }), /* @__PURE__ */ p("p", {
127
+ className: "text-2xl font-bold text-status-success-text mt-1",
128
+ children: k
129
+ })]
130
+ }),
131
+ /* @__PURE__ */ m("div", {
132
+ className: "border border-border rounded-lg bg-status-warning-bg-subtle p-4",
133
+ children: [/* @__PURE__ */ p("p", {
134
+ className: "text-sm text-status-warning-text",
135
+ children: "Warning"
136
+ }), /* @__PURE__ */ p("p", {
137
+ className: "text-2xl font-bold text-status-warning-text mt-1",
138
+ children: A
139
+ })]
140
+ }),
141
+ /* @__PURE__ */ m("div", {
142
+ className: "border border-border rounded-lg bg-status-error-bg-subtle p-4",
143
+ children: [/* @__PURE__ */ p("p", {
144
+ className: "text-sm text-status-error-text",
145
+ children: "Critical"
146
+ }), /* @__PURE__ */ p("p", {
147
+ className: "text-2xl font-bold text-status-error-text mt-1",
148
+ children: j
149
+ })]
150
+ }),
151
+ /* @__PURE__ */ m("div", {
152
+ className: "border border-border rounded-lg bg-bg-canvas p-4",
153
+ children: [/* @__PURE__ */ p("p", {
154
+ className: "text-sm text-text-secondary",
155
+ children: "Exhausted"
156
+ }), /* @__PURE__ */ p("p", {
157
+ className: "text-2xl font-bold text-text-secondary mt-1",
158
+ children: M
159
+ })]
160
+ })
161
+ ]
162
+ }),
163
+ /* @__PURE__ */ m("div", {
164
+ className: "flex flex-wrap items-center gap-4 pb-4 border-b border-border",
165
+ children: [/* @__PURE__ */ p("div", {
166
+ className: "inline-flex rounded-lg border border-border p-1 bg-muted/50 flex-wrap",
167
+ children: [
168
+ "all",
169
+ "HEALTHY",
170
+ "WARNING",
171
+ "CRITICAL",
172
+ "EXHAUSTED"
173
+ ].map((e) => /* @__PURE__ */ p("button", {
174
+ onClick: () => s(e),
175
+ className: `px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${o === e ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"}`,
176
+ children: e === "all" ? "All" : r(e)
177
+ }, e))
178
+ }), /* @__PURE__ */ m("div", {
179
+ className: "relative flex-1 min-w-[200px] max-w-md",
180
+ children: [/* @__PURE__ */ p("svg", {
181
+ className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground",
182
+ fill: "none",
183
+ viewBox: "0 0 24 24",
184
+ stroke: "currentColor",
185
+ children: /* @__PURE__ */ p("path", {
186
+ strokeLinecap: "round",
187
+ strokeLinejoin: "round",
188
+ strokeWidth: 2,
189
+ d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
190
+ })
191
+ }), /* @__PURE__ */ p("input", {
192
+ type: "text",
193
+ placeholder: "Search quotas...",
194
+ value: g,
195
+ onChange: (e) => v(e.target.value),
196
+ className: "w-full pl-[3.25rem] pr-4 py-2 text-sm border border-border rounded-md bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"
197
+ })]
198
+ })]
199
+ }),
200
+ C.length === 0 ? /* @__PURE__ */ m("div", {
201
+ className: "flex flex-col items-center justify-center py-12 border border-dashed border-border rounded-lg",
202
+ children: [
203
+ /* @__PURE__ */ p("div", {
204
+ className: "w-12 h-12 rounded-full bg-muted flex items-center justify-center mb-4",
205
+ children: /* @__PURE__ */ p("svg", {
206
+ className: "w-6 h-6 text-muted-foreground",
207
+ fill: "none",
208
+ viewBox: "0 0 24 24",
209
+ stroke: "currentColor",
210
+ children: /* @__PURE__ */ p("path", {
211
+ strokeLinecap: "round",
212
+ strokeLinejoin: "round",
213
+ strokeWidth: 2,
214
+ d: "M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"
215
+ })
216
+ })
217
+ }),
218
+ /* @__PURE__ */ p("h3", {
219
+ className: "text-lg font-medium text-foreground",
220
+ children: "No quotas found"
221
+ }),
222
+ /* @__PURE__ */ p("p", {
223
+ className: "text-sm text-muted-foreground mt-1",
224
+ children: o !== "all" || g ? "No quotas match your filters." : "No quota assignments available."
225
+ })
226
+ ]
227
+ }) : /* @__PURE__ */ m("div", {
228
+ className: "space-y-4",
229
+ children: [C.map((e) => /* @__PURE__ */ p(_, { quota: e }, e.id)), w.totalPages > 1 && /* @__PURE__ */ m("div", {
230
+ className: "flex items-center justify-center gap-2 pt-4",
231
+ children: [
232
+ /* @__PURE__ */ p("button", {
233
+ onClick: () => b((e) => Math.max(1, e - 1)),
234
+ disabled: y === 1,
235
+ className: "px-3 py-1.5 text-sm font-medium border border-border rounded-md disabled:opacity-50",
236
+ children: "Previous"
237
+ }),
238
+ /* @__PURE__ */ m("span", {
239
+ className: "text-sm text-muted-foreground",
240
+ children: [
241
+ "Page ",
242
+ y,
243
+ " of ",
244
+ w.totalPages
245
+ ]
246
+ }),
247
+ /* @__PURE__ */ p("button", {
248
+ onClick: () => b((e) => Math.min(w.totalPages, e + 1)),
249
+ disabled: y === w.totalPages,
250
+ className: "px-3 py-1.5 text-sm font-medium border border-border rounded-md disabled:opacity-50",
251
+ children: "Next"
252
+ })
253
+ ]
254
+ })]
255
+ })
256
+ ]
257
+ });
258
+ }, _ = ({ quota: c }) => {
259
+ let l = o(c.status), u = a(c.usagePercentage), d = i(c.usagePercentage), f = c.limits?.value || 0;
260
+ return /* @__PURE__ */ m("div", {
261
+ className: "border border-border rounded-lg bg-card p-6 hover:shadow-sm transition-shadow",
262
+ children: [
263
+ /* @__PURE__ */ m("div", {
264
+ className: "flex flex-col sm:flex-row sm:items-start gap-4",
265
+ children: [/* @__PURE__ */ m("div", {
266
+ className: "flex-1 min-w-0",
267
+ children: [/* @__PURE__ */ m("div", {
268
+ className: "flex items-center gap-2 flex-wrap",
269
+ children: [
270
+ /* @__PURE__ */ p("h3", {
271
+ className: "font-semibold text-foreground",
272
+ children: c.name
273
+ }),
274
+ /* @__PURE__ */ p("span", {
275
+ className: `px-2 py-0.5 text-xs font-medium rounded ${s(l)}`,
276
+ children: r(c.status)
277
+ }),
278
+ /* @__PURE__ */ p("span", {
279
+ className: "px-2 py-0.5 text-xs font-medium bg-muted text-muted-foreground rounded",
280
+ children: c.quotaType
281
+ })
282
+ ]
283
+ }), /* @__PURE__ */ m("p", {
284
+ className: "text-sm text-muted-foreground mt-1",
285
+ children: ["Expires: ", e(c.endtime, "short")]
286
+ })]
287
+ }), /* @__PURE__ */ m("div", {
288
+ className: "text-right",
289
+ children: [/* @__PURE__ */ m("p", {
290
+ className: "text-2xl font-bold text-foreground",
291
+ children: [
292
+ t(c.currentUsageSum),
293
+ " / ",
294
+ f > 0 ? t(f) : "∞"
295
+ ]
296
+ }), /* @__PURE__ */ m("p", {
297
+ className: "text-sm text-muted-foreground",
298
+ children: [n(c.usagePercentage), " used"]
299
+ })]
300
+ })]
301
+ }),
302
+ /* @__PURE__ */ m("div", {
303
+ className: "mt-4",
304
+ children: [/* @__PURE__ */ p("div", {
305
+ className: `h-2 rounded-full overflow-hidden ${d}`,
306
+ children: /* @__PURE__ */ p("div", {
307
+ className: `h-full transition-all duration-500 ${u}`,
308
+ style: { width: `${Math.min(100, c.usagePercentage)}%` }
309
+ })
310
+ }), /* @__PURE__ */ m("div", {
311
+ className: "flex items-center justify-between mt-2 text-xs text-muted-foreground",
312
+ children: [/* @__PURE__ */ m("span", { children: [t(c.limitLeft), " remaining"] }), /* @__PURE__ */ m("span", { children: [c.totalUsageCount, " usage records"] })]
313
+ })]
314
+ }),
315
+ c.analytics?.trends && /* @__PURE__ */ m("div", {
316
+ className: "mt-4 pt-4 border-t border-border flex flex-wrap gap-4 text-sm",
317
+ children: [c.analytics.trends.averageDailyUsage !== void 0 && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("span", {
318
+ className: "text-muted-foreground",
319
+ children: "Avg. Daily: "
320
+ }), /* @__PURE__ */ p("span", {
321
+ className: "font-medium text-foreground",
322
+ children: t(c.analytics.trends.averageDailyUsage, 1)
323
+ })] }), c.analytics.trends.growthRate !== void 0 && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("span", {
324
+ className: "text-muted-foreground",
325
+ children: "Growth: "
326
+ }), /* @__PURE__ */ m("span", {
327
+ className: `font-medium ${c.analytics.trends.growthRate > 0 ? "text-status-error-text" : "text-status-success-text"}`,
328
+ children: [c.analytics.trends.growthRate > 0 ? "+" : "", n(c.analytics.trends.growthRate)]
329
+ })] })]
330
+ })
331
+ ]
332
+ });
333
+ };
334
+ //#endregion
335
+ export { g as QuotaPage };
336
+
337
+ //# sourceMappingURL=QuotaPage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuotaPage.js","names":[],"sources":["../../../../../src/billing/modules/quota/pages/QuotaPage.tsx"],"sourcesContent":["/**\n * Quota Module - Quota Page\n * Displays quota assignments and usage summary\n */\n\nimport { useState, type FC } from 'react';\nimport {\n useBillingAccountQuotasSummary,\n useQuotaAssignmentsWithAnalytics,\n} from '../hooks/useQuota';\nimport { useDefaultBillingAccount } from '../../subscriptions/hooks';\nimport { useBillingPermissions } from '../../../hooks/useBillingPermissions';\nimport {\n formatPercentage,\n formatNumber,\n formatDate,\n formatQuotaStatus,\n} from '../../../shared/utils/format';\nimport {\n getQuotaStatusColor,\n getStatusBadgeClasses,\n getQuotaProgressColor,\n getQuotaProgressBgColor,\n} from '../../../shared/utils/status';\nimport type { QuotaAssignmentWithAnalytics, QuotaStatus } from '../../../shared/types';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\n\ntype FilterStatus = 'all' | QuotaStatus;\n\nexport const QuotaPage: FC = () => {\n const { t } = useI18n();\n const tr = (key: string, fallback: string): string => {\n const translated = t(key);\n return translated === key ? fallback : translated;\n };\n const permissions = useBillingPermissions();\n const { billingAccount, isLoading: isLoadingAccount } = useDefaultBillingAccount();\n\n const [filterStatus, setFilterStatus] = useState<FilterStatus>('all');\n const [searchQuery, setSearchQuery] = useState('');\n const [page, setPage] = useState(1);\n\n const { summary, isLoading: isLoadingSummary } = useBillingAccountQuotasSummary(\n billingAccount?.id\n );\n\n const {\n quotaAssignments,\n pagination,\n isLoading: isLoadingQuotas,\n error,\n refetch,\n } = useQuotaAssignmentsWithAnalytics({\n billingAccountId: billingAccount?.id || '',\n page,\n pageSize: 10,\n searchQuery: searchQuery || undefined,\n status: filterStatus === 'all' ? undefined : [filterStatus],\n });\n\n // Permission check\n if (!permissions.canViewUsage) {\n return (\n <div className=\"flex items-center justify-center h-full min-h-[400px]\">\n <div className=\"text-center space-y-2\">\n <div className=\"w-12 h-12 mx-auto rounded-full bg-muted flex items-center justify-center\">\n <svg\n className=\"w-6 h-6 text-muted-foreground\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z\"\n />\n </svg>\n </div>\n <h2 className=\"text-lg font-semibold text-foreground\">Access Denied</h2>\n <p className=\"text-sm text-muted-foreground max-w-sm\">\n You don&apos;t have permission to view quotas.\n </p>\n </div>\n </div>\n );\n }\n\n const isLoading = isLoadingAccount || isLoadingSummary || isLoadingQuotas;\n\n // Loading state\n if (isLoading && !billingAccount) {\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"h-8 w-48 bg-muted animate-pulse rounded\" />\n <div className=\"grid grid-cols-1 sm:grid-cols-4 gap-4\">\n {[1, 2, 3, 4].map((i) => (\n <div key={i} className=\"border border-border rounded-lg p-4\">\n <div className=\"h-4 w-20 bg-muted animate-pulse rounded mb-2\" />\n <div className=\"h-8 w-16 bg-muted animate-pulse rounded\" />\n </div>\n ))}\n </div>\n </div>\n );\n }\n\n // Error state\n if (error) {\n return (\n <div className=\"flex items-center justify-center h-full min-h-[400px]\">\n <div className=\"text-center space-y-4\">\n <div className=\"w-12 h-12 mx-auto rounded-full bg-destructive/10 flex items-center justify-center\">\n <svg\n className=\"w-6 h-6 text-destructive\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z\"\n />\n </svg>\n </div>\n <h2 className=\"text-lg font-semibold text-foreground\">\n {tr('billing.quota.failedToLoad', 'Failed to load quotas')}\n </h2>\n <p className=\"text-sm text-muted-foreground\">{error.message}</p>\n <button\n onClick={() => refetch()}\n className=\"px-4 py-2 text-sm font-medium bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors\"\n >\n Try Again\n </button>\n </div>\n </div>\n );\n }\n\n const allQuotas = [...(summary?.pooledQuotas || []), ...(summary?.subscriptionQuotas || [])];\n const healthyCount = allQuotas.filter((q) => q.usagePercentage < 75).length;\n const warningCount = allQuotas.filter(\n (q) => q.usagePercentage >= 75 && q.usagePercentage < 90\n ).length;\n const criticalCount = allQuotas.filter(\n (q) => q.usagePercentage >= 90 && q.usagePercentage < 100\n ).length;\n const exhaustedCount = allQuotas.filter((q) => q.usagePercentage >= 100).length;\n\n return (\n <div className=\"space-y-6 p-6\">\n {/* Header */}\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div>\n <h1 className=\"text-2xl font-bold text-foreground\">\n {tr('billing.quota.title', 'Quotas')}\n </h1>\n <p className=\"text-sm text-muted-foreground mt-1\">\n Monitor your quota allocations and usage\n </p>\n </div>\n </div>\n\n {/* Summary Cards */}\n <div className=\"grid grid-cols-2 sm:grid-cols-4 gap-4\">\n <div className=\"border border-border rounded-lg bg-status-success-bg-subtle p-4\">\n <p className=\"text-sm text-status-success-text\">\n {tr('billing.quota.healthy', 'Healthy')}\n </p>\n <p className=\"text-2xl font-bold text-status-success-text mt-1\">{healthyCount}</p>\n </div>\n <div className=\"border border-border rounded-lg bg-status-warning-bg-subtle p-4\">\n <p className=\"text-sm text-status-warning-text\">Warning</p>\n <p className=\"text-2xl font-bold text-status-warning-text mt-1\">{warningCount}</p>\n </div>\n <div className=\"border border-border rounded-lg bg-status-error-bg-subtle p-4\">\n <p className=\"text-sm text-status-error-text\">Critical</p>\n <p className=\"text-2xl font-bold text-status-error-text mt-1\">{criticalCount}</p>\n </div>\n <div className=\"border border-border rounded-lg bg-bg-canvas p-4\">\n <p className=\"text-sm text-text-secondary\">Exhausted</p>\n <p className=\"text-2xl font-bold text-text-secondary mt-1\">{exhaustedCount}</p>\n </div>\n </div>\n\n {/* Filters */}\n <div className=\"flex flex-wrap items-center gap-4 pb-4 border-b border-border\">\n {/* Status Filter */}\n <div className=\"inline-flex rounded-lg border border-border p-1 bg-muted/50 flex-wrap\">\n {(['all', 'HEALTHY', 'WARNING', 'CRITICAL', 'EXHAUSTED'] as FilterStatus[]).map(\n (status) => (\n <button\n key={status}\n onClick={() => setFilterStatus(status)}\n className={`px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${\n filterStatus === status\n ? 'bg-background text-foreground shadow-sm'\n : 'text-muted-foreground hover:text-foreground'\n }`}\n >\n {status === 'all' ? 'All' : formatQuotaStatus(status as QuotaStatus)}\n </button>\n )\n )}\n </div>\n\n {/* Search */}\n <div className=\"relative flex-1 min-w-[200px] max-w-md\">\n <svg\n className=\"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z\"\n />\n </svg>\n <input\n type=\"text\"\n placeholder=\"Search quotas...\"\n value={searchQuery}\n onChange={(e) => setSearchQuery(e.target.value)}\n className=\"w-full pl-[3.25rem] pr-4 py-2 text-sm border border-border rounded-md bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent\"\n />\n </div>\n </div>\n\n {/* Quotas List */}\n {quotaAssignments.length === 0 ? (\n <div className=\"flex flex-col items-center justify-center py-12 border border-dashed border-border rounded-lg\">\n <div className=\"w-12 h-12 rounded-full bg-muted flex items-center justify-center mb-4\">\n <svg\n className=\"w-6 h-6 text-muted-foreground\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z\"\n />\n </svg>\n </div>\n <h3 className=\"text-lg font-medium text-foreground\">No quotas found</h3>\n <p className=\"text-sm text-muted-foreground mt-1\">\n {filterStatus !== 'all' || searchQuery\n ? 'No quotas match your filters.'\n : 'No quota assignments available.'}\n </p>\n </div>\n ) : (\n <div className=\"space-y-4\">\n {quotaAssignments.map((quota) => (\n <QuotaCard key={quota.id} quota={quota} />\n ))}\n\n {/* Pagination */}\n {pagination.totalPages > 1 && (\n <div className=\"flex items-center justify-center gap-2 pt-4\">\n <button\n onClick={() => setPage((p) => Math.max(1, p - 1))}\n disabled={page === 1}\n className=\"px-3 py-1.5 text-sm font-medium border border-border rounded-md disabled:opacity-50\"\n >\n Previous\n </button>\n <span className=\"text-sm text-muted-foreground\">\n Page {page} of {pagination.totalPages}\n </span>\n <button\n onClick={() => setPage((p) => Math.min(pagination.totalPages, p + 1))}\n disabled={page === pagination.totalPages}\n className=\"px-3 py-1.5 text-sm font-medium border border-border rounded-md disabled:opacity-50\"\n >\n Next\n </button>\n </div>\n )}\n </div>\n )}\n </div>\n );\n};\n\n// ============================================================================\n// Quota Card Component\n// ============================================================================\n\ninterface QuotaCardProps {\n quota: QuotaAssignmentWithAnalytics;\n}\n\nconst QuotaCard: FC<QuotaCardProps> = ({ quota }) => {\n const statusColor = getQuotaStatusColor(quota.status);\n const progressColor = getQuotaProgressColor(quota.usagePercentage);\n const progressBgColor = getQuotaProgressBgColor(quota.usagePercentage);\n const limits = quota.limits as { value?: number } | null;\n const limit = limits?.value || 0;\n\n return (\n <div className=\"border border-border rounded-lg bg-card p-6 hover:shadow-sm transition-shadow\">\n <div className=\"flex flex-col sm:flex-row sm:items-start gap-4\">\n {/* Info */}\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2 flex-wrap\">\n <h3 className=\"font-semibold text-foreground\">{quota.name}</h3>\n <span\n className={`px-2 py-0.5 text-xs font-medium rounded ${getStatusBadgeClasses(statusColor)}`}\n >\n {formatQuotaStatus(quota.status)}\n </span>\n <span className=\"px-2 py-0.5 text-xs font-medium bg-muted text-muted-foreground rounded\">\n {quota.quotaType}\n </span>\n </div>\n <p className=\"text-sm text-muted-foreground mt-1\">\n Expires: {formatDate(quota.endtime, 'short')}\n </p>\n </div>\n\n {/* Usage Stats */}\n <div className=\"text-right\">\n <p className=\"text-2xl font-bold text-foreground\">\n {formatNumber(quota.currentUsageSum)} / {limit > 0 ? formatNumber(limit) : '∞'}\n </p>\n <p className=\"text-sm text-muted-foreground\">\n {formatPercentage(quota.usagePercentage)} used\n </p>\n </div>\n </div>\n\n {/* Progress Bar */}\n <div className=\"mt-4\">\n <div className={`h-2 rounded-full overflow-hidden ${progressBgColor}`}>\n <div\n className={`h-full transition-all duration-500 ${progressColor}`}\n style={{ width: `${Math.min(100, quota.usagePercentage)}%` }}\n />\n </div>\n <div className=\"flex items-center justify-between mt-2 text-xs text-muted-foreground\">\n <span>{formatNumber(quota.limitLeft)} remaining</span>\n <span>{quota.totalUsageCount} usage records</span>\n </div>\n </div>\n\n {/* Analytics Preview */}\n {quota.analytics?.trends && (\n <div className=\"mt-4 pt-4 border-t border-border flex flex-wrap gap-4 text-sm\">\n {quota.analytics.trends.averageDailyUsage !== undefined && (\n <div>\n <span className=\"text-muted-foreground\">Avg. Daily: </span>\n <span className=\"font-medium text-foreground\">\n {formatNumber(quota.analytics.trends.averageDailyUsage, 1)}\n </span>\n </div>\n )}\n {quota.analytics.trends.growthRate !== undefined && (\n <div>\n <span className=\"text-muted-foreground\">Growth: </span>\n <span\n className={`font-medium ${quota.analytics.trends.growthRate > 0 ? 'text-status-error-text' : 'text-status-success-text'}`}\n >\n {quota.analytics.trends.growthRate > 0 ? '+' : ''}\n {formatPercentage(quota.analytics.trends.growthRate)}\n </span>\n </div>\n )}\n </div>\n )}\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;AA6BA,IAAa,UAAsB;CACjC,IAAM,EAAE,SAAM,GAAS,EACjB,KAAM,GAAa,MAA6B;EACpD,IAAM,IAAa,EAAE,EAAI;AACzB,SAAO,MAAe,IAAM,IAAW;IAEnC,IAAc,GAAuB,EACrC,EAAE,mBAAgB,WAAW,MAAqB,GAA0B,EAE5E,CAAC,GAAc,KAAmB,EAAuB,MAAM,EAC/D,CAAC,GAAa,KAAkB,EAAS,GAAG,EAC5C,CAAC,GAAM,KAAW,EAAS,EAAE,EAE7B,EAAE,YAAS,WAAW,MAAqB,EAC/C,GAAgB,GACjB,EAEK,EACJ,qBACA,eACA,WAAW,GACX,UACA,eACE,EAAiC;EACnC,kBAAkB,GAAgB,MAAM;EACxC;EACA,UAAU;EACV,aAAa,KAAe,KAAA;EAC5B,QAAQ,MAAiB,QAAQ,KAAA,IAAY,CAAC,EAAa;EAC5D,CAAC;AAGF,KAAI,CAAC,EAAY,aACf,QACE,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,OAAD;GAAK,WAAU;aAAf;IACE,kBAAC,OAAD;KAAK,WAAU;eACb,kBAAC,OAAD;MACE,WAAU;MACV,MAAK;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