@burdenoff/microfe-channel 2026.625.2 → 2026.625.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/channel/modules/channels/pages/ChannelDashboardPage.js +19 -12
- package/dist/channel/modules/channels/pages/ChannelDashboardPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelDetailsPage.js +407 -353
- package/dist/channel/modules/channels/pages/ChannelDetailsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelSettingsPage.js +93 -87
- package/dist/channel/modules/channels/pages/ChannelSettingsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js +154 -134
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelsListPage.js +279 -244
- package/dist/channel/modules/channels/pages/ChannelsListPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js +277 -232
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ConnectionsListPage.js +159 -129
- package/dist/channel/modules/channels/pages/ConnectionsListPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/CreateChannelPage.js +28 -22
- package/dist/channel/modules/channels/pages/CreateChannelPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/CreateConnectionPage.js +72 -65
- package/dist/channel/modules/channels/pages/CreateConnectionPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js +99 -79
- package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/EditChannelPage.js +154 -148
- package/dist/channel/modules/channels/pages/EditChannelPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/EditConnectionPage.js +69 -62
- package/dist/channel/modules/channels/pages/EditConnectionPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/SendMessagePage.js +131 -124
- package/dist/channel/modules/channels/pages/SendMessagePage.js.map +1 -1
- package/dist/channel/modules/channels/pages/WebhookEventsPage.js +174 -154
- package/dist/channel/modules/channels/pages/WebhookEventsPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,80 +1,80 @@
|
|
|
1
1
|
import { useChannel as e } from "../../../providers/ChannelProvider.js";
|
|
2
2
|
import { emitShellEvent as t } from "../../../utils/shellBridge.js";
|
|
3
3
|
import { WEBHOOK_RECEIVED_SUBSCRIPTION as n, useChannelSubscription as r } from "../../../hooks/useChannelSubscription.js";
|
|
4
|
-
import { useChannel as
|
|
5
|
-
import { PermissionGuard as
|
|
6
|
-
import { CHANNEL_PERMISSIONS as
|
|
7
|
-
import { useExportWebhookEvents as
|
|
8
|
-
import { useCallback as
|
|
9
|
-
import { useI18n as
|
|
10
|
-
import { AlertCircle as
|
|
11
|
-
import { useNavigate as
|
|
12
|
-
import { usePermissions as
|
|
13
|
-
import { Fragment as
|
|
14
|
-
import { CTAOverflowMenu as
|
|
4
|
+
import { useChannel as i } from "../../../hooks/useChannels.js";
|
|
5
|
+
import { PermissionGuard as a } from "../../../components/PermissionGuard.js";
|
|
6
|
+
import { CHANNEL_PERMISSIONS as o } from "../../../constants/permissions.js";
|
|
7
|
+
import { useExportWebhookEvents as ee } from "../hooks/useExport.js";
|
|
8
|
+
import { useCallback as s, useEffect as c, useRef as l, useState as u } from "react";
|
|
9
|
+
import { useI18n as te } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
10
|
+
import { AlertCircle as d, ArrowLeft as f, CheckCircle2 as p, ChevronLeft as m, ChevronRight as h, Clock as g, Download as ne, Eye as re, EyeOff as _, Loader2 as v, RefreshCw as y, XCircle as b } from "lucide-react";
|
|
11
|
+
import { useNavigate as ie, useParams as x } from "react-router-dom";
|
|
12
|
+
import { usePermissions as S } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
13
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
14
|
+
import { CTAOverflowMenu as ae, EmphasisPanel as E, GlassCard as oe, IllustratedEmptyState as se, PagePurpose as ce } from "@burdenoff/fe-libs/ui";
|
|
15
15
|
//#region src/channel/modules/channels/pages/WebhookEventsPage.tsx
|
|
16
|
-
var
|
|
16
|
+
var D = {
|
|
17
17
|
PENDING: {
|
|
18
18
|
label: "Pending",
|
|
19
19
|
color: "text-text-secondary bg-bg-sunken",
|
|
20
|
-
icon:
|
|
20
|
+
icon: g
|
|
21
21
|
},
|
|
22
22
|
PROCESSING: {
|
|
23
23
|
label: "Processing",
|
|
24
24
|
color: "text-accent-primary bg-accent-primary/10",
|
|
25
|
-
icon:
|
|
25
|
+
icon: y
|
|
26
26
|
},
|
|
27
27
|
COMPLETED: {
|
|
28
28
|
label: "Completed",
|
|
29
29
|
color: "text-status-success-text bg-status-success-bg-subtle",
|
|
30
|
-
icon:
|
|
30
|
+
icon: p
|
|
31
31
|
},
|
|
32
32
|
FAILED: {
|
|
33
33
|
label: "Failed",
|
|
34
34
|
color: "text-status-error-text bg-status-error-bg-subtle",
|
|
35
|
-
icon:
|
|
35
|
+
icon: b
|
|
36
36
|
},
|
|
37
37
|
IGNORED: {
|
|
38
38
|
label: "Ignored",
|
|
39
39
|
color: "text-status-warning-text bg-status-warning-bg-subtle",
|
|
40
|
-
icon:
|
|
40
|
+
icon: _
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
|
-
function
|
|
44
|
-
let { channelId:
|
|
45
|
-
let n =
|
|
43
|
+
function O() {
|
|
44
|
+
let { channelId: p } = x(), b = ie(), { hasPermission: O } = S(), le = O(o.CHANNEL_WEBHOOK_EXPORT), { t: ue } = te(), k = (e, t) => {
|
|
45
|
+
let n = ue(e);
|
|
46
46
|
return n === e ? t : n;
|
|
47
|
-
}, { organizationId:
|
|
48
|
-
if (
|
|
49
|
-
|
|
47
|
+
}, { organizationId: de } = e(), { triggerExport: A, isExporting: j, exportError: M } = ee(de ?? void 0, p), [N, P] = u(!0), [F, I] = u([]), [L, R] = u(null), [z, B] = u(25), [V, fe] = u(0), [H, U] = u([void 0]), [W, G] = u(0), { channel: K, isLoading: pe, error: q, fetchWebhookEvents: J } = i(p), Y = s(async (e) => {
|
|
48
|
+
if (p) {
|
|
49
|
+
P(!0);
|
|
50
50
|
try {
|
|
51
|
-
let t = await J(
|
|
52
|
-
return
|
|
51
|
+
let t = await J(z, e);
|
|
52
|
+
return I(t.items), fe(t.total), t.nextCursor;
|
|
53
53
|
} finally {
|
|
54
|
-
|
|
54
|
+
P(!1);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
}, [
|
|
58
|
-
|
|
58
|
+
p,
|
|
59
59
|
J,
|
|
60
|
-
|
|
61
|
-
]), X =
|
|
62
|
-
|
|
60
|
+
z
|
|
61
|
+
]), X = l(Y), Z = l(H), Q = l(W);
|
|
62
|
+
c(() => {
|
|
63
63
|
X.current = Y, Z.current = H, Q.current = W;
|
|
64
64
|
});
|
|
65
|
-
let $ =
|
|
66
|
-
|
|
65
|
+
let $ = l(!0);
|
|
66
|
+
c(() => {
|
|
67
67
|
Promise.resolve().then(() => {
|
|
68
68
|
U([void 0]), G(0), X.current(void 0);
|
|
69
69
|
});
|
|
70
|
-
}, [
|
|
70
|
+
}, [z]), c(() => {
|
|
71
71
|
if ($.current) {
|
|
72
72
|
$.current = !1;
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
75
|
Promise.resolve().then(() => X.current(Z.current[W]));
|
|
76
76
|
}, [W]);
|
|
77
|
-
let
|
|
77
|
+
let me = s(async () => {
|
|
78
78
|
let e = await Y(H[W]);
|
|
79
79
|
e && U((t) => {
|
|
80
80
|
let n = [...t];
|
|
@@ -84,254 +84,274 @@ function D() {
|
|
|
84
84
|
H,
|
|
85
85
|
W,
|
|
86
86
|
Y
|
|
87
|
-
]),
|
|
87
|
+
]), he = s(() => {
|
|
88
88
|
let e = W - 1;
|
|
89
89
|
G(e), Y(H[e]);
|
|
90
90
|
}, [
|
|
91
91
|
H,
|
|
92
92
|
W,
|
|
93
93
|
Y
|
|
94
|
-
]),
|
|
94
|
+
]), ge = F.length === z, _e = W > 0;
|
|
95
95
|
r({
|
|
96
96
|
query: n,
|
|
97
|
-
variables: { channelId:
|
|
97
|
+
variables: { channelId: p },
|
|
98
98
|
operationName: "WebhookReceived",
|
|
99
|
-
enabled: !!
|
|
100
|
-
onData:
|
|
101
|
-
t("webhook.received", { channelId:
|
|
102
|
-
}, [
|
|
103
|
-
pollFn:
|
|
99
|
+
enabled: !!p,
|
|
100
|
+
onData: s(() => {
|
|
101
|
+
t("webhook.received", { channelId: p }), X.current(Z.current[Q.current]);
|
|
102
|
+
}, [p]),
|
|
103
|
+
pollFn: s(() => {
|
|
104
104
|
X.current(Z.current[Q.current]);
|
|
105
105
|
}, []),
|
|
106
106
|
pollIntervalMs: 6e4
|
|
107
107
|
});
|
|
108
|
-
let
|
|
109
|
-
return
|
|
108
|
+
let ve = (e) => D[e] || D.PENDING;
|
|
109
|
+
return pe ? /* @__PURE__ */ w("div", {
|
|
110
110
|
className: "flex items-center justify-center min-h-screen",
|
|
111
|
-
children: /* @__PURE__ */
|
|
111
|
+
children: /* @__PURE__ */ w(v, {
|
|
112
112
|
size: 32,
|
|
113
113
|
className: "animate-spin text-accent-primary"
|
|
114
114
|
})
|
|
115
|
-
}) : q || !K ? /* @__PURE__ */
|
|
115
|
+
}) : q || !K ? /* @__PURE__ */ w("div", {
|
|
116
116
|
className: "p-6",
|
|
117
|
-
children: /* @__PURE__ */
|
|
117
|
+
children: /* @__PURE__ */ T("div", {
|
|
118
118
|
className: "flex items-center gap-3 p-4 bg-status-error-bg-subtle border border-status-error-border rounded-lg",
|
|
119
119
|
children: [
|
|
120
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ w(d, {
|
|
121
121
|
size: 20,
|
|
122
122
|
className: "text-status-error-text"
|
|
123
123
|
}),
|
|
124
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ w("div", { children: /* @__PURE__ */ w("p", {
|
|
125
125
|
className: "text-sm font-medium text-status-error-text",
|
|
126
126
|
children: q || "Channel not found"
|
|
127
127
|
}) }),
|
|
128
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ w("button", {
|
|
129
129
|
type: "button",
|
|
130
|
-
onClick: () =>
|
|
130
|
+
onClick: () => b(`/channels/${p}`),
|
|
131
131
|
className: "ml-auto px-3 py-1 text-sm text-status-error-text hover:bg-status-error-bg-subtle rounded transition-colors",
|
|
132
132
|
children: "Go Back"
|
|
133
133
|
})
|
|
134
134
|
]
|
|
135
135
|
})
|
|
136
|
-
}) : /* @__PURE__ */
|
|
137
|
-
permission:
|
|
138
|
-
children: /* @__PURE__ */
|
|
136
|
+
}) : /* @__PURE__ */ w(a, {
|
|
137
|
+
permission: o.CHANNEL_WEBHOOK_READ,
|
|
138
|
+
children: /* @__PURE__ */ T("div", {
|
|
139
139
|
className: "space-y-6 p-3 sm:p-6",
|
|
140
140
|
children: [
|
|
141
|
-
/* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ T("div", {
|
|
142
142
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
143
|
-
children: [/* @__PURE__ */
|
|
143
|
+
children: [/* @__PURE__ */ T("div", {
|
|
144
144
|
className: "flex items-center gap-3",
|
|
145
|
-
children: [/* @__PURE__ */
|
|
145
|
+
children: [/* @__PURE__ */ w("button", {
|
|
146
146
|
type: "button",
|
|
147
|
-
onClick: () =>
|
|
148
|
-
"aria-label":
|
|
147
|
+
onClick: () => b(`/channels/${p}`),
|
|
148
|
+
"aria-label": k("channel.backToChannel", "Back to channel"),
|
|
149
149
|
className: "p-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-lg transition-colors",
|
|
150
|
-
children: /* @__PURE__ */
|
|
150
|
+
children: /* @__PURE__ */ w(f, {
|
|
151
151
|
size: 20,
|
|
152
152
|
"aria-hidden": "true"
|
|
153
153
|
})
|
|
154
|
-
}), /* @__PURE__ */
|
|
154
|
+
}), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h1", {
|
|
155
155
|
className: "text-xl sm:text-2xl font-bold text-text-primary",
|
|
156
|
-
children:
|
|
157
|
-
}), /* @__PURE__ */
|
|
156
|
+
children: k("channel.webhookEvents", "Webhook Events")
|
|
157
|
+
}), /* @__PURE__ */ T("p", {
|
|
158
158
|
className: "text-sm text-text-secondary mt-1",
|
|
159
159
|
children: [K.name, " - Event history"]
|
|
160
160
|
})] })]
|
|
161
|
-
}), /* @__PURE__ */
|
|
161
|
+
}), /* @__PURE__ */ T("div", {
|
|
162
162
|
className: "flex items-center gap-3",
|
|
163
|
-
children: [/* @__PURE__ */
|
|
164
|
-
value:
|
|
165
|
-
onChange: (e) =>
|
|
163
|
+
children: [/* @__PURE__ */ T("select", {
|
|
164
|
+
value: z,
|
|
165
|
+
onChange: (e) => B(Number(e.target.value)),
|
|
166
166
|
className: "px-3 py-2 text-sm bg-surface border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-action-primary-bg/50 text-text-primary",
|
|
167
167
|
children: [
|
|
168
|
-
/* @__PURE__ */
|
|
168
|
+
/* @__PURE__ */ w("option", {
|
|
169
169
|
value: 10,
|
|
170
170
|
children: "10 results"
|
|
171
171
|
}),
|
|
172
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ w("option", {
|
|
173
173
|
value: 25,
|
|
174
174
|
children: "25 results"
|
|
175
175
|
}),
|
|
176
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ w("option", {
|
|
177
177
|
value: 50,
|
|
178
178
|
children: "50 results"
|
|
179
179
|
}),
|
|
180
|
-
/* @__PURE__ */
|
|
180
|
+
/* @__PURE__ */ w("option", {
|
|
181
181
|
value: 100,
|
|
182
182
|
children: "100 results"
|
|
183
183
|
})
|
|
184
184
|
]
|
|
185
|
-
}), /* @__PURE__ */
|
|
186
|
-
label:
|
|
187
|
-
icon: /* @__PURE__ */
|
|
185
|
+
}), /* @__PURE__ */ w(ae, { actions: [{
|
|
186
|
+
label: k("channel.refresh", "Refresh"),
|
|
187
|
+
icon: /* @__PURE__ */ w(y, {
|
|
188
188
|
size: 16,
|
|
189
|
-
className:
|
|
189
|
+
className: N ? "animate-spin" : "",
|
|
190
190
|
"aria-hidden": "true"
|
|
191
191
|
}),
|
|
192
|
-
disabled:
|
|
192
|
+
disabled: N,
|
|
193
193
|
onSelect: () => void Y(H[W])
|
|
194
|
-
}, ...
|
|
195
|
-
label:
|
|
196
|
-
icon:
|
|
194
|
+
}, ...le ? [{
|
|
195
|
+
label: k("channel.export", "Export"),
|
|
196
|
+
icon: j ? /* @__PURE__ */ w(v, {
|
|
197
197
|
size: 16,
|
|
198
198
|
className: "animate-spin",
|
|
199
199
|
"aria-hidden": "true"
|
|
200
|
-
}) : /* @__PURE__ */
|
|
200
|
+
}) : /* @__PURE__ */ w(ne, {
|
|
201
201
|
size: 16,
|
|
202
202
|
"aria-hidden": "true"
|
|
203
203
|
}),
|
|
204
|
-
disabled:
|
|
205
|
-
onSelect: () => void
|
|
204
|
+
disabled: j,
|
|
205
|
+
onSelect: () => void A()
|
|
206
206
|
}] : []] })]
|
|
207
207
|
})]
|
|
208
208
|
}),
|
|
209
|
-
|
|
209
|
+
M && /* @__PURE__ */ T("div", {
|
|
210
210
|
className: "p-4 bg-status-error-bg-subtle border border-status-error-border rounded-lg flex items-center gap-3",
|
|
211
|
-
children: [/* @__PURE__ */
|
|
211
|
+
children: [/* @__PURE__ */ w(d, {
|
|
212
212
|
size: 20,
|
|
213
213
|
className: "text-status-error-text"
|
|
214
|
-
}), /* @__PURE__ */
|
|
214
|
+
}), /* @__PURE__ */ w("p", {
|
|
215
215
|
className: "text-sm text-status-error-text flex-1",
|
|
216
|
-
children:
|
|
216
|
+
children: M
|
|
217
217
|
})]
|
|
218
218
|
}),
|
|
219
|
-
/* @__PURE__ */
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
219
|
+
/* @__PURE__ */ w(ce, {
|
|
220
|
+
icon: /* @__PURE__ */ w(g, {
|
|
221
|
+
size: 15,
|
|
222
|
+
"aria-hidden": "true"
|
|
223
|
+
}),
|
|
224
|
+
children: k("channel.webhookEventsPurpose", "Inbound events the provider pushed to this channel — delivery receipts, replies, status callbacks and the like. Each row shows how the event was processed, whether it was a duplicate, and the raw payload so you can inspect exactly what arrived. Use it to verify your webhook endpoint is receiving traffic and to debug why an event wasn't handled. Records are kept for 7 days.")
|
|
225
|
+
}),
|
|
226
|
+
/* @__PURE__ */ T(E, {
|
|
227
|
+
className: "flex items-center gap-3 p-4",
|
|
228
|
+
children: [/* @__PURE__ */ w("span", {
|
|
229
|
+
className: "rounded-lg bg-accent-purple-subtle p-2",
|
|
230
|
+
children: /* @__PURE__ */ w(g, {
|
|
231
|
+
size: 18,
|
|
232
|
+
className: "text-accent-purple",
|
|
233
|
+
"aria-hidden": "true"
|
|
234
|
+
})
|
|
235
|
+
}), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("p", {
|
|
236
|
+
className: "text-sm font-semibold text-text-primary",
|
|
237
|
+
children: [
|
|
238
|
+
V,
|
|
239
|
+
" ",
|
|
240
|
+
V === 1 ? k("channel.webhookEventSingular", "webhook event") : k("channel.webhookEventsPlural", "webhook events")
|
|
241
|
+
]
|
|
242
|
+
}), /* @__PURE__ */ w("p", {
|
|
223
243
|
className: "text-sm text-text-secondary",
|
|
224
|
-
children: "
|
|
225
|
-
})
|
|
244
|
+
children: k("channel.webhookEventsBannerHint", "All incoming webhooks received by this channel, retained for 7 days. Expand a row to inspect its raw payload.")
|
|
245
|
+
})] })]
|
|
226
246
|
}),
|
|
227
|
-
/* @__PURE__ */
|
|
247
|
+
/* @__PURE__ */ w(oe, {
|
|
228
248
|
treatment: "plain",
|
|
229
249
|
className: "border-border-seam rounded-lg overflow-hidden p-0",
|
|
230
|
-
children: /* @__PURE__ */
|
|
250
|
+
children: /* @__PURE__ */ w("div", {
|
|
231
251
|
className: "overflow-x-auto min-w-full",
|
|
232
|
-
children: /* @__PURE__ */
|
|
252
|
+
children: /* @__PURE__ */ T("table", {
|
|
233
253
|
className: "w-full min-w-[600px]",
|
|
234
|
-
children: [/* @__PURE__ */
|
|
254
|
+
children: [/* @__PURE__ */ w("thead", {
|
|
235
255
|
className: "bg-bg-sunken/50 border-b border-border-subtle",
|
|
236
|
-
children: /* @__PURE__ */
|
|
237
|
-
/* @__PURE__ */
|
|
256
|
+
children: /* @__PURE__ */ T("tr", { children: [
|
|
257
|
+
/* @__PURE__ */ w("th", {
|
|
238
258
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
239
|
-
children:
|
|
259
|
+
children: k("channel.status", "Status")
|
|
240
260
|
}),
|
|
241
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ w("th", {
|
|
242
262
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
243
|
-
children:
|
|
263
|
+
children: k("channel.eventType", "Event Type")
|
|
244
264
|
}),
|
|
245
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ w("th", {
|
|
246
266
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
247
|
-
children:
|
|
267
|
+
children: k("channel.duplicate", "Duplicate")
|
|
248
268
|
}),
|
|
249
|
-
/* @__PURE__ */
|
|
269
|
+
/* @__PURE__ */ w("th", {
|
|
250
270
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
251
|
-
children:
|
|
271
|
+
children: k("channel.processedAt", "Processed At")
|
|
252
272
|
}),
|
|
253
|
-
/* @__PURE__ */
|
|
273
|
+
/* @__PURE__ */ w("th", {
|
|
254
274
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
255
|
-
children:
|
|
275
|
+
children: k("channel.error", "Error")
|
|
256
276
|
}),
|
|
257
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ w("th", {
|
|
258
278
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
259
|
-
children:
|
|
279
|
+
children: k("channel.actions", "Actions")
|
|
260
280
|
})
|
|
261
281
|
] })
|
|
262
|
-
}), /* @__PURE__ */
|
|
282
|
+
}), /* @__PURE__ */ w("tbody", {
|
|
263
283
|
className: "divide-y divide-border",
|
|
264
|
-
children:
|
|
284
|
+
children: F.length === 0 ? /* @__PURE__ */ w("tr", { children: /* @__PURE__ */ w("td", {
|
|
265
285
|
colSpan: 6,
|
|
266
286
|
className: "px-4 py-8",
|
|
267
|
-
children: /* @__PURE__ */
|
|
287
|
+
children: /* @__PURE__ */ w(se, {
|
|
268
288
|
illustration: "empty-notifications",
|
|
269
|
-
title:
|
|
289
|
+
title: k("channel.noWebhookEventsFound", "No webhook events found")
|
|
270
290
|
})
|
|
271
|
-
}) }) :
|
|
272
|
-
let t =
|
|
273
|
-
return /* @__PURE__ */ C
|
|
291
|
+
}) }) : F.map((e) => {
|
|
292
|
+
let t = ve(e.status), n = t.icon, r = L === e.id;
|
|
293
|
+
return /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ T("tr", {
|
|
274
294
|
className: "hover:bg-bg-sunken/30 transition-colors",
|
|
275
295
|
children: [
|
|
276
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ w("td", {
|
|
277
297
|
className: "px-4 py-3",
|
|
278
|
-
children: /* @__PURE__ */
|
|
298
|
+
children: /* @__PURE__ */ T("div", {
|
|
279
299
|
className: "flex items-center gap-2",
|
|
280
|
-
children: [/* @__PURE__ */
|
|
300
|
+
children: [/* @__PURE__ */ w(n, {
|
|
281
301
|
size: 14,
|
|
282
302
|
className: t.color.split(" ")[0]
|
|
283
|
-
}), /* @__PURE__ */
|
|
303
|
+
}), /* @__PURE__ */ w("span", {
|
|
284
304
|
className: `text-sm font-medium ${t.color}`,
|
|
285
305
|
children: t.label
|
|
286
306
|
})]
|
|
287
307
|
})
|
|
288
308
|
}),
|
|
289
|
-
/* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ w("td", {
|
|
290
310
|
className: "px-4 py-3 text-sm font-mono text-text-primary",
|
|
291
311
|
children: e.eventType
|
|
292
312
|
}),
|
|
293
|
-
/* @__PURE__ */
|
|
313
|
+
/* @__PURE__ */ w("td", {
|
|
294
314
|
className: "px-4 py-3",
|
|
295
|
-
children: e.isDuplicate ? /* @__PURE__ */
|
|
315
|
+
children: e.isDuplicate ? /* @__PURE__ */ w("span", {
|
|
296
316
|
className: "text-xs text-status-warning-text bg-status-warning-bg-subtle px-2 py-1 rounded",
|
|
297
317
|
children: "Duplicate"
|
|
298
|
-
}) : /* @__PURE__ */
|
|
318
|
+
}) : /* @__PURE__ */ w("span", {
|
|
299
319
|
className: "text-xs text-text-secondary",
|
|
300
320
|
children: "No"
|
|
301
321
|
})
|
|
302
322
|
}),
|
|
303
|
-
/* @__PURE__ */
|
|
323
|
+
/* @__PURE__ */ w("td", {
|
|
304
324
|
className: "px-4 py-3 text-sm text-text-secondary",
|
|
305
325
|
children: e.processedAt ? new Date(e.processedAt).toLocaleString() : "-"
|
|
306
326
|
}),
|
|
307
|
-
/* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ w("td", {
|
|
308
328
|
className: "px-4 py-3 text-sm text-status-error-text max-w-xs truncate",
|
|
309
329
|
children: e.errorMessage || "-"
|
|
310
330
|
}),
|
|
311
|
-
/* @__PURE__ */
|
|
331
|
+
/* @__PURE__ */ w("td", {
|
|
312
332
|
className: "px-4 py-3",
|
|
313
|
-
children: /* @__PURE__ */
|
|
333
|
+
children: /* @__PURE__ */ w("button", {
|
|
314
334
|
type: "button",
|
|
315
|
-
onClick: () =>
|
|
316
|
-
"aria-label": r ?
|
|
335
|
+
onClick: () => R(r ? null : e.id),
|
|
336
|
+
"aria-label": r ? k("channel.hidePayload", "Hide payload") : k("channel.viewPayload", "View payload"),
|
|
317
337
|
"aria-expanded": r,
|
|
318
338
|
className: "p-1 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded transition-colors",
|
|
319
|
-
children:
|
|
339
|
+
children: w(r ? _ : re, {
|
|
320
340
|
size: 16,
|
|
321
341
|
"aria-hidden": "true"
|
|
322
342
|
})
|
|
323
343
|
})
|
|
324
344
|
})
|
|
325
345
|
]
|
|
326
|
-
}, e.id), r && /* @__PURE__ */
|
|
346
|
+
}, e.id), r && /* @__PURE__ */ w("tr", { children: /* @__PURE__ */ w("td", {
|
|
327
347
|
colSpan: 6,
|
|
328
348
|
className: "px-4 py-3 bg-bg-sunken/30",
|
|
329
|
-
children: /* @__PURE__ */
|
|
349
|
+
children: /* @__PURE__ */ T("div", {
|
|
330
350
|
className: "text-xs",
|
|
331
|
-
children: [/* @__PURE__ */
|
|
351
|
+
children: [/* @__PURE__ */ T("p", {
|
|
332
352
|
className: "text-text-secondary mb-1",
|
|
333
|
-
children: [
|
|
334
|
-
}), /* @__PURE__ */
|
|
353
|
+
children: [k("channel.payload", "Payload"), ":"]
|
|
354
|
+
}), /* @__PURE__ */ w("pre", {
|
|
335
355
|
className: "bg-surface p-2 rounded border border-border-subtle overflow-auto",
|
|
336
356
|
children: JSON.stringify(e.payload, null, 2)
|
|
337
357
|
})]
|
|
@@ -342,39 +362,39 @@ function D() {
|
|
|
342
362
|
})
|
|
343
363
|
})
|
|
344
364
|
}),
|
|
345
|
-
/* @__PURE__ */
|
|
365
|
+
/* @__PURE__ */ T("div", {
|
|
346
366
|
className: "flex items-center justify-between",
|
|
347
|
-
children: [/* @__PURE__ */
|
|
367
|
+
children: [/* @__PURE__ */ w("p", {
|
|
348
368
|
className: "text-sm text-text-secondary",
|
|
349
|
-
children:
|
|
350
|
-
|
|
369
|
+
children: V > 0 && /* @__PURE__ */ T(C, { children: [
|
|
370
|
+
k("channel.page", "Page"),
|
|
351
371
|
" ",
|
|
352
|
-
/* @__PURE__ */
|
|
372
|
+
/* @__PURE__ */ w("span", {
|
|
353
373
|
className: "font-medium",
|
|
354
374
|
children: W + 1
|
|
355
375
|
}),
|
|
356
376
|
" · ",
|
|
357
|
-
|
|
377
|
+
k("channel.totalRecords", "Total"),
|
|
358
378
|
": ",
|
|
359
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ w("span", {
|
|
360
380
|
className: "font-medium",
|
|
361
|
-
children:
|
|
381
|
+
children: V
|
|
362
382
|
})
|
|
363
383
|
] })
|
|
364
|
-
}), /* @__PURE__ */
|
|
384
|
+
}), /* @__PURE__ */ T("div", {
|
|
365
385
|
className: "flex items-center gap-2",
|
|
366
|
-
children: [/* @__PURE__ */
|
|
386
|
+
children: [/* @__PURE__ */ T("button", {
|
|
367
387
|
type: "button",
|
|
368
|
-
onClick:
|
|
369
|
-
disabled: !
|
|
388
|
+
onClick: he,
|
|
389
|
+
disabled: !_e || N,
|
|
370
390
|
className: "flex items-center gap-1 px-3 py-1.5 text-sm border border-border-subtle rounded-lg hover:bg-bg-sunken transition-colors disabled:opacity-40 disabled:cursor-not-allowed",
|
|
371
|
-
children: [/* @__PURE__ */
|
|
372
|
-
}), /* @__PURE__ */
|
|
391
|
+
children: [/* @__PURE__ */ w(m, { size: 16 }), k("channel.previous", "Previous")]
|
|
392
|
+
}), /* @__PURE__ */ T("button", {
|
|
373
393
|
type: "button",
|
|
374
|
-
onClick: () => void
|
|
375
|
-
disabled: !
|
|
394
|
+
onClick: () => void me(),
|
|
395
|
+
disabled: !ge || N,
|
|
376
396
|
className: "flex items-center gap-1 px-3 py-1.5 text-sm border border-border-subtle rounded-lg hover:bg-bg-sunken transition-colors disabled:opacity-40 disabled:cursor-not-allowed",
|
|
377
|
-
children: [
|
|
397
|
+
children: [k("channel.next", "Next"), /* @__PURE__ */ w(h, { size: 16 })]
|
|
378
398
|
})]
|
|
379
399
|
})]
|
|
380
400
|
})
|
|
@@ -383,6 +403,6 @@ function D() {
|
|
|
383
403
|
});
|
|
384
404
|
}
|
|
385
405
|
//#endregion
|
|
386
|
-
export {
|
|
406
|
+
export { O as WebhookEventsPage };
|
|
387
407
|
|
|
388
408
|
//# sourceMappingURL=WebhookEventsPage.js.map
|