@burdenoff/microfe-billing 2026.903.2 → 2026.907.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/billing/BillingAdminRoutes.js +81 -68
- package/dist/billing/BillingAdminRoutes.js.map +1 -1
- package/dist/billing/modules/billing/hooks/useRefunds.js +89 -67
- package/dist/billing/modules/billing/hooks/useRefunds.js.map +1 -1
- package/dist/billing/modules/billing/index.js +2 -1
- package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.js +364 -0
- package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.js.map +1 -0
- package/dist/billing/modules/billing/pages/index.js +1 -0
- package/dist/generated/global-operations.js +367 -338
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
import { AccessDenied as e } from "../../../shared/components/AccessDenied.js";
|
|
2
|
+
import { PageHeader as t } from "../../../shared/components/PageHeader.js";
|
|
3
|
+
import { statusTokens as n } from "../../../shared/utils/tokens.js";
|
|
4
|
+
import { ServerError as r } from "../../../shared/components/ServerError.js";
|
|
5
|
+
import "../../../shared/components/index.js";
|
|
6
|
+
import { formatDateTime as i } from "../../../shared/utils/format.js";
|
|
7
|
+
import { isServerError as a } from "../../../shared/utils/error.js";
|
|
8
|
+
import "../../../shared/utils/index.js";
|
|
9
|
+
import { useBillingPermissions as o } from "../../../hooks/useBillingPermissions.js";
|
|
10
|
+
import { useBillingWebhookLogs as s, useRefundMutations as c } from "../hooks/useRefunds.js";
|
|
11
|
+
import "../hooks/index.js";
|
|
12
|
+
import { useState as l } from "react";
|
|
13
|
+
import { AlertTriangle as u, CheckCircle as d, ChevronLeft as f, ChevronRight as p, DollarSign as m, Eye as h, Loader2 as g, RefreshCw as _, X as v } from "lucide-react";
|
|
14
|
+
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
15
|
+
import { IllustratedEmptyState as x, ResponsiveTable as S } from "@burdenoff/fe-libs/ui";
|
|
16
|
+
//#region src/billing/modules/billing/pages/BillingWebhookLogsPage.tsx
|
|
17
|
+
var C = 25, w = ["stripe", "razorpay"], T = new Set([
|
|
18
|
+
"payment_intent.succeeded",
|
|
19
|
+
"charge.succeeded",
|
|
20
|
+
"payment.captured",
|
|
21
|
+
"order.paid"
|
|
22
|
+
]), E = (e) => e.processed ? {
|
|
23
|
+
label: "Processed",
|
|
24
|
+
className: `${n.success.bg} ${n.success.text}`,
|
|
25
|
+
icon: d
|
|
26
|
+
} : {
|
|
27
|
+
label: e.error ? "Failed" : "Pending",
|
|
28
|
+
className: `${n.error.bg} ${n.error.text}`,
|
|
29
|
+
icon: u
|
|
30
|
+
}, D = ({ log: e, onClose: t, onCreateRefund: n, isCreatingRefund: r, canCreateRefund: a }) => e ? /* @__PURE__ */ y("div", {
|
|
31
|
+
className: "fixed inset-0 z-50 flex items-center justify-center bg-bg-overlay p-4",
|
|
32
|
+
children: /* @__PURE__ */ b("div", {
|
|
33
|
+
className: "w-full max-w-2xl max-h-[85vh] overflow-y-auto rounded-lg bg-bg-surface border border-border-subtle shadow-[var(--shadow-elevation-2)]",
|
|
34
|
+
children: [/* @__PURE__ */ b("div", {
|
|
35
|
+
className: "flex items-center justify-between p-4 border-b border-border-subtle",
|
|
36
|
+
children: [/* @__PURE__ */ y("h3", {
|
|
37
|
+
className: "text-base font-semibold text-text-primary",
|
|
38
|
+
children: "Webhook log details"
|
|
39
|
+
}), /* @__PURE__ */ y("button", {
|
|
40
|
+
type: "button",
|
|
41
|
+
onClick: t,
|
|
42
|
+
className: "p-1 rounded text-text-muted hover:text-text-primary hover:bg-bg-sunken/50",
|
|
43
|
+
children: /* @__PURE__ */ y(v, { className: "size-4" })
|
|
44
|
+
})]
|
|
45
|
+
}), /* @__PURE__ */ b("div", {
|
|
46
|
+
className: "p-4 space-y-4",
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ b("div", {
|
|
49
|
+
className: "grid grid-cols-2 gap-4 text-sm",
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
52
|
+
className: "text-text-muted",
|
|
53
|
+
children: "Provider"
|
|
54
|
+
}), /* @__PURE__ */ y("p", {
|
|
55
|
+
className: "text-text-primary capitalize",
|
|
56
|
+
children: e.provider
|
|
57
|
+
})] }),
|
|
58
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
59
|
+
className: "text-text-muted",
|
|
60
|
+
children: "Event"
|
|
61
|
+
}), /* @__PURE__ */ y("p", {
|
|
62
|
+
className: "text-text-primary font-mono text-xs",
|
|
63
|
+
children: e.event
|
|
64
|
+
})] }),
|
|
65
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
66
|
+
className: "text-text-muted",
|
|
67
|
+
children: "Received"
|
|
68
|
+
}), /* @__PURE__ */ y("p", {
|
|
69
|
+
className: "text-text-primary",
|
|
70
|
+
children: i(e.createdAt)
|
|
71
|
+
})] }),
|
|
72
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
73
|
+
className: "text-text-muted",
|
|
74
|
+
children: "Processed"
|
|
75
|
+
}), /* @__PURE__ */ y("p", {
|
|
76
|
+
className: "text-text-primary",
|
|
77
|
+
children: e.processed ? "Yes" : "No"
|
|
78
|
+
})] })
|
|
79
|
+
]
|
|
80
|
+
}),
|
|
81
|
+
e.error && /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
82
|
+
className: "text-sm text-text-muted mb-1",
|
|
83
|
+
children: "Error"
|
|
84
|
+
}), /* @__PURE__ */ y("pre", {
|
|
85
|
+
className: "text-xs whitespace-pre-wrap p-3 rounded-md bg-status-error-bg-subtle text-status-error-text border border-status-error-border",
|
|
86
|
+
children: e.error
|
|
87
|
+
})] }),
|
|
88
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
89
|
+
className: "text-sm text-text-muted mb-1",
|
|
90
|
+
children: "Payload"
|
|
91
|
+
}), /* @__PURE__ */ y("pre", {
|
|
92
|
+
className: "text-xs whitespace-pre-wrap p-3 rounded-md bg-bg-sunken/60 text-text-secondary max-h-64 overflow-y-auto",
|
|
93
|
+
children: JSON.stringify(e.payload, null, 2)
|
|
94
|
+
})] }),
|
|
95
|
+
!e.processed && a && /* @__PURE__ */ b("button", {
|
|
96
|
+
type: "button",
|
|
97
|
+
onClick: () => n(e.id),
|
|
98
|
+
disabled: r,
|
|
99
|
+
className: "inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bgHover disabled:opacity-50",
|
|
100
|
+
children: [r ? /* @__PURE__ */ y(g, { className: "size-4 animate-spin" }) : /* @__PURE__ */ y(m, { className: "size-4" }), "Create refund from this webhook"]
|
|
101
|
+
})
|
|
102
|
+
]
|
|
103
|
+
})]
|
|
104
|
+
})
|
|
105
|
+
}) : null, O = () => {
|
|
106
|
+
let n = o(), [u, d] = l(0), [m, g] = l({}), [v, O] = l(null), { logs: k, totalCount: A, isLoading: j, error: M, refetch: N } = s(m, u, C), { createRefundRecordFromWebhook: P, isCreatingFromWebhook: F } = c();
|
|
107
|
+
if (!n.isBillingAdmin) return /* @__PURE__ */ y(e, { message: "You don't have permission to view billing webhook logs." });
|
|
108
|
+
if (M && a(M)) return /* @__PURE__ */ y("div", {
|
|
109
|
+
className: "p-6",
|
|
110
|
+
children: /* @__PURE__ */ y(r, {
|
|
111
|
+
title: "Server Unavailable",
|
|
112
|
+
message: "Unable to load webhook logs. The server might be down or experiencing issues.",
|
|
113
|
+
onRetry: () => N(),
|
|
114
|
+
showRetry: !0
|
|
115
|
+
})
|
|
116
|
+
});
|
|
117
|
+
let I = (e, t) => {
|
|
118
|
+
g((n) => ({
|
|
119
|
+
...n,
|
|
120
|
+
[e]: t
|
|
121
|
+
})), d(0);
|
|
122
|
+
}, L = async (e) => {
|
|
123
|
+
await P(e), O(null);
|
|
124
|
+
}, R = [
|
|
125
|
+
{
|
|
126
|
+
key: "date",
|
|
127
|
+
header: "Received",
|
|
128
|
+
priority: "primary",
|
|
129
|
+
cellClassName: "whitespace-nowrap",
|
|
130
|
+
cell: (e) => /* @__PURE__ */ b("div", {
|
|
131
|
+
className: "flex flex-col",
|
|
132
|
+
children: [/* @__PURE__ */ y("span", {
|
|
133
|
+
className: "text-sm text-text-primary",
|
|
134
|
+
children: i(e.createdAt).split(" ")[0]
|
|
135
|
+
}), /* @__PURE__ */ y("span", {
|
|
136
|
+
className: "text-xs text-text-muted",
|
|
137
|
+
children: i(e.createdAt).split(" ")[1]
|
|
138
|
+
})]
|
|
139
|
+
})
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
key: "status",
|
|
143
|
+
header: "Status",
|
|
144
|
+
cellClassName: "whitespace-nowrap",
|
|
145
|
+
cell: (e) => {
|
|
146
|
+
let t = E(e), n = t.icon;
|
|
147
|
+
return /* @__PURE__ */ b("span", {
|
|
148
|
+
className: `inline-flex items-center gap-1 px-2 py-0.5 text-xs font-medium rounded ${t.className}`,
|
|
149
|
+
children: [/* @__PURE__ */ y(n, { className: "size-3" }), t.label]
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
key: "provider",
|
|
155
|
+
header: "Provider",
|
|
156
|
+
priority: "hidden-on-mobile",
|
|
157
|
+
cellClassName: "whitespace-nowrap",
|
|
158
|
+
cell: (e) => /* @__PURE__ */ y("span", {
|
|
159
|
+
className: "text-sm text-text-primary capitalize",
|
|
160
|
+
children: e.provider
|
|
161
|
+
})
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
key: "event",
|
|
165
|
+
header: "Event",
|
|
166
|
+
cellClassName: "whitespace-nowrap max-w-[220px] truncate",
|
|
167
|
+
cell: (e) => /* @__PURE__ */ y("span", {
|
|
168
|
+
className: "text-sm font-mono text-text-muted",
|
|
169
|
+
children: e.event
|
|
170
|
+
})
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
key: "error",
|
|
174
|
+
header: "Error",
|
|
175
|
+
priority: "hidden-on-mobile",
|
|
176
|
+
cellClassName: "max-w-[280px] truncate",
|
|
177
|
+
cell: (e) => /* @__PURE__ */ y("span", {
|
|
178
|
+
className: "text-sm text-status-error-text",
|
|
179
|
+
children: e.error || "-"
|
|
180
|
+
})
|
|
181
|
+
}
|
|
182
|
+
], z = Math.max(1, Math.ceil(A / C));
|
|
183
|
+
return /* @__PURE__ */ b("div", {
|
|
184
|
+
className: "space-y-6 p-6",
|
|
185
|
+
children: [
|
|
186
|
+
/* @__PURE__ */ y(t, {
|
|
187
|
+
title: "Billing Webhook Logs",
|
|
188
|
+
description: "Every Stripe/Razorpay webhook delivery — investigate processing failures directly.",
|
|
189
|
+
actions: /* @__PURE__ */ b("button", {
|
|
190
|
+
type: "button",
|
|
191
|
+
onClick: () => N(),
|
|
192
|
+
className: "inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md border border-border-subtle bg-bg-surface hover:bg-bg-sunken/50",
|
|
193
|
+
children: [/* @__PURE__ */ y(_, { className: "size-4" }), "Refresh"]
|
|
194
|
+
})
|
|
195
|
+
}),
|
|
196
|
+
/* @__PURE__ */ b("div", {
|
|
197
|
+
className: "p-4 border border-border-subtle rounded-lg bg-bg-sunken/30 grid grid-cols-1 sm:grid-cols-3 gap-4",
|
|
198
|
+
children: [
|
|
199
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
200
|
+
className: "block text-sm font-medium mb-1",
|
|
201
|
+
children: "Processed"
|
|
202
|
+
}), /* @__PURE__ */ b("select", {
|
|
203
|
+
value: m.processed === void 0 ? "" : String(m.processed),
|
|
204
|
+
onChange: (e) => I("processed", e.target.value === "" ? void 0 : e.target.value === "true"),
|
|
205
|
+
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface",
|
|
206
|
+
children: [
|
|
207
|
+
/* @__PURE__ */ y("option", {
|
|
208
|
+
value: "",
|
|
209
|
+
children: "All"
|
|
210
|
+
}),
|
|
211
|
+
/* @__PURE__ */ y("option", {
|
|
212
|
+
value: "false",
|
|
213
|
+
children: "Unprocessed / Failed"
|
|
214
|
+
}),
|
|
215
|
+
/* @__PURE__ */ y("option", {
|
|
216
|
+
value: "true",
|
|
217
|
+
children: "Processed"
|
|
218
|
+
})
|
|
219
|
+
]
|
|
220
|
+
})] }),
|
|
221
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
222
|
+
className: "block text-sm font-medium mb-1",
|
|
223
|
+
children: "Provider"
|
|
224
|
+
}), /* @__PURE__ */ b("select", {
|
|
225
|
+
value: m.provider || "",
|
|
226
|
+
onChange: (e) => I("provider", e.target.value || void 0),
|
|
227
|
+
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface",
|
|
228
|
+
children: [/* @__PURE__ */ y("option", {
|
|
229
|
+
value: "",
|
|
230
|
+
children: "All Providers"
|
|
231
|
+
}), w.map((e) => /* @__PURE__ */ y("option", {
|
|
232
|
+
value: e,
|
|
233
|
+
children: e.charAt(0).toUpperCase() + e.slice(1)
|
|
234
|
+
}, e))]
|
|
235
|
+
})] }),
|
|
236
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
237
|
+
className: "block text-sm font-medium mb-1",
|
|
238
|
+
children: "Has Error"
|
|
239
|
+
}), /* @__PURE__ */ b("select", {
|
|
240
|
+
value: m.hasError === void 0 ? "" : String(m.hasError),
|
|
241
|
+
onChange: (e) => I("hasError", e.target.value === "" ? void 0 : e.target.value === "true"),
|
|
242
|
+
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface",
|
|
243
|
+
children: [
|
|
244
|
+
/* @__PURE__ */ y("option", {
|
|
245
|
+
value: "",
|
|
246
|
+
children: "All"
|
|
247
|
+
}),
|
|
248
|
+
/* @__PURE__ */ y("option", {
|
|
249
|
+
value: "true",
|
|
250
|
+
children: "Has error"
|
|
251
|
+
}),
|
|
252
|
+
/* @__PURE__ */ y("option", {
|
|
253
|
+
value: "false",
|
|
254
|
+
children: "No error"
|
|
255
|
+
})
|
|
256
|
+
]
|
|
257
|
+
})] })
|
|
258
|
+
]
|
|
259
|
+
}),
|
|
260
|
+
j && k.length === 0 ? /* @__PURE__ */ y("div", {
|
|
261
|
+
className: "space-y-2",
|
|
262
|
+
children: [
|
|
263
|
+
1,
|
|
264
|
+
2,
|
|
265
|
+
3,
|
|
266
|
+
4,
|
|
267
|
+
5
|
|
268
|
+
].map((e) => /* @__PURE__ */ y("div", { className: "h-16 bg-bg-sunken animate-pulse rounded" }, e))
|
|
269
|
+
}) : k.length === 0 ? /* @__PURE__ */ y(x, {
|
|
270
|
+
illustration: "empty-data",
|
|
271
|
+
title: "No webhook logs found",
|
|
272
|
+
description: "Nothing matches these filters — try widening them, or check back after the next payment."
|
|
273
|
+
}) : /* @__PURE__ */ y("div", {
|
|
274
|
+
className: "border border-border-subtle rounded-lg overflow-hidden",
|
|
275
|
+
children: /* @__PURE__ */ y(S, {
|
|
276
|
+
columns: R,
|
|
277
|
+
data: k,
|
|
278
|
+
rowKey: (e) => e.id,
|
|
279
|
+
rowActions: (e) => /* @__PURE__ */ b("button", {
|
|
280
|
+
type: "button",
|
|
281
|
+
onClick: () => O(e),
|
|
282
|
+
className: "inline-flex items-center gap-1.5 px-2 py-1 text-sm font-medium rounded-button text-text-secondary hover:text-text-primary hover:bg-bg-sunken/60 transition-colors",
|
|
283
|
+
children: [/* @__PURE__ */ y(h, { className: "size-4" }), /* @__PURE__ */ y("span", {
|
|
284
|
+
className: "hidden sm:inline",
|
|
285
|
+
children: "View"
|
|
286
|
+
})]
|
|
287
|
+
})
|
|
288
|
+
})
|
|
289
|
+
}),
|
|
290
|
+
A > 0 && /* @__PURE__ */ b("div", {
|
|
291
|
+
className: "flex flex-col sm:flex-row items-center justify-between gap-4 border-t border-border-subtle pt-4",
|
|
292
|
+
children: [/* @__PURE__ */ b("p", {
|
|
293
|
+
className: "text-sm text-text-muted text-center sm:text-left",
|
|
294
|
+
children: [
|
|
295
|
+
"Showing ",
|
|
296
|
+
u * C + 1,
|
|
297
|
+
" to ",
|
|
298
|
+
Math.min((u + 1) * C, A),
|
|
299
|
+
" of",
|
|
300
|
+
" ",
|
|
301
|
+
A,
|
|
302
|
+
" logs"
|
|
303
|
+
]
|
|
304
|
+
}), /* @__PURE__ */ b("div", {
|
|
305
|
+
className: "flex items-center gap-2",
|
|
306
|
+
children: [
|
|
307
|
+
/* @__PURE__ */ b("button", {
|
|
308
|
+
type: "button",
|
|
309
|
+
onClick: () => d((e) => Math.max(0, e - 1)),
|
|
310
|
+
disabled: u === 0,
|
|
311
|
+
className: "inline-flex items-center gap-1 px-3 py-1.5 text-sm font-medium rounded-button border border-border-subtle bg-bg-surface hover:bg-bg-sunken/50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
|
|
312
|
+
children: [/* @__PURE__ */ y(f, { className: "size-4" }), /* @__PURE__ */ y("span", {
|
|
313
|
+
className: "hidden sm:inline",
|
|
314
|
+
children: "Previous"
|
|
315
|
+
})]
|
|
316
|
+
}),
|
|
317
|
+
/* @__PURE__ */ b("span", {
|
|
318
|
+
className: "text-sm text-text-muted px-2",
|
|
319
|
+
children: [
|
|
320
|
+
/* @__PURE__ */ y("span", {
|
|
321
|
+
className: "hidden sm:inline",
|
|
322
|
+
children: "Page "
|
|
323
|
+
}),
|
|
324
|
+
u + 1,
|
|
325
|
+
" ",
|
|
326
|
+
/* @__PURE__ */ y("span", {
|
|
327
|
+
className: "hidden sm:inline",
|
|
328
|
+
children: "of"
|
|
329
|
+
}),
|
|
330
|
+
/* @__PURE__ */ y("span", {
|
|
331
|
+
className: "sm:hidden",
|
|
332
|
+
children: "/"
|
|
333
|
+
}),
|
|
334
|
+
" ",
|
|
335
|
+
z
|
|
336
|
+
]
|
|
337
|
+
}),
|
|
338
|
+
/* @__PURE__ */ b("button", {
|
|
339
|
+
type: "button",
|
|
340
|
+
onClick: () => d((e) => e + 1 < z ? e + 1 : e),
|
|
341
|
+
disabled: u + 1 >= z,
|
|
342
|
+
className: "inline-flex items-center gap-1 px-3 py-1.5 text-sm font-medium rounded-button border border-border-subtle bg-bg-surface hover:bg-bg-sunken/50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
|
|
343
|
+
children: [/* @__PURE__ */ y("span", {
|
|
344
|
+
className: "hidden sm:inline",
|
|
345
|
+
children: "Next"
|
|
346
|
+
}), /* @__PURE__ */ y(p, { className: "size-4" })]
|
|
347
|
+
})
|
|
348
|
+
]
|
|
349
|
+
})]
|
|
350
|
+
}),
|
|
351
|
+
/* @__PURE__ */ y(D, {
|
|
352
|
+
log: v,
|
|
353
|
+
onClose: () => O(null),
|
|
354
|
+
onCreateRefund: L,
|
|
355
|
+
isCreatingRefund: F,
|
|
356
|
+
canCreateRefund: v ? T.has(v.event) && !!v.error : !1
|
|
357
|
+
})
|
|
358
|
+
]
|
|
359
|
+
});
|
|
360
|
+
};
|
|
361
|
+
//#endregion
|
|
362
|
+
export { O as BillingWebhookLogsPage };
|
|
363
|
+
|
|
364
|
+
//# sourceMappingURL=BillingWebhookLogsPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BillingWebhookLogsPage.js","names":[],"sources":["../../../../../src/billing/modules/billing/pages/BillingWebhookLogsPage.tsx"],"sourcesContent":["/**\n * Billing Module - Billing Webhook Logs Page\n * Admin visibility into every Stripe/Razorpay webhook processing attempt —\n * not just the payment-succeeded subset eligible for automatic refund\n * creation (see RefundsPage's \"Import Failed Webhooks\" action). Lets whoever\n * owns billing ops see and investigate ANY webhook processing failure\n * without needing direct DB access.\n */\n\nimport { useState, type FC } from 'react';\nimport {\n RefreshCw,\n ChevronLeft,\n ChevronRight,\n CheckCircle,\n AlertTriangle,\n X,\n DollarSign,\n Loader2,\n Eye,\n} from 'lucide-react';\nimport { useBillingPermissions } from '../../../hooks/useBillingPermissions';\nimport {\n useBillingWebhookLogs,\n useRefundMutations,\n type BillingWebhookLogFilters,\n type WebhookLog,\n} from '../hooks';\nimport { AccessDenied, PageHeader, ServerError } from '../../../shared/components';\nimport { formatDateTime, isServerError } from '../../../shared/utils';\nimport { statusTokens } from '../../../shared/utils/tokens';\nimport {\n ResponsiveTable,\n type ResponsiveTableColumn,\n IllustratedEmptyState,\n} from '@burdenoff/fe-libs/ui';\n\nconst PAGE_SIZE = 25;\nconst PROVIDER_OPTIONS = ['stripe', 'razorpay'];\nconst REFUND_ELIGIBLE_EVENTS = new Set([\n 'payment_intent.succeeded',\n 'charge.succeeded',\n 'payment.captured',\n 'order.paid',\n]);\n\nconst getBadge = (\n log: WebhookLog\n): { label: string; className: string; icon: FC<{ className?: string }> } => {\n if (!log.processed) {\n return {\n label: log.error ? 'Failed' : 'Pending',\n className: `${statusTokens.error.bg} ${statusTokens.error.text}`,\n icon: AlertTriangle,\n };\n }\n return {\n label: 'Processed',\n className: `${statusTokens.success.bg} ${statusTokens.success.text}`,\n icon: CheckCircle,\n };\n};\n\nconst WebhookLogDetailModal: FC<{\n log: WebhookLog | null;\n onClose: () => void;\n onCreateRefund: (id: string) => void;\n isCreatingRefund: boolean;\n canCreateRefund: boolean;\n}> = ({ log, onClose, onCreateRefund, isCreatingRefund, canCreateRefund }) => {\n if (!log) return null;\n\n return (\n <div className=\"fixed inset-0 z-50 flex items-center justify-center bg-bg-overlay p-4\">\n <div className=\"w-full max-w-2xl max-h-[85vh] overflow-y-auto rounded-lg bg-bg-surface border border-border-subtle shadow-[var(--shadow-elevation-2)]\">\n <div className=\"flex items-center justify-between p-4 border-b border-border-subtle\">\n <h3 className=\"text-base font-semibold text-text-primary\">Webhook log details</h3>\n <button\n type=\"button\"\n onClick={onClose}\n className=\"p-1 rounded text-text-muted hover:text-text-primary hover:bg-bg-sunken/50\"\n >\n <X className=\"size-4\" />\n </button>\n </div>\n <div className=\"p-4 space-y-4\">\n <div className=\"grid grid-cols-2 gap-4 text-sm\">\n <div>\n <p className=\"text-text-muted\">Provider</p>\n <p className=\"text-text-primary capitalize\">{log.provider}</p>\n </div>\n <div>\n <p className=\"text-text-muted\">Event</p>\n <p className=\"text-text-primary font-mono text-xs\">{log.event}</p>\n </div>\n <div>\n <p className=\"text-text-muted\">Received</p>\n <p className=\"text-text-primary\">{formatDateTime(log.createdAt)}</p>\n </div>\n <div>\n <p className=\"text-text-muted\">Processed</p>\n <p className=\"text-text-primary\">{log.processed ? 'Yes' : 'No'}</p>\n </div>\n </div>\n {log.error && (\n <div>\n <p className=\"text-sm text-text-muted mb-1\">Error</p>\n <pre className=\"text-xs whitespace-pre-wrap p-3 rounded-md bg-status-error-bg-subtle text-status-error-text border border-status-error-border\">\n {log.error}\n </pre>\n </div>\n )}\n <div>\n <p className=\"text-sm text-text-muted mb-1\">Payload</p>\n <pre className=\"text-xs whitespace-pre-wrap p-3 rounded-md bg-bg-sunken/60 text-text-secondary max-h-64 overflow-y-auto\">\n {JSON.stringify(log.payload, null, 2)}\n </pre>\n </div>\n {!log.processed && canCreateRefund && (\n <button\n type=\"button\"\n onClick={() => onCreateRefund(log.id)}\n disabled={isCreatingRefund}\n className=\"inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bgHover disabled:opacity-50\"\n >\n {isCreatingRefund ? (\n <Loader2 className=\"size-4 animate-spin\" />\n ) : (\n <DollarSign className=\"size-4\" />\n )}\n Create refund from this webhook\n </button>\n )}\n </div>\n </div>\n </div>\n );\n};\n\nexport const BillingWebhookLogsPage: FC = () => {\n const permissions = useBillingPermissions();\n const [page, setPage] = useState(0);\n const [filters, setFilters] = useState<BillingWebhookLogFilters>({});\n const [selectedLog, setSelectedLog] = useState<WebhookLog | null>(null);\n\n const { logs, totalCount, isLoading, error, refetch } = useBillingWebhookLogs(\n filters,\n page,\n PAGE_SIZE\n );\n const { createRefundRecordFromWebhook, isCreatingFromWebhook } = useRefundMutations();\n\n if (!permissions.isBillingAdmin) {\n return <AccessDenied message=\"You don't have permission to view billing webhook logs.\" />;\n }\n\n if (error && isServerError(error)) {\n return (\n <div className=\"p-6\">\n <ServerError\n title=\"Server Unavailable\"\n message=\"Unable to load webhook logs. The server might be down or experiencing issues.\"\n onRetry={() => refetch()}\n showRetry\n />\n </div>\n );\n }\n\n const handleFilterChange = <K extends keyof BillingWebhookLogFilters>(\n key: K,\n value: BillingWebhookLogFilters[K]\n ) => {\n setFilters((prev) => ({ ...prev, [key]: value }));\n setPage(0);\n };\n\n const handleCreateRefund = async (webhookLogId: string) => {\n await createRefundRecordFromWebhook(webhookLogId);\n setSelectedLog(null);\n };\n\n const columns: ResponsiveTableColumn<WebhookLog>[] = [\n {\n key: 'date',\n header: 'Received',\n priority: 'primary',\n cellClassName: 'whitespace-nowrap',\n cell: (log) => (\n <div className=\"flex flex-col\">\n <span className=\"text-sm text-text-primary\">\n {formatDateTime(log.createdAt).split(' ')[0]}\n </span>\n <span className=\"text-xs text-text-muted\">\n {formatDateTime(log.createdAt).split(' ')[1]}\n </span>\n </div>\n ),\n },\n {\n key: 'status',\n header: 'Status',\n cellClassName: 'whitespace-nowrap',\n cell: (log) => {\n const badge = getBadge(log);\n const BadgeIcon = badge.icon;\n return (\n <span\n className={`inline-flex items-center gap-1 px-2 py-0.5 text-xs font-medium rounded ${badge.className}`}\n >\n <BadgeIcon className=\"size-3\" />\n {badge.label}\n </span>\n );\n },\n },\n {\n key: 'provider',\n header: 'Provider',\n priority: 'hidden-on-mobile',\n cellClassName: 'whitespace-nowrap',\n cell: (log) => <span className=\"text-sm text-text-primary capitalize\">{log.provider}</span>,\n },\n {\n key: 'event',\n header: 'Event',\n cellClassName: 'whitespace-nowrap max-w-[220px] truncate',\n cell: (log) => <span className=\"text-sm font-mono text-text-muted\">{log.event}</span>,\n },\n {\n key: 'error',\n header: 'Error',\n priority: 'hidden-on-mobile',\n cellClassName: 'max-w-[280px] truncate',\n cell: (log) => <span className=\"text-sm text-status-error-text\">{log.error || '-'}</span>,\n },\n ];\n\n const totalPages = Math.max(1, Math.ceil(totalCount / PAGE_SIZE));\n\n return (\n <div className=\"space-y-6 p-6\">\n <PageHeader\n title=\"Billing Webhook Logs\"\n description=\"Every Stripe/Razorpay webhook delivery — investigate processing failures directly.\"\n actions={\n <button\n type=\"button\"\n onClick={() => refetch()}\n className=\"inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md border border-border-subtle bg-bg-surface hover:bg-bg-sunken/50\"\n >\n <RefreshCw className=\"size-4\" />\n Refresh\n </button>\n }\n />\n\n {/* Filters */}\n <div className=\"p-4 border border-border-subtle rounded-lg bg-bg-sunken/30 grid grid-cols-1 sm:grid-cols-3 gap-4\">\n <div>\n <label className=\"block text-sm font-medium mb-1\">Processed</label>\n <select\n value={filters.processed === undefined ? '' : String(filters.processed)}\n onChange={(e) =>\n handleFilterChange(\n 'processed',\n e.target.value === '' ? undefined : e.target.value === 'true'\n )\n }\n className=\"w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface\"\n >\n <option value=\"\">All</option>\n <option value=\"false\">Unprocessed / Failed</option>\n <option value=\"true\">Processed</option>\n </select>\n </div>\n <div>\n <label className=\"block text-sm font-medium mb-1\">Provider</label>\n <select\n value={filters.provider || ''}\n onChange={(e) => handleFilterChange('provider', e.target.value || undefined)}\n className=\"w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface\"\n >\n <option value=\"\">All Providers</option>\n {PROVIDER_OPTIONS.map((p) => (\n <option key={p} value={p}>\n {p.charAt(0).toUpperCase() + p.slice(1)}\n </option>\n ))}\n </select>\n </div>\n <div>\n <label className=\"block text-sm font-medium mb-1\">Has Error</label>\n <select\n value={filters.hasError === undefined ? '' : String(filters.hasError)}\n onChange={(e) =>\n handleFilterChange(\n 'hasError',\n e.target.value === '' ? undefined : e.target.value === 'true'\n )\n }\n className=\"w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface\"\n >\n <option value=\"\">All</option>\n <option value=\"true\">Has error</option>\n <option value=\"false\">No error</option>\n </select>\n </div>\n </div>\n\n {/* Table */}\n {isLoading && logs.length === 0 ? (\n <div className=\"space-y-2\">\n {[1, 2, 3, 4, 5].map((i) => (\n <div key={i} className=\"h-16 bg-bg-sunken animate-pulse rounded\" />\n ))}\n </div>\n ) : logs.length === 0 ? (\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title=\"No webhook logs found\"\n description=\"Nothing matches these filters — try widening them, or check back after the next payment.\"\n />\n ) : (\n <div className=\"border border-border-subtle rounded-lg overflow-hidden\">\n <ResponsiveTable<WebhookLog>\n columns={columns}\n data={logs}\n rowKey={(log) => log.id}\n rowActions={(log) => (\n <button\n type=\"button\"\n onClick={() => setSelectedLog(log)}\n className=\"inline-flex items-center gap-1.5 px-2 py-1 text-sm font-medium rounded-button text-text-secondary hover:text-text-primary hover:bg-bg-sunken/60 transition-colors\"\n >\n <Eye className=\"size-4\" />\n <span className=\"hidden sm:inline\">View</span>\n </button>\n )}\n />\n </div>\n )}\n\n {/* Pagination */}\n {totalCount > 0 && (\n <div className=\"flex flex-col sm:flex-row items-center justify-between gap-4 border-t border-border-subtle pt-4\">\n <p className=\"text-sm text-text-muted text-center sm:text-left\">\n Showing {page * PAGE_SIZE + 1} to {Math.min((page + 1) * PAGE_SIZE, totalCount)} of{' '}\n {totalCount} logs\n </p>\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={() => setPage((p) => Math.max(0, p - 1))}\n disabled={page === 0}\n className=\"inline-flex items-center gap-1 px-3 py-1.5 text-sm font-medium rounded-button border border-border-subtle bg-bg-surface hover:bg-bg-sunken/50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors\"\n >\n <ChevronLeft className=\"size-4\" />\n <span className=\"hidden sm:inline\">Previous</span>\n </button>\n <span className=\"text-sm text-text-muted px-2\">\n <span className=\"hidden sm:inline\">Page </span>\n {page + 1} <span className=\"hidden sm:inline\">of</span>\n <span className=\"sm:hidden\">/</span> {totalPages}\n </span>\n <button\n type=\"button\"\n onClick={() => setPage((p) => (p + 1 < totalPages ? p + 1 : p))}\n disabled={page + 1 >= totalPages}\n className=\"inline-flex items-center gap-1 px-3 py-1.5 text-sm font-medium rounded-button border border-border-subtle bg-bg-surface hover:bg-bg-sunken/50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors\"\n >\n <span className=\"hidden sm:inline\">Next</span>\n <ChevronRight className=\"size-4\" />\n </button>\n </div>\n </div>\n )}\n\n <WebhookLogDetailModal\n log={selectedLog}\n onClose={() => setSelectedLog(null)}\n onCreateRefund={handleCreateRefund}\n isCreatingRefund={isCreatingFromWebhook}\n canCreateRefund={\n selectedLog\n ? REFUND_ELIGIBLE_EVENTS.has(selectedLog.event) && Boolean(selectedLog.error)\n : false\n }\n />\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAqCA,IAAM,IAAY,IACZ,IAAmB,CAAC,UAAU,UAAU,GACxC,IAAyB,IAAI,IAAI;CACrC;CACA;CACA;CACA;AACF,CAAC,GAEK,KACJ,MAEK,EAAI,YAOF;CACL,OAAO;CACP,WAAW,GAAG,EAAa,QAAQ,GAAG,GAAG,EAAa,QAAQ;CAC9D,MAAM;AACR,IAVS;CACL,OAAO,EAAI,QAAQ,WAAW;CAC9B,WAAW,GAAG,EAAa,MAAM,GAAG,GAAG,EAAa,MAAM;CAC1D,MAAM;AACR,GASE,KAMA,EAAE,QAAK,YAAS,mBAAgB,qBAAkB,yBACjD,IAGH,kBAAC,OAAD;CAAK,WAAU;WACb,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,MAAD;IAAI,WAAU;cAA4C;GAAuB,CAAA,GACjF,kBAAC,UAAD;IACE,MAAK;IACL,SAAS;IACT,WAAU;cAEV,kBAAC,GAAD,EAAG,WAAU,SAAU,CAAA;GACjB,CAAA,CACL;MACL,kBAAC,OAAD;GAA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