@burdenoff/microfe-billing 2026.1113.1 → 2026.1113.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/billing/BillingRoot.js +83 -77
- package/dist/billing/BillingRoot.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js +78 -78
- package/dist/billing/modules/addons/pages/AddonCreatePage.js +70 -70
- package/dist/billing/modules/addons/pages/AddonDetailPage.js +72 -72
- package/dist/billing/modules/addons/pages/AddonEditPage.js +79 -79
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +224 -224
- package/dist/billing/modules/addons/pages/AddonsListPage.js +186 -186
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +168 -168
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js +88 -88
- package/dist/billing/modules/billing/hooks/index.js +5 -5
- package/dist/billing/modules/billing/hooks/useInvoices.js +39 -20
- package/dist/billing/modules/billing/hooks/useInvoices.js.map +1 -1
- package/dist/billing/modules/billing/index.js +14 -14
- package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.js +92 -92
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +160 -160
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoicesListPage.js +100 -100
- package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.js +105 -105
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +37 -37
- package/dist/billing/modules/billing/pages/RefundIssueLogsPage.js +41 -41
- package/dist/billing/modules/billing/pages/RefundsPage.js +334 -334
- package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/TransactionsPage.js +174 -174
- package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/UserRefundsPage.js +24 -24
- package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
- package/dist/billing/modules/checkout/components/OrderSummary.js +71 -71
- package/dist/billing/modules/checkout/pages/CheckoutPage.js +646 -625
- package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -1
- package/dist/billing/modules/checkout/utils/checkoutOptions.d.ts +23 -0
- package/dist/billing/modules/checkout/utils/checkoutOptions.js +8 -0
- package/dist/billing/modules/checkout/utils/checkoutOptions.js.map +1 -0
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js +112 -112
- package/dist/billing/modules/coupons/pages/CouponsListPage.js +118 -118
- package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js +119 -119
- package/dist/billing/modules/coupons/pages/EditCouponPage.js +82 -82
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js +30 -30
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +77 -77
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +144 -144
- package/dist/billing/modules/credits/pages/CreditsPage.js +67 -67
- package/dist/billing/modules/dashboard/pages/OverviewPage.js +594 -442
- package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
- package/dist/billing/modules/dashboard/utils/overviewSummary.d.ts +46 -0
- package/dist/billing/modules/dashboard/utils/overviewSummary.js +37 -0
- package/dist/billing/modules/dashboard/utils/overviewSummary.js.map +1 -0
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js +199 -199
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js +64 -64
- package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js +122 -122
- package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/EarningsPage.js +102 -102
- package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +178 -178
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutsPage.js +107 -107
- package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +54 -54
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +94 -94
- package/dist/billing/modules/plans/pages/PlanCreatePage.js +73 -73
- package/dist/billing/modules/plans/pages/PlanDetailPage.js +96 -96
- package/dist/billing/modules/plans/pages/PlanEditPage.js +16 -16
- package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js +143 -143
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlansListPage.js +88 -88
- package/dist/billing/modules/plans/utils/planAction.d.ts +9 -0
- package/dist/billing/modules/plans/utils/planAction.js +4 -1
- package/dist/billing/modules/plans/utils/planAction.js.map +1 -1
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +60 -60
- package/dist/billing/modules/promotions/pages/PromotionsListPage.js +37 -37
- package/dist/billing/modules/quota/pages/QuotaAssignFreePage.js +62 -62
- package/dist/billing/modules/quota/pages/QuotaPage.js +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +69 -69
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +76 -76
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +80 -80
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +95 -95
- package/dist/billing/modules/settings/pages/SettingsPage.js +134 -134
- package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +62 -62
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js +36 -36
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +534 -410
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +111 -111
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js +166 -160
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.d.ts +30 -0
- package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.js +20 -0
- package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.js.map +1 -0
- package/dist/billing/modules/subscriptions/utils/upgradeAccess.d.ts +10 -0
- package/dist/billing/modules/subscriptions/utils/upgradeAccess.js +7 -0
- package/dist/billing/modules/subscriptions/utils/upgradeAccess.js.map +1 -0
- package/dist/billing/modules/usage/pages/UsagePage.js +722 -591
- package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
- package/dist/billing/modules/usage/utils/usageHealth.d.ts +63 -0
- package/dist/billing/modules/usage/utils/usageHealth.js +43 -0
- package/dist/billing/modules/usage/utils/usageHealth.js.map +1 -0
- package/dist/billing/shared/components/EmptyState.js +3 -3
- package/dist/billing/shared/components/MoneyActionDialog.js +12 -12
- package/dist/billing/shared/ui/MetricCard.js +13 -13
- package/dist/billing/shared/utils/format.js +16 -4
- package/dist/billing/shared/utils/format.js.map +1 -1
- package/dist/billing/shared/utils/index.js +8 -8
- package/dist/generated/global-operations.js +294 -286
- package/dist/generated/global-operations.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,18 +1,37 @@
|
|
|
1
|
-
import { GetInvoicesDocument as e, GetPaginatedInvoicesDocument as t, GetTransactionsByBillingAccountDocument as n, useGenerateInvoiceMutation as r, useGetInvoiceQuery as i,
|
|
2
|
-
import { useCallback as
|
|
3
|
-
import { useApolloClient as
|
|
1
|
+
import { GetInvoicesDocument as e, GetPaginatedInvoicesDocument as t, GetTransactionsByBillingAccountDocument as n, useGenerateInvoiceMutation as r, useGetInvoiceQuery as i, useGetInvoicesQuery as a, useGetPaginatedInvoicesQuery as o, usePayInvoiceMutation as s, useRetryInvoiceGenerationMutation as c, useVoidInvoiceMutation as l } from "../../../../generated/global-operations.js";
|
|
2
|
+
import { useCallback as u, useMemo as d } from "react";
|
|
3
|
+
import { useApolloClient as f } from "@apollo/client/react";
|
|
4
4
|
// src/billing/modules/billing/hooks/useInvoices.ts
|
|
5
|
-
function
|
|
6
|
-
let { status: t, billingAccountId: n
|
|
5
|
+
function p(e = {}) {
|
|
6
|
+
let { status: t, billingAccountId: n } = e, { data: r, loading: i, error: o, refetch: s } = a({
|
|
7
|
+
variables: {
|
|
8
|
+
status: t,
|
|
9
|
+
billingAccountId: n
|
|
10
|
+
},
|
|
11
|
+
fetchPolicy: "cache-and-network"
|
|
12
|
+
}), c = d(() => r?.getInvoices || [], [r?.getInvoices]);
|
|
13
|
+
return {
|
|
14
|
+
invoices: c,
|
|
15
|
+
openInvoices: d(() => c.filter((e) => e.status === "OPEN"), [c]),
|
|
16
|
+
paidInvoices: d(() => c.filter((e) => e.status === "PAID"), [c]),
|
|
17
|
+
isLoading: i,
|
|
18
|
+
error: o,
|
|
19
|
+
refetch: u(async () => {
|
|
20
|
+
await s();
|
|
21
|
+
}, [s])
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function m(e = {}) {
|
|
25
|
+
let { status: t, billingAccountId: n, page: r = 1, pageSize: i = 20, search: a } = e, { data: s, loading: c, error: l, refetch: d } = o({
|
|
7
26
|
variables: {
|
|
8
27
|
status: t,
|
|
9
28
|
billingAccountId: n,
|
|
10
29
|
page: r,
|
|
11
30
|
pageSize: i,
|
|
12
|
-
search:
|
|
31
|
+
search: a || void 0
|
|
13
32
|
},
|
|
14
33
|
fetchPolicy: "cache-and-network"
|
|
15
|
-
}), f =
|
|
34
|
+
}), f = u(async () => {
|
|
16
35
|
await d();
|
|
17
36
|
}, [d]);
|
|
18
37
|
return {
|
|
@@ -23,11 +42,11 @@ function d(e = {}) {
|
|
|
23
42
|
pageSize: s?.getPaginatedInvoices?.pageSize || i,
|
|
24
43
|
totalPages: s?.getPaginatedInvoices?.totalPages || 0,
|
|
25
44
|
isLoading: c,
|
|
26
|
-
error:
|
|
45
|
+
error: l,
|
|
27
46
|
refetch: f
|
|
28
47
|
};
|
|
29
48
|
}
|
|
30
|
-
function
|
|
49
|
+
function h(e, t) {
|
|
31
50
|
let { data: n, loading: r, error: a, refetch: o } = i({
|
|
32
51
|
variables: {
|
|
33
52
|
id: e,
|
|
@@ -35,7 +54,7 @@ function f(e, t) {
|
|
|
35
54
|
},
|
|
36
55
|
skip: !e || !t,
|
|
37
56
|
fetchPolicy: "cache-and-network"
|
|
38
|
-
}), s =
|
|
57
|
+
}), s = u(async () => {
|
|
39
58
|
await o();
|
|
40
59
|
}, [o]);
|
|
41
60
|
return {
|
|
@@ -45,10 +64,10 @@ function f(e, t) {
|
|
|
45
64
|
refetch: s
|
|
46
65
|
};
|
|
47
66
|
}
|
|
48
|
-
function
|
|
49
|
-
let i =
|
|
67
|
+
function g() {
|
|
68
|
+
let i = f(), [a, { loading: o }] = r(), [d, { loading: p }] = s(), [m, { loading: h }] = l(), [g, { loading: _ }] = c();
|
|
50
69
|
return {
|
|
51
|
-
generateInvoice:
|
|
70
|
+
generateInvoice: u(async (n, r) => {
|
|
52
71
|
try {
|
|
53
72
|
let { data: o } = await a({ variables: {
|
|
54
73
|
subscriptionId: n,
|
|
@@ -59,9 +78,9 @@ function p() {
|
|
|
59
78
|
throw console.error("Failed to generate invoice:", e), e;
|
|
60
79
|
}
|
|
61
80
|
}, [a, i]),
|
|
62
|
-
payInvoice:
|
|
81
|
+
payInvoice: u(async (n, r, a) => {
|
|
63
82
|
try {
|
|
64
|
-
let { data: o } = await
|
|
83
|
+
let { data: o } = await d({ variables: {
|
|
65
84
|
invoiceId: n,
|
|
66
85
|
paymentMethodId: r,
|
|
67
86
|
billingAccountId: a
|
|
@@ -70,8 +89,8 @@ function p() {
|
|
|
70
89
|
} catch (e) {
|
|
71
90
|
throw console.error("Failed to pay invoice:", e), e;
|
|
72
91
|
}
|
|
73
|
-
}, [
|
|
74
|
-
voidInvoice:
|
|
92
|
+
}, [d, i]),
|
|
93
|
+
voidInvoice: u(async (n, r) => {
|
|
75
94
|
try {
|
|
76
95
|
let { data: a } = await m({ variables: {
|
|
77
96
|
invoiceId: n,
|
|
@@ -82,7 +101,7 @@ function p() {
|
|
|
82
101
|
throw console.error("Failed to void invoice:", e), e;
|
|
83
102
|
}
|
|
84
103
|
}, [m, i]),
|
|
85
|
-
retryInvoiceGeneration:
|
|
104
|
+
retryInvoiceGeneration: u(async (r, a) => {
|
|
86
105
|
try {
|
|
87
106
|
let { data: o } = await g({ variables: {
|
|
88
107
|
transactionId: r,
|
|
@@ -97,12 +116,12 @@ function p() {
|
|
|
97
116
|
throw console.error("Failed to retry invoice generation:", e), e;
|
|
98
117
|
}
|
|
99
118
|
}, [g, i]),
|
|
100
|
-
isGenerating:
|
|
119
|
+
isGenerating: o,
|
|
101
120
|
isPaying: p,
|
|
102
121
|
isVoiding: h,
|
|
103
122
|
isRetrying: _
|
|
104
123
|
};
|
|
105
124
|
}
|
|
106
|
-
export {
|
|
125
|
+
export { h as useInvoice, g as useInvoiceMutations, p as useInvoices, m as usePaginatedInvoices };
|
|
107
126
|
|
|
108
127
|
//# sourceMappingURL=useInvoices.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInvoices.js","names":["usePaginatedInvoices","options","useGetPaginatedInvoicesQuery","search","handleRefetch","useCallback","refetch","data","pageSize","loading","useInvoice","useGetInvoiceQuery","id","billingAccountId","useInvoiceMutations","client","useApolloClient","generateInvoiceMutation","isGenerating","useGenerateInvoiceMutation","payInvoiceMutation","isPaying","usePayInvoiceMutation","voidInvoiceMutation","isVoiding","useVoidInvoiceMutation","retryInvoiceGenerationMutation","isRetrying","useRetryInvoiceGenerationMutation","GetInvoicesDocument","GetPaginatedInvoicesDocument","error","GetTransactionsByBillingAccountDocument"],"sources":["../../../../../src/billing/modules/billing/hooks/useInvoices.ts"],"sourcesContent":["/**\n * Billing Module - useInvoices Hook\n * Provides access to invoice data and mutations\n */\n\nimport { useApolloClient } from '@apollo/client/react';\nimport { useCallback, useMemo } from 'react';\nimport {\n useGetInvoicesQuery,\n useGetInvoiceQuery,\n useGetInvoiceByNumberQuery,\n useGenerateInvoiceMutation,\n usePayInvoiceMutation,\n useVoidInvoiceMutation,\n useRetryInvoiceGenerationMutation,\n GetInvoicesDocument,\n GetPaginatedInvoicesDocument,\n GetTransactionsByBillingAccountDocument,\n useGetPaginatedInvoicesQuery,\n} from '../../../../generated/global-operations';\nimport type { Invoice, InvoiceStatus } from '../../../shared/types';\n\ninterface UseInvoicesOptions {\n status?: InvoiceStatus;\n billingAccountId?: string;\n}\n\ninterface UseInvoicesResult {\n invoices: Invoice[];\n openInvoices: Invoice[];\n paidInvoices: Invoice[];\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n}\n\ninterface UsePaginatedInvoicesOptions {\n status?: InvoiceStatus;\n billingAccountId?: string;\n page?: number;\n pageSize?: number;\n search?: string;\n}\n\ninterface UsePaginatedInvoicesResult {\n invoices: Invoice[];\n totalCount: number;\n hasMore: boolean;\n page: number;\n pageSize: number;\n totalPages: number;\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n}\n\ninterface UseInvoiceResult {\n invoice: Invoice | null;\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n}\n\ninterface UseInvoiceMutationsResult {\n generateInvoice: (subscriptionId: string, billingAccountId: string) => Promise<Invoice>;\n payInvoice: (\n invoiceId: string,\n paymentMethodId: string,\n billingAccountId: string\n ) => Promise<Invoice>;\n voidInvoice: (invoiceId: string, billingAccountId: string) => Promise<Invoice>;\n /**\n * Retry invoice generation for a successful transaction that never got an\n * invoice recorded (a transient Zoho Books/Stripe Invoicing failure at\n * payment time). transactionId comes from getTransactionsByBillingAccount\n * / getTransaction — these transactions never appear in the invoice list,\n * which only shows transactions that already have one.\n */\n retryInvoiceGeneration: (transactionId: string, billingAccountId: string) => Promise<Invoice>;\n isGenerating: boolean;\n isPaying: boolean;\n isVoiding: boolean;\n isRetrying: boolean;\n}\n\n/**\n * Hook for fetching invoices\n */\nexport function useInvoices(options: UseInvoicesOptions = {}): UseInvoicesResult {\n const { status, billingAccountId } = options;\n\n const { data, loading, error, refetch } = useGetInvoicesQuery({\n variables: { status, billingAccountId },\n fetchPolicy: 'cache-and-network',\n });\n\n const invoices = useMemo<Invoice[]>(() => data?.getInvoices || [], [data?.getInvoices]);\n\n const openInvoices = useMemo(() => {\n return invoices.filter((inv) => inv.status === ('OPEN' as InvoiceStatus));\n }, [invoices]);\n\n const paidInvoices = useMemo(() => {\n return invoices.filter((inv) => inv.status === ('PAID' as InvoiceStatus));\n }, [invoices]);\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n return {\n invoices,\n openInvoices,\n paidInvoices,\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for fetching paginated invoices\n */\nexport function usePaginatedInvoices(\n options: UsePaginatedInvoicesOptions = {}\n): UsePaginatedInvoicesResult {\n const { status, billingAccountId, page = 1, pageSize = 20, search } = options;\n\n const { data, loading, error, refetch } = useGetPaginatedInvoicesQuery({\n variables: { status, billingAccountId, page, pageSize, search: search || undefined },\n fetchPolicy: 'cache-and-network',\n });\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n return {\n invoices: data?.getPaginatedInvoices?.invoices || [],\n totalCount: data?.getPaginatedInvoices?.totalCount || 0,\n hasMore: data?.getPaginatedInvoices?.hasMore || false,\n page: data?.getPaginatedInvoices?.page || 1,\n pageSize: data?.getPaginatedInvoices?.pageSize || pageSize,\n totalPages: data?.getPaginatedInvoices?.totalPages || 0,\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for fetching a single invoice by ID\n */\nexport function useInvoice(\n id: string | undefined,\n billingAccountId: string | undefined\n): UseInvoiceResult {\n const { data, loading, error, refetch } = useGetInvoiceQuery({\n variables: { id: id!, billingAccountId: billingAccountId! },\n skip: !id || !billingAccountId,\n fetchPolicy: 'cache-and-network',\n });\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n return {\n invoice: data?.getInvoice || null,\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for fetching an invoice by number\n */\nexport function useInvoiceByNumber(\n invoiceNumber: string | undefined,\n billingAccountId: string | undefined\n): UseInvoiceResult {\n const { data, loading, error, refetch } = useGetInvoiceByNumberQuery({\n variables: { invoiceNumber: invoiceNumber!, billingAccountId: billingAccountId! },\n skip: !invoiceNumber || !billingAccountId,\n fetchPolicy: 'cache-and-network',\n });\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n return {\n invoice: data?.getInvoiceByNumber || null,\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for invoice mutations\n */\nexport function useInvoiceMutations(): UseInvoiceMutationsResult {\n const client = useApolloClient();\n\n const [generateInvoiceMutation, { loading: isGenerating }] = useGenerateInvoiceMutation();\n const [payInvoiceMutation, { loading: isPaying }] = usePayInvoiceMutation();\n const [voidInvoiceMutation, { loading: isVoiding }] = useVoidInvoiceMutation();\n const [retryInvoiceGenerationMutation, { loading: isRetrying }] =\n useRetryInvoiceGenerationMutation();\n\n const generateInvoice = useCallback(\n async (subscriptionId: string, billingAccountId: string): Promise<Invoice> => {\n try {\n const { data } = await generateInvoiceMutation({\n variables: { subscriptionId, billingAccountId },\n });\n await client.refetchQueries({\n include: [GetInvoicesDocument, GetPaginatedInvoicesDocument],\n });\n return data!.generateInvoice;\n } catch (error) {\n console.error('Failed to generate invoice:', error);\n throw error;\n }\n },\n [generateInvoiceMutation, client]\n );\n\n const payInvoice = useCallback(\n async (\n invoiceId: string,\n paymentMethodId: string,\n billingAccountId: string\n ): Promise<Invoice> => {\n try {\n const { data } = await payInvoiceMutation({\n variables: { invoiceId, paymentMethodId, billingAccountId },\n });\n await client.refetchQueries({\n include: [GetInvoicesDocument, GetPaginatedInvoicesDocument],\n });\n return data!.payInvoice;\n } catch (error) {\n console.error('Failed to pay invoice:', error);\n throw error;\n }\n },\n [payInvoiceMutation, client]\n );\n\n const voidInvoice = useCallback(\n async (invoiceId: string, billingAccountId: string): Promise<Invoice> => {\n try {\n const { data } = await voidInvoiceMutation({\n variables: { invoiceId, billingAccountId },\n });\n await client.refetchQueries({\n include: [GetInvoicesDocument, GetPaginatedInvoicesDocument],\n });\n return data!.voidInvoice;\n } catch (error) {\n console.error('Failed to void invoice:', error);\n throw error;\n }\n },\n [voidInvoiceMutation, client]\n );\n\n const retryInvoiceGeneration = useCallback(\n async (transactionId: string, billingAccountId: string): Promise<Invoice> => {\n try {\n const { data } = await retryInvoiceGenerationMutation({\n variables: { transactionId, billingAccountId },\n });\n // The transaction moves from \"no invoice yet\" to \"has an invoice\" —\n // refetch both the invoice list (it'll now include this one) and the\n // transactions list (its missing-invoice indicator should clear).\n await client.refetchQueries({\n include: [\n GetInvoicesDocument,\n GetPaginatedInvoicesDocument,\n GetTransactionsByBillingAccountDocument,\n ],\n });\n return data!.retryInvoiceGeneration;\n } catch (error) {\n console.error('Failed to retry invoice generation:', error);\n throw error;\n }\n },\n [retryInvoiceGenerationMutation, client]\n );\n\n return {\n generateInvoice,\n payInvoice,\n voidInvoice,\n retryInvoiceGeneration,\n isGenerating,\n isPaying,\n isVoiding,\n isRetrying,\n };\n}\n"],"mappings":";;;;AA2HA,SAAgBA,EACd,IAAuC,CAAC,GACZ;CAC5B,IAAM,EAAE,WAAQ,qBAAkB,UAAO,GAAG,cAAW,IAAI,cAAWC,GAEhE,EAAE,SAAM,YAAS,UAAO,eAAYC,EAA6B;EACrE,WAAW;GAAE;GAAQ;GAAkB;GAA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AAQ,MAAM,+BAA+BA,CAAK,GAC5CA;GACR;EACF,GACA,CAACd,GAAyBF,CAAM,CAqEhC;EACA,YAnEiBV,EACjB,OACE,GACA,GACA,MACqB;GACrB,IAAI;IACF,IAAM,EAAE,YAAS,MAAMe,EAAmB,EACxC,WAAW;KAAE;KAAW;KAAiB;IAAiB,EAC5D,CAAC;IAID,OAHA,MAAML,EAAO,eAAe,EAC1B,SAAS,CAACc,GAAqBC,CAA4B,EAC7D,CAAC,GACMvB,EAAM;GACf,SAASwB,GAAO;IAEd,MADA,QAAQ,MAAM,0BAA0BA,CAAK,GACvCA;GACR;EACF,GACA,CAACX,GAAoBL,CAAM,CAgD3B;EACA,aA9CkBV,EAClB,OAAO,GAAmB,MAA+C;GACvE,IAAI;IACF,IAAM,EAAE,YAAS,MAAMkB,EAAoB,EACzC,WAAW;KAAE;KAAW;IAAiB,EAC3C,CAAC;IAID,OAHA,MAAMR,EAAO,eAAe,EAC1B,SAAS,CAACc,GAAqBC,CAA4B,EAC7D,CAAC,GACMvB,EAAM;GACf,SAASwB,GAAO;IAEd,MADA,QAAQ,MAAM,2BAA2BA,CAAK,GACxCA;GACR;EACF,GACA,CAACR,GAAqBR,CAAM,CA+B5B;EACA,wBA7B6BV,EAC7B,OAAO,GAAuB,MAA+C;GAC3E,IAAI;IACF,IAAM,EAAE,YAAS,MAAMqB,EAA+B,EACpD,WAAW;KAAE;KAAe;IAAiB,EAC/C,CAAC;IAWD,OAPA,MAAMX,EAAO,eAAe,EAC1B,SAAS;KACPc;KACAC;KACAE;IACF,EACF,CAAC,GACMzB,EAAM;GACf,SAASwB,GAAO;IAEd,MADA,QAAQ,MAAM,uCAAuCA,CAAK,GACpDA;GACR;EACF,GACA,CAACL,GAAgCX,CAAM,CAOvC;EACA;EACA;EACA;EACA;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"useInvoices.js","names":["useInvoices","options","useGetInvoicesQuery","invoices","useMemo","data","inv","loading","useCallback","refetch","usePaginatedInvoices","useGetPaginatedInvoicesQuery","search","handleRefetch","pageSize","useInvoice","useGetInvoiceQuery","id","billingAccountId","useInvoiceMutations","client","useApolloClient","generateInvoiceMutation","isGenerating","useGenerateInvoiceMutation","payInvoiceMutation","isPaying","usePayInvoiceMutation","voidInvoiceMutation","isVoiding","useVoidInvoiceMutation","retryInvoiceGenerationMutation","isRetrying","useRetryInvoiceGenerationMutation","GetInvoicesDocument","GetPaginatedInvoicesDocument","error","GetTransactionsByBillingAccountDocument"],"sources":["../../../../../src/billing/modules/billing/hooks/useInvoices.ts"],"sourcesContent":["/**\n * Billing Module - useInvoices Hook\n * Provides access to invoice data and mutations\n */\n\nimport { useApolloClient } from '@apollo/client/react';\nimport { useCallback, useMemo } from 'react';\nimport {\n useGetInvoicesQuery,\n useGetInvoiceQuery,\n useGetInvoiceByNumberQuery,\n useGenerateInvoiceMutation,\n usePayInvoiceMutation,\n useVoidInvoiceMutation,\n useRetryInvoiceGenerationMutation,\n GetInvoicesDocument,\n GetPaginatedInvoicesDocument,\n GetTransactionsByBillingAccountDocument,\n useGetPaginatedInvoicesQuery,\n} from '../../../../generated/global-operations';\nimport type { Invoice, InvoiceStatus } from '../../../shared/types';\n\ninterface UseInvoicesOptions {\n status?: InvoiceStatus;\n billingAccountId?: string;\n}\n\ninterface UseInvoicesResult {\n invoices: Invoice[];\n openInvoices: Invoice[];\n paidInvoices: Invoice[];\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n}\n\ninterface UsePaginatedInvoicesOptions {\n status?: InvoiceStatus;\n billingAccountId?: string;\n page?: number;\n pageSize?: number;\n search?: string;\n}\n\ninterface UsePaginatedInvoicesResult {\n invoices: Invoice[];\n totalCount: number;\n hasMore: boolean;\n page: number;\n pageSize: number;\n totalPages: number;\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n}\n\ninterface UseInvoiceResult {\n invoice: Invoice | null;\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n}\n\ninterface UseInvoiceMutationsResult {\n generateInvoice: (subscriptionId: string, billingAccountId: string) => Promise<Invoice>;\n payInvoice: (\n invoiceId: string,\n paymentMethodId: string,\n billingAccountId: string\n ) => Promise<Invoice>;\n voidInvoice: (invoiceId: string, billingAccountId: string) => Promise<Invoice>;\n /**\n * Retry invoice generation for a successful transaction that never got an\n * invoice recorded (a transient Zoho Books/Stripe Invoicing failure at\n * payment time). transactionId comes from getTransactionsByBillingAccount\n * / getTransaction — these transactions never appear in the invoice list,\n * which only shows transactions that already have one.\n */\n retryInvoiceGeneration: (transactionId: string, billingAccountId: string) => Promise<Invoice>;\n isGenerating: boolean;\n isPaying: boolean;\n isVoiding: boolean;\n isRetrying: boolean;\n}\n\n/**\n * Hook for fetching invoices\n */\nexport function useInvoices(options: UseInvoicesOptions = {}): UseInvoicesResult {\n const { status, billingAccountId } = options;\n\n const { data, loading, error, refetch } = useGetInvoicesQuery({\n variables: { status, billingAccountId },\n fetchPolicy: 'cache-and-network',\n });\n\n const invoices = useMemo<Invoice[]>(() => data?.getInvoices || [], [data?.getInvoices]);\n\n const openInvoices = useMemo(() => {\n return invoices.filter((inv) => inv.status === ('OPEN' as InvoiceStatus));\n }, [invoices]);\n\n const paidInvoices = useMemo(() => {\n return invoices.filter((inv) => inv.status === ('PAID' as InvoiceStatus));\n }, [invoices]);\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n return {\n invoices,\n openInvoices,\n paidInvoices,\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for fetching paginated invoices\n */\nexport function usePaginatedInvoices(\n options: UsePaginatedInvoicesOptions = {}\n): UsePaginatedInvoicesResult {\n const { status, billingAccountId, page = 1, pageSize = 20, search } = options;\n\n const { data, loading, error, refetch } = useGetPaginatedInvoicesQuery({\n variables: { status, billingAccountId, page, pageSize, search: search || undefined },\n fetchPolicy: 'cache-and-network',\n });\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n return {\n invoices: data?.getPaginatedInvoices?.invoices || [],\n totalCount: data?.getPaginatedInvoices?.totalCount || 0,\n hasMore: data?.getPaginatedInvoices?.hasMore || false,\n page: data?.getPaginatedInvoices?.page || 1,\n pageSize: data?.getPaginatedInvoices?.pageSize || pageSize,\n totalPages: data?.getPaginatedInvoices?.totalPages || 0,\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for fetching a single invoice by ID\n */\nexport function useInvoice(\n id: string | undefined,\n billingAccountId: string | undefined\n): UseInvoiceResult {\n const { data, loading, error, refetch } = useGetInvoiceQuery({\n variables: { id: id!, billingAccountId: billingAccountId! },\n skip: !id || !billingAccountId,\n fetchPolicy: 'cache-and-network',\n });\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n return {\n invoice: data?.getInvoice || null,\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for fetching an invoice by number\n */\nexport function useInvoiceByNumber(\n invoiceNumber: string | undefined,\n billingAccountId: string | undefined\n): UseInvoiceResult {\n const { data, loading, error, refetch } = useGetInvoiceByNumberQuery({\n variables: { invoiceNumber: invoiceNumber!, billingAccountId: billingAccountId! },\n skip: !invoiceNumber || !billingAccountId,\n fetchPolicy: 'cache-and-network',\n });\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n return {\n invoice: data?.getInvoiceByNumber || null,\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for invoice mutations\n */\nexport function useInvoiceMutations(): UseInvoiceMutationsResult {\n const client = useApolloClient();\n\n const [generateInvoiceMutation, { loading: isGenerating }] = useGenerateInvoiceMutation();\n const [payInvoiceMutation, { loading: isPaying }] = usePayInvoiceMutation();\n const [voidInvoiceMutation, { loading: isVoiding }] = useVoidInvoiceMutation();\n const [retryInvoiceGenerationMutation, { loading: isRetrying }] =\n useRetryInvoiceGenerationMutation();\n\n const generateInvoice = useCallback(\n async (subscriptionId: string, billingAccountId: string): Promise<Invoice> => {\n try {\n const { data } = await generateInvoiceMutation({\n variables: { subscriptionId, billingAccountId },\n });\n await client.refetchQueries({\n include: [GetInvoicesDocument, GetPaginatedInvoicesDocument],\n });\n return data!.generateInvoice;\n } catch (error) {\n console.error('Failed to generate invoice:', error);\n throw error;\n }\n },\n [generateInvoiceMutation, client]\n );\n\n const payInvoice = useCallback(\n async (\n invoiceId: string,\n paymentMethodId: string,\n billingAccountId: string\n ): Promise<Invoice> => {\n try {\n const { data } = await payInvoiceMutation({\n variables: { invoiceId, paymentMethodId, billingAccountId },\n });\n await client.refetchQueries({\n include: [GetInvoicesDocument, GetPaginatedInvoicesDocument],\n });\n return data!.payInvoice;\n } catch (error) {\n console.error('Failed to pay invoice:', error);\n throw error;\n }\n },\n [payInvoiceMutation, client]\n );\n\n const voidInvoice = useCallback(\n async (invoiceId: string, billingAccountId: string): Promise<Invoice> => {\n try {\n const { data } = await voidInvoiceMutation({\n variables: { invoiceId, billingAccountId },\n });\n await client.refetchQueries({\n include: [GetInvoicesDocument, GetPaginatedInvoicesDocument],\n });\n return data!.voidInvoice;\n } catch (error) {\n console.error('Failed to void invoice:', error);\n throw error;\n }\n },\n [voidInvoiceMutation, client]\n );\n\n const retryInvoiceGeneration = useCallback(\n async (transactionId: string, billingAccountId: string): Promise<Invoice> => {\n try {\n const { data } = await retryInvoiceGenerationMutation({\n variables: { transactionId, billingAccountId },\n });\n // The transaction moves from \"no invoice yet\" to \"has an invoice\" —\n // refetch both the invoice list (it'll now include this one) and the\n // transactions list (its missing-invoice indicator should clear).\n await client.refetchQueries({\n include: [\n GetInvoicesDocument,\n GetPaginatedInvoicesDocument,\n GetTransactionsByBillingAccountDocument,\n ],\n });\n return data!.retryInvoiceGeneration;\n } catch (error) {\n console.error('Failed to retry invoice generation:', error);\n throw error;\n }\n },\n [retryInvoiceGenerationMutation, client]\n );\n\n return {\n generateInvo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AoBL,CAAM,CAgD3B;EACA,aA9CkBZ,EAClB,OAAO,GAAmB,MAA+C;GACvE,IAAI;IACF,IAAM,EAAE,YAAS,MAAMoB,EAAoB,EACzC,WAAW;KAAE;KAAW;IAAiB,EAC3C,CAAC;IAID,OAHA,MAAMR,EAAO,eAAe,EAC1B,SAAS,CAACc,GAAqBC,CAA4B,EAC7D,CAAC,GACM9B,EAAM;GACf,SAAS+B,GAAO;IAEd,MADA,QAAQ,MAAM,2BAA2BA,CAAK,GACxCA;GACR;EACF,GACA,CAACR,GAAqBR,CAAM,CA+B5B;EACA,wBA7B6BZ,EAC7B,OAAO,GAAuB,MAA+C;GAC3E,IAAI;IACF,IAAM,EAAE,YAAS,MAAMuB,EAA+B,EACpD,WAAW;KAAE;KAAe;IAAiB,EAC/C,CAAC;IAWD,OAPA,MAAMX,EAAO,eAAe,EAC1B,SAAS;KACPc;KACAC;KACAE;IACF,EACF,CAAC,GACMhC,EAAM;GACf,SAAS+B,GAAO;IAEd,MADA,QAAQ,MAAM,uCAAuCA,CAAK,GACpDA;GACR;EACF,GACA,CAACL,GAAgCX,CAAM,CAOvC;EACA;EACA;EACA;EACA;CACF;AACF"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { useInvoiceMutations as e } from "./hooks/useInvoices.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { useBillingWebhookLogs as i, useRefundMutations as a, useRefundRecords as o, useRefunds as s } from "./hooks/useRefunds.js";
|
|
6
|
-
import { useOrderCallbackMutations as c, useOrderCallbacks as l } from "./hooks/useOrderCallbacks.js";
|
|
1
|
+
import { useInvoiceMutations as e, useInvoices as t } from "./hooks/useInvoices.js";
|
|
2
|
+
import { useTransactions as n } from "./hooks/useTransactions.js";
|
|
3
|
+
import { useBillingWebhookLogs as r, useRefundMutations as i, useRefundRecords as a, useRefunds as o } from "./hooks/useRefunds.js";
|
|
4
|
+
import { useOrderCallbackMutations as s, useOrderCallbacks as c } from "./hooks/useOrderCallbacks.js";
|
|
7
5
|
import "./pages/index.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
6
|
+
import { InvoicesListPage as l } from "./pages/InvoicesListPage.js";
|
|
7
|
+
import { InvoiceDetailPage as u } from "./pages/InvoiceDetailPage.js";
|
|
8
|
+
import { TransactionsPage as d } from "./pages/TransactionsPage.js";
|
|
9
|
+
import { PaymentMethodsPage as f } from "./pages/PaymentMethodsPage.js";
|
|
10
|
+
import { RefundsPage as p } from "./pages/RefundsPage.js";
|
|
11
|
+
import { RefundIssueLogsPage as m } from "./pages/RefundIssueLogsPage.js";
|
|
12
|
+
import { UserRefundsPage as h } from "./pages/UserRefundsPage.js";
|
|
13
|
+
import { BillingWebhookLogsPage as g } from "./pages/BillingWebhookLogsPage.js";
|
|
14
|
+
import { OrderCallbackLogsPage as _ } from "./pages/OrderCallbackLogsPage.js";
|
|
15
15
|
import "./hooks/index.js";
|
|
16
|
-
export {
|
|
16
|
+
export { g as BillingWebhookLogsPage, u as InvoiceDetailPage, l as InvoicesListPage, _ as OrderCallbackLogsPage, f as PaymentMethodsPage, m as RefundIssueLogsPage, p as RefundsPage, d as TransactionsPage, h as UserRefundsPage, r as useBillingWebhookLogs, e as useInvoiceMutations, t as useInvoices, s as useOrderCallbackMutations, c as useOrderCallbacks, i as useRefundMutations, a as useRefundRecords, o as useRefunds, n as useTransactions };
|