@burdenoff/microfe-devportal 2026.623.5 → 2026.623.6
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/devportal/DevportalRoutes.js +101 -94
- package/dist/devportal/DevportalRoutes.js.map +1 -1
- package/dist/devportal/components/SectionNav.js +71 -5
- package/dist/devportal/components/SectionNav.js.map +1 -0
- package/dist/devportal/components/index.js +1 -1
- package/dist/devportal/hooks/useGraphQL.js +1 -1
- package/dist/devportal/pages/AdminReviewPage.js +39 -39
- package/dist/devportal/pages/AnalyticsDashboardPage.js +54 -54
- package/dist/devportal/pages/AnalyticsDashboardPage.js.map +1 -1
- package/dist/devportal/pages/ApiKeysPage.js +53 -53
- package/dist/devportal/pages/ApiKeysPage.js.map +1 -1
- package/dist/devportal/pages/AppLogsPage.js +9 -9
- package/dist/devportal/pages/ApplicationDetailPage.js +462 -462
- package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationVersionsPage.js +120 -120
- package/dist/devportal/pages/ApplicationVersionsPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationsPage.js +73 -73
- package/dist/devportal/pages/ApplicationsPage.js.map +1 -1
- package/dist/devportal/pages/CreateApiKeyPage.js +20 -20
- package/dist/devportal/pages/CreateApplicationPage.js +32 -32
- package/dist/devportal/pages/CreateOAuthClientPage.js +18 -18
- package/dist/devportal/pages/CreateOrganizationPage.js +12 -12
- package/dist/devportal/pages/CreateWebhookPage.js +23 -23
- package/dist/devportal/pages/DashboardPage.js +23 -23
- package/dist/devportal/pages/DelegationsPage.js +22 -22
- package/dist/devportal/pages/EditApplicationPage.js +283 -283
- package/dist/devportal/pages/EditApplicationPage.js.map +1 -1
- package/dist/devportal/pages/ListingPreviewPage.js +9 -9
- package/dist/devportal/pages/OAuthClientDetailPage.js +15 -15
- package/dist/devportal/pages/OAuthClientsPage.js +14 -14
- package/dist/devportal/pages/OrganizationDetailPage.js +84 -84
- package/dist/devportal/pages/OrganizationMembersPage.js +260 -260
- package/dist/devportal/pages/OrganizationMembersPage.js.map +1 -1
- package/dist/devportal/pages/OrganizationsPage.js +16 -16
- package/dist/devportal/pages/PublishPage.js +16 -16
- package/dist/devportal/pages/PublisherProfilePage.js +18 -18
- package/dist/devportal/pages/RevenueDashboardPage.js +29 -29
- package/dist/devportal/pages/SettingsPage.js +17 -17
- package/dist/devportal/pages/SetupPage.js +99 -99
- package/dist/devportal/pages/SetupPage.js.map +1 -1
- package/dist/devportal/pages/WebhookDetailPage.js +143 -143
- package/dist/devportal/pages/WebhookDetailPage.js.map +1 -1
- package/dist/devportal/pages/WebhooksPage.js +133 -133
- package/dist/devportal/pages/WebhooksPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { useDevportal as e } from "../providers/DevportalProvider.js";
|
|
2
2
|
import { cn as t } from "../utils/cn.js";
|
|
3
3
|
import { EmptyState as n } from "../components/EmptyState.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
4
|
+
import { useGetApplicationQuery as r, useGetApplicationsQuery as i, useGetWebhooksQuery as a } from "../../generated/global-operations.js";
|
|
5
|
+
import { getErrorMessage as o } from "../hooks/useGraphQL.js";
|
|
6
|
+
import { PageLayout as s } from "../components/PageLayout.js";
|
|
7
|
+
import { StatusBadge as c } from "../components/StatusBadge.js";
|
|
8
|
+
import { AppListItem as l } from "../components/AppCard.js";
|
|
9
|
+
import { DataTable as ee } from "../components/DataTable.js";
|
|
10
|
+
import { PermissionGuard as u } from "../components/PermissionGuard.js";
|
|
11
11
|
import "../components/index.js";
|
|
12
12
|
import { DEVPORTAL_PERMISSIONS as d } from "../constants/permissions.js";
|
|
13
13
|
import { useDevportalPermission as f } from "../hooks/usePermission.js";
|
|
14
14
|
import "../hooks/index.js";
|
|
15
|
-
import { useEffect as
|
|
16
|
-
import { useI18n as
|
|
17
|
-
import { AlertCircle as
|
|
18
|
-
import { useParams as
|
|
19
|
-
import { jsx as
|
|
15
|
+
import { useEffect as te, useState as p } from "react";
|
|
16
|
+
import { useI18n as m } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
17
|
+
import { AlertCircle as h, AlertTriangle as g, AppWindow as _, CheckCircle as v, Loader2 as y, PauseCircle as b, Plus as x, Search as S, Webhook as C, XCircle as w } from "lucide-react";
|
|
18
|
+
import { useParams as T } from "react-router-dom";
|
|
19
|
+
import { jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
20
20
|
//#region src/devportal/pages/WebhooksPage.tsx
|
|
21
|
-
function
|
|
21
|
+
function O(e) {
|
|
22
22
|
return {
|
|
23
23
|
id: e.id,
|
|
24
24
|
applicationId: e.applicationId,
|
|
@@ -42,49 +42,49 @@ function k(e) {
|
|
|
42
42
|
updatedAt: e.updatedAt
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
var
|
|
46
|
-
let { appId:
|
|
45
|
+
var k = () => {
|
|
46
|
+
let { appId: k } = T(), { navigate: j, basePath: M, activeOrgId: N } = e(), { t: ne } = m(), P = (e, t) => {
|
|
47
47
|
let n = ne(e);
|
|
48
48
|
return n === e ? t : n;
|
|
49
|
-
}, F = f(d.WEBHOOK_CREATE), [I, L] =
|
|
50
|
-
variables: { id:
|
|
51
|
-
skip: !
|
|
49
|
+
}, F = f(d.WEBHOOK_CREATE), [I, L] = p(""), [R, z] = p(""), { data: B } = r({
|
|
50
|
+
variables: { id: k ?? "" },
|
|
51
|
+
skip: !k,
|
|
52
52
|
fetchPolicy: "cache-first"
|
|
53
53
|
});
|
|
54
|
-
|
|
54
|
+
te(() => {
|
|
55
55
|
let e = B?.application?.name;
|
|
56
|
-
if (!
|
|
56
|
+
if (!k || !e) return;
|
|
57
57
|
let t = window.__breadcrumbRegistry;
|
|
58
|
-
return t?.register(
|
|
59
|
-
}, [
|
|
60
|
-
let { data: V, loading: H, error: U, refetch: W } =
|
|
58
|
+
return t?.register(k, e), () => t?.unregister(k);
|
|
59
|
+
}, [k, B?.application?.name]);
|
|
60
|
+
let { data: V, loading: H, error: U, refetch: W } = i({
|
|
61
61
|
variables: { limit: 100 },
|
|
62
|
-
skip: !!
|
|
62
|
+
skip: !!k,
|
|
63
63
|
fetchPolicy: "cache-and-network"
|
|
64
|
-
}), { data: G, loading: K, error: q, refetch: J } =
|
|
65
|
-
variables: { applicationId:
|
|
66
|
-
skip: !
|
|
64
|
+
}), { data: G, loading: K, error: q, refetch: J } = a({
|
|
65
|
+
variables: { applicationId: k || "" },
|
|
66
|
+
skip: !k,
|
|
67
67
|
fetchPolicy: "cache-and-network"
|
|
68
|
-
}), Y = G?.webhooks?.map(
|
|
69
|
-
|
|
68
|
+
}), Y = G?.webhooks?.map(O) ?? [], X = V?.applications?.edges?.map((e) => e.node) ?? [], re = N ? X.filter((e) => e.developerOrganizationId === N) : X, Z = (e) => {
|
|
69
|
+
j?.(`${M}${e}`);
|
|
70
70
|
}, Q = Y.filter((e) => {
|
|
71
71
|
let t = !I || e.name.toLowerCase().includes(I.toLowerCase()) || e.url.toLowerCase().includes(I.toLowerCase()), n = !R || e.status === R;
|
|
72
72
|
return t && n;
|
|
73
73
|
}), ie = (e) => {
|
|
74
74
|
switch (e) {
|
|
75
|
-
case "ACTIVE": return /* @__PURE__ */
|
|
75
|
+
case "ACTIVE": return /* @__PURE__ */ E(v, {
|
|
76
76
|
size: 16,
|
|
77
77
|
className: "text-status-success-text"
|
|
78
78
|
});
|
|
79
|
-
case "PAUSED": return /* @__PURE__ */
|
|
79
|
+
case "PAUSED": return /* @__PURE__ */ E(b, {
|
|
80
80
|
size: 16,
|
|
81
81
|
className: "text-status-warning-text"
|
|
82
82
|
});
|
|
83
|
-
case "FAILED": return /* @__PURE__ */
|
|
83
|
+
case "FAILED": return /* @__PURE__ */ E(w, {
|
|
84
84
|
size: 16,
|
|
85
85
|
className: "text-status-error-text"
|
|
86
86
|
});
|
|
87
|
-
case "DISABLED": return /* @__PURE__ */
|
|
87
|
+
case "DISABLED": return /* @__PURE__ */ E(g, {
|
|
88
88
|
size: 16,
|
|
89
89
|
className: "text-text-tertiary"
|
|
90
90
|
});
|
|
@@ -94,32 +94,32 @@ var A = () => {
|
|
|
94
94
|
let t = e.successCount + e.failureCount;
|
|
95
95
|
return t === 0 ? 100 : Math.round(e.successCount / t * 100);
|
|
96
96
|
};
|
|
97
|
-
if (!
|
|
97
|
+
if (!k) {
|
|
98
98
|
let e = re.filter((e) => {
|
|
99
99
|
if (!I) return !0;
|
|
100
100
|
let t = I.toLowerCase();
|
|
101
101
|
return e.name.toLowerCase().includes(t) || (e.slug ?? "").toLowerCase().includes(t);
|
|
102
102
|
});
|
|
103
|
-
return /* @__PURE__ */
|
|
103
|
+
return /* @__PURE__ */ E(u, {
|
|
104
104
|
permission: d.WEBHOOK_READ,
|
|
105
|
-
children: /* @__PURE__ */
|
|
105
|
+
children: /* @__PURE__ */ E(s, {
|
|
106
106
|
title: P("devportal.webhooks", "Webhooks"),
|
|
107
107
|
description: P("devportal.manageWebhooksApps", "Manage webhooks for your applications"),
|
|
108
|
-
children: /* @__PURE__ */
|
|
108
|
+
children: /* @__PURE__ */ D("div", {
|
|
109
109
|
className: "space-y-4",
|
|
110
110
|
children: [
|
|
111
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ E("p", {
|
|
112
112
|
className: "text-sm text-muted-foreground",
|
|
113
113
|
children: P("devportal.webhooksSelectAppHint", "Select an application below to view and manage its webhooks.")
|
|
114
114
|
}),
|
|
115
|
-
/* @__PURE__ */
|
|
115
|
+
/* @__PURE__ */ E("div", {
|
|
116
116
|
className: "max-w-md",
|
|
117
|
-
children: /* @__PURE__ */
|
|
117
|
+
children: /* @__PURE__ */ D("div", {
|
|
118
118
|
className: "relative",
|
|
119
|
-
children: [/* @__PURE__ */
|
|
119
|
+
children: [/* @__PURE__ */ E(S, {
|
|
120
120
|
size: 16,
|
|
121
121
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"
|
|
122
|
-
}), /* @__PURE__ */
|
|
122
|
+
}), /* @__PURE__ */ E("input", {
|
|
123
123
|
type: "text",
|
|
124
124
|
placeholder: "Search applications...",
|
|
125
125
|
value: I,
|
|
@@ -128,41 +128,41 @@ var A = () => {
|
|
|
128
128
|
})]
|
|
129
129
|
})
|
|
130
130
|
}),
|
|
131
|
-
H ? /* @__PURE__ */
|
|
131
|
+
H ? /* @__PURE__ */ E("div", {
|
|
132
132
|
className: "flex items-center justify-center py-12 text-muted-foreground",
|
|
133
|
-
children: /* @__PURE__ */
|
|
134
|
-
}) : U ? /* @__PURE__ */
|
|
133
|
+
children: /* @__PURE__ */ E(y, { className: "h-8 w-8 animate-spin" })
|
|
134
|
+
}) : U ? /* @__PURE__ */ D("div", {
|
|
135
135
|
className: "rounded-lg border border-destructive/50 bg-destructive/10 p-6 text-center",
|
|
136
136
|
children: [
|
|
137
|
-
/* @__PURE__ */
|
|
138
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ E(h, { className: "mx-auto h-8 w-8 text-destructive" }),
|
|
138
|
+
/* @__PURE__ */ E("h3", {
|
|
139
139
|
className: "mt-2 font-medium text-destructive",
|
|
140
140
|
children: "Failed to load applications"
|
|
141
141
|
}),
|
|
142
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ E("p", {
|
|
143
143
|
className: "mt-1 text-sm text-muted-foreground",
|
|
144
|
-
children:
|
|
144
|
+
children: o(U)
|
|
145
145
|
}),
|
|
146
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ E("button", {
|
|
147
147
|
onClick: () => W(),
|
|
148
148
|
className: "mt-4 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
|
|
149
149
|
children: "Try Again"
|
|
150
150
|
})
|
|
151
151
|
]
|
|
152
|
-
}) : e.length > 0 ? /* @__PURE__ */
|
|
152
|
+
}) : e.length > 0 ? /* @__PURE__ */ E("div", {
|
|
153
153
|
className: "space-y-2",
|
|
154
|
-
children: e.map((e) => /* @__PURE__ */
|
|
154
|
+
children: e.map((e) => /* @__PURE__ */ E(l, {
|
|
155
155
|
app: e,
|
|
156
156
|
onClick: () => Z(`/apps/${e.id}/webhooks`)
|
|
157
157
|
}, e.id))
|
|
158
|
-
}) : /* @__PURE__ */
|
|
159
|
-
icon: /* @__PURE__ */
|
|
158
|
+
}) : /* @__PURE__ */ E(n, {
|
|
159
|
+
icon: /* @__PURE__ */ E(_, { size: 32 }),
|
|
160
160
|
title: "No applications available",
|
|
161
161
|
description: I ? "No applications matched your search." : "Create an application before configuring webhooks.",
|
|
162
|
-
action: /* @__PURE__ */
|
|
162
|
+
action: /* @__PURE__ */ D("button", {
|
|
163
163
|
onClick: () => Z("/apps/new"),
|
|
164
164
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
|
|
165
|
-
children: [/* @__PURE__ */
|
|
165
|
+
children: [/* @__PURE__ */ E(x, { size: 16 }), "Create Application"]
|
|
166
166
|
})
|
|
167
167
|
})
|
|
168
168
|
]
|
|
@@ -170,37 +170,37 @@ var A = () => {
|
|
|
170
170
|
})
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
|
-
if (K && !G) return /* @__PURE__ */
|
|
173
|
+
if (K && !G) return /* @__PURE__ */ E(s, {
|
|
174
174
|
title: P("devportal.webhooks", "Webhooks"),
|
|
175
175
|
description: P("devportal.manageWebhooksApp", "Manage webhooks for this application"),
|
|
176
|
-
backLink: `/apps/${
|
|
176
|
+
backLink: `/apps/${k}`,
|
|
177
177
|
backLabel: P("devportal.backToApplication", "Back to Application"),
|
|
178
|
-
children: /* @__PURE__ */
|
|
178
|
+
children: /* @__PURE__ */ D("div", {
|
|
179
179
|
className: "flex items-center justify-center py-12",
|
|
180
|
-
children: [/* @__PURE__ */
|
|
180
|
+
children: [/* @__PURE__ */ E(y, { className: "h-8 w-8 animate-spin text-muted-foreground" }), /* @__PURE__ */ E("span", {
|
|
181
181
|
className: "ml-2 text-muted-foreground",
|
|
182
182
|
children: P("devportal.loadingWebhooks", "Loading webhooks...")
|
|
183
183
|
})]
|
|
184
184
|
})
|
|
185
185
|
});
|
|
186
|
-
if (q) return /* @__PURE__ */
|
|
186
|
+
if (q) return /* @__PURE__ */ E(s, {
|
|
187
187
|
title: P("devportal.webhooks", "Webhooks"),
|
|
188
188
|
description: P("devportal.manageWebhooksApp", "Manage webhooks for this application"),
|
|
189
|
-
backLink: `/apps/${
|
|
189
|
+
backLink: `/apps/${k}`,
|
|
190
190
|
backLabel: P("devportal.backToApplication", "Back to Application"),
|
|
191
|
-
children: /* @__PURE__ */
|
|
191
|
+
children: /* @__PURE__ */ D("div", {
|
|
192
192
|
className: "rounded-lg border border-destructive/50 bg-destructive/10 p-6 text-center",
|
|
193
193
|
children: [
|
|
194
|
-
/* @__PURE__ */
|
|
195
|
-
/* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ E(h, { className: "mx-auto h-8 w-8 text-destructive" }),
|
|
195
|
+
/* @__PURE__ */ E("h3", {
|
|
196
196
|
className: "mt-2 font-medium text-destructive",
|
|
197
197
|
children: P("devportal.failedToLoadWebhooks", "Failed to load webhooks")
|
|
198
198
|
}),
|
|
199
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ E("p", {
|
|
200
200
|
className: "mt-1 text-sm text-muted-foreground",
|
|
201
|
-
children:
|
|
201
|
+
children: o(q)
|
|
202
202
|
}),
|
|
203
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ E("button", {
|
|
204
204
|
onClick: () => J(),
|
|
205
205
|
className: "mt-4 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
|
|
206
206
|
children: P("devportal.tryAgain", "Try Again")
|
|
@@ -212,15 +212,15 @@ var A = () => {
|
|
|
212
212
|
{
|
|
213
213
|
key: "name",
|
|
214
214
|
header: "Webhook",
|
|
215
|
-
render: (e) => /* @__PURE__ */
|
|
215
|
+
render: (e) => /* @__PURE__ */ D("div", {
|
|
216
216
|
className: "flex items-center gap-3",
|
|
217
|
-
children: [/* @__PURE__ */
|
|
217
|
+
children: [/* @__PURE__ */ E("div", {
|
|
218
218
|
className: t("flex h-10 w-10 items-center justify-center rounded-lg", e.status === "ACTIVE" ? "bg-status-success-bg-subtle text-status-success-text" : e.status === "FAILED" ? "bg-status-error-bg-subtle text-status-error-text" : e.status === "PAUSED" ? "bg-status-warning-bg-subtle text-status-warning-text" : "bg-bg-sunken text-text-tertiary"),
|
|
219
|
-
children: /* @__PURE__ */
|
|
220
|
-
}), /* @__PURE__ */
|
|
219
|
+
children: /* @__PURE__ */ E(C, { size: 20 })
|
|
220
|
+
}), /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
|
|
221
221
|
className: "font-medium",
|
|
222
222
|
children: e.name
|
|
223
|
-
}), /* @__PURE__ */
|
|
223
|
+
}), /* @__PURE__ */ E("p", {
|
|
224
224
|
className: "text-xs text-muted-foreground truncate max-w-xs",
|
|
225
225
|
children: e.url
|
|
226
226
|
})] })]
|
|
@@ -229,12 +229,12 @@ var A = () => {
|
|
|
229
229
|
{
|
|
230
230
|
key: "events",
|
|
231
231
|
header: "Events",
|
|
232
|
-
render: (e) => /* @__PURE__ */
|
|
232
|
+
render: (e) => /* @__PURE__ */ D("div", {
|
|
233
233
|
className: "flex flex-wrap gap-1",
|
|
234
|
-
children: [e.events.slice(0, 2).map((e) => /* @__PURE__ */
|
|
234
|
+
children: [e.events.slice(0, 2).map((e) => /* @__PURE__ */ E("span", {
|
|
235
235
|
className: "inline-flex rounded bg-muted px-1.5 py-0.5 text-xs",
|
|
236
236
|
children: e.split(".")[0]
|
|
237
|
-
}, e)), e.events.length > 2 && /* @__PURE__ */
|
|
237
|
+
}, e)), e.events.length > 2 && /* @__PURE__ */ D("span", {
|
|
238
238
|
className: "text-xs text-muted-foreground",
|
|
239
239
|
children: [
|
|
240
240
|
"+",
|
|
@@ -247,9 +247,9 @@ var A = () => {
|
|
|
247
247
|
{
|
|
248
248
|
key: "status",
|
|
249
249
|
header: "Status",
|
|
250
|
-
render: (e) => /* @__PURE__ */
|
|
250
|
+
render: (e) => /* @__PURE__ */ D("div", {
|
|
251
251
|
className: "flex items-center gap-2",
|
|
252
|
-
children: [ie(e.status), /* @__PURE__ */
|
|
252
|
+
children: [ie(e.status), /* @__PURE__ */ E(c, {
|
|
253
253
|
status: e.status,
|
|
254
254
|
type: "webhook"
|
|
255
255
|
})]
|
|
@@ -260,17 +260,17 @@ var A = () => {
|
|
|
260
260
|
header: "Success Rate",
|
|
261
261
|
render: (e) => {
|
|
262
262
|
let n = ae(e);
|
|
263
|
-
return /* @__PURE__ */
|
|
263
|
+
return /* @__PURE__ */ D("div", {
|
|
264
264
|
className: "w-24",
|
|
265
|
-
children: [/* @__PURE__ */
|
|
265
|
+
children: [/* @__PURE__ */ E("div", {
|
|
266
266
|
className: "flex items-center justify-between text-xs mb-1",
|
|
267
|
-
children: /* @__PURE__ */
|
|
267
|
+
children: /* @__PURE__ */ D("span", {
|
|
268
268
|
className: t(n >= 95 ? "text-status-success-text" : n >= 80 ? "text-status-warning-text" : "text-status-error-text"),
|
|
269
269
|
children: [n, "%"]
|
|
270
270
|
})
|
|
271
|
-
}), /* @__PURE__ */
|
|
271
|
+
}), /* @__PURE__ */ E("div", {
|
|
272
272
|
className: "h-1.5 rounded-full bg-muted",
|
|
273
|
-
children: /* @__PURE__ */
|
|
273
|
+
children: /* @__PURE__ */ E("div", {
|
|
274
274
|
className: t("h-full rounded-full transition-all", n >= 95 ? "bg-status-success-bg-subtle" : n >= 80 ? "bg-status-warning-bg-subtle" : "bg-status-error-bg-subtle"),
|
|
275
275
|
style: { width: `${n}%` }
|
|
276
276
|
})
|
|
@@ -281,18 +281,18 @@ var A = () => {
|
|
|
281
281
|
{
|
|
282
282
|
key: "deliveries",
|
|
283
283
|
header: "Deliveries",
|
|
284
|
-
render: (e) => /* @__PURE__ */
|
|
284
|
+
render: (e) => /* @__PURE__ */ D("div", {
|
|
285
285
|
className: "text-sm",
|
|
286
286
|
children: [
|
|
287
|
-
/* @__PURE__ */
|
|
287
|
+
/* @__PURE__ */ E("span", {
|
|
288
288
|
className: "text-status-success-text",
|
|
289
289
|
children: e.successCount.toLocaleString()
|
|
290
290
|
}),
|
|
291
|
-
/* @__PURE__ */
|
|
291
|
+
/* @__PURE__ */ E("span", {
|
|
292
292
|
className: "text-muted-foreground",
|
|
293
293
|
children: " / "
|
|
294
294
|
}),
|
|
295
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ E("span", {
|
|
296
296
|
className: "text-status-error-text",
|
|
297
297
|
children: e.failureCount.toLocaleString()
|
|
298
298
|
})
|
|
@@ -302,9 +302,9 @@ var A = () => {
|
|
|
302
302
|
{
|
|
303
303
|
key: "lastTriggered",
|
|
304
304
|
header: "Last Triggered",
|
|
305
|
-
render: (e) => /* @__PURE__ */
|
|
305
|
+
render: (e) => /* @__PURE__ */ E("span", {
|
|
306
306
|
className: "text-sm text-muted-foreground",
|
|
307
|
-
children: e.lastTriggeredAt ?
|
|
307
|
+
children: e.lastTriggeredAt ? A(e.lastTriggeredAt) : "Never"
|
|
308
308
|
})
|
|
309
309
|
}
|
|
310
310
|
], $ = {
|
|
@@ -313,63 +313,63 @@ var A = () => {
|
|
|
313
313
|
failed: Y.filter((e) => e.status === "FAILED").length,
|
|
314
314
|
paused: Y.filter((e) => e.status === "PAUSED").length
|
|
315
315
|
};
|
|
316
|
-
return /* @__PURE__ */
|
|
316
|
+
return /* @__PURE__ */ E(u, {
|
|
317
317
|
permission: d.WEBHOOK_READ,
|
|
318
|
-
children: /* @__PURE__ */
|
|
318
|
+
children: /* @__PURE__ */ D(s, {
|
|
319
319
|
title: P("devportal.webhooks", "Webhooks"),
|
|
320
320
|
description: P("devportal.manageWebhooksApp", "Manage webhooks for this application"),
|
|
321
|
-
backLink: `/apps/${
|
|
321
|
+
backLink: `/apps/${k}`,
|
|
322
322
|
backLabel: P("devportal.backToApplication", "Back to Application"),
|
|
323
|
-
actions: /* @__PURE__ */
|
|
324
|
-
onClick: () => Z(`/apps/${
|
|
323
|
+
actions: /* @__PURE__ */ D("button", {
|
|
324
|
+
onClick: () => Z(`/apps/${k}/webhooks/new`),
|
|
325
325
|
disabled: !F.allowed,
|
|
326
326
|
"aria-disabled": !F.allowed,
|
|
327
327
|
title: F.allowed ? void 0 : P("devportal.common.noPermission", "You do not have permission to perform this action"),
|
|
328
328
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
|
|
329
|
-
children: [/* @__PURE__ */
|
|
329
|
+
children: [/* @__PURE__ */ E(x, {
|
|
330
330
|
size: 16,
|
|
331
331
|
"aria-hidden": "true"
|
|
332
332
|
}), P("devportal.createWebhook", "Create Webhook")]
|
|
333
333
|
}),
|
|
334
334
|
children: [
|
|
335
|
-
/* @__PURE__ */
|
|
335
|
+
/* @__PURE__ */ E("div", {
|
|
336
336
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
337
|
-
children: /* @__PURE__ */
|
|
337
|
+
children: /* @__PURE__ */ D("div", {
|
|
338
338
|
className: "flex flex-1 items-center gap-4",
|
|
339
|
-
children: [/* @__PURE__ */
|
|
339
|
+
children: [/* @__PURE__ */ D("div", {
|
|
340
340
|
className: "relative flex-1 max-w-md",
|
|
341
|
-
children: [/* @__PURE__ */
|
|
341
|
+
children: [/* @__PURE__ */ E(S, {
|
|
342
342
|
size: 16,
|
|
343
343
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"
|
|
344
|
-
}), /* @__PURE__ */
|
|
344
|
+
}), /* @__PURE__ */ E("input", {
|
|
345
345
|
type: "text",
|
|
346
346
|
placeholder: "Search by name or URL...",
|
|
347
347
|
value: I,
|
|
348
348
|
onChange: (e) => L(e.target.value),
|
|
349
349
|
className: "w-full rounded-md border bg-background pl-9 pr-4 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary"
|
|
350
350
|
})]
|
|
351
|
-
}), /* @__PURE__ */
|
|
351
|
+
}), /* @__PURE__ */ D("select", {
|
|
352
352
|
value: R,
|
|
353
353
|
onChange: (e) => z(e.target.value),
|
|
354
354
|
className: "rounded-md border bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary",
|
|
355
355
|
children: [
|
|
356
|
-
/* @__PURE__ */
|
|
356
|
+
/* @__PURE__ */ E("option", {
|
|
357
357
|
value: "",
|
|
358
358
|
children: "All Status"
|
|
359
359
|
}),
|
|
360
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ E("option", {
|
|
361
361
|
value: "ACTIVE",
|
|
362
362
|
children: "Active"
|
|
363
363
|
}),
|
|
364
|
-
/* @__PURE__ */
|
|
364
|
+
/* @__PURE__ */ E("option", {
|
|
365
365
|
value: "PAUSED",
|
|
366
366
|
children: "Paused"
|
|
367
367
|
}),
|
|
368
|
-
/* @__PURE__ */
|
|
368
|
+
/* @__PURE__ */ E("option", {
|
|
369
369
|
value: "FAILED",
|
|
370
370
|
children: "Failed"
|
|
371
371
|
}),
|
|
372
|
-
/* @__PURE__ */
|
|
372
|
+
/* @__PURE__ */ E("option", {
|
|
373
373
|
value: "DISABLED",
|
|
374
374
|
children: "Disabled"
|
|
375
375
|
})
|
|
@@ -377,64 +377,64 @@ var A = () => {
|
|
|
377
377
|
})]
|
|
378
378
|
})
|
|
379
379
|
}),
|
|
380
|
-
/* @__PURE__ */
|
|
380
|
+
/* @__PURE__ */ D("div", {
|
|
381
381
|
className: "grid grid-cols-2 gap-4 sm:grid-cols-4",
|
|
382
382
|
children: [
|
|
383
|
-
/* @__PURE__ */
|
|
383
|
+
/* @__PURE__ */ D("div", {
|
|
384
384
|
className: "rounded-lg border bg-card p-4",
|
|
385
|
-
children: [/* @__PURE__ */
|
|
385
|
+
children: [/* @__PURE__ */ D("div", {
|
|
386
386
|
className: "flex items-center gap-2 text-muted-foreground",
|
|
387
|
-
children: [/* @__PURE__ */
|
|
387
|
+
children: [/* @__PURE__ */ E(C, { size: 16 }), /* @__PURE__ */ E("span", {
|
|
388
388
|
className: "text-sm",
|
|
389
389
|
children: "Total Webhooks"
|
|
390
390
|
})]
|
|
391
|
-
}), /* @__PURE__ */
|
|
391
|
+
}), /* @__PURE__ */ E("p", {
|
|
392
392
|
className: "mt-1 text-2xl font-semibold",
|
|
393
393
|
children: $.total
|
|
394
394
|
})]
|
|
395
395
|
}),
|
|
396
|
-
/* @__PURE__ */
|
|
396
|
+
/* @__PURE__ */ D("div", {
|
|
397
397
|
className: "rounded-lg border bg-card p-4",
|
|
398
|
-
children: [/* @__PURE__ */
|
|
398
|
+
children: [/* @__PURE__ */ D("div", {
|
|
399
399
|
className: "flex items-center gap-2 text-status-success-text",
|
|
400
|
-
children: [/* @__PURE__ */
|
|
400
|
+
children: [/* @__PURE__ */ E(v, { size: 16 }), /* @__PURE__ */ E("span", {
|
|
401
401
|
className: "text-sm",
|
|
402
402
|
children: "Active"
|
|
403
403
|
})]
|
|
404
|
-
}), /* @__PURE__ */
|
|
404
|
+
}), /* @__PURE__ */ E("p", {
|
|
405
405
|
className: "mt-1 text-2xl font-semibold",
|
|
406
406
|
children: $.active
|
|
407
407
|
})]
|
|
408
408
|
}),
|
|
409
|
-
/* @__PURE__ */
|
|
409
|
+
/* @__PURE__ */ D("div", {
|
|
410
410
|
className: "rounded-lg border bg-card p-4",
|
|
411
|
-
children: [/* @__PURE__ */
|
|
411
|
+
children: [/* @__PURE__ */ D("div", {
|
|
412
412
|
className: "flex items-center gap-2 text-status-warning-text",
|
|
413
|
-
children: [/* @__PURE__ */
|
|
413
|
+
children: [/* @__PURE__ */ E(b, { size: 16 }), /* @__PURE__ */ E("span", {
|
|
414
414
|
className: "text-sm",
|
|
415
415
|
children: "Paused"
|
|
416
416
|
})]
|
|
417
|
-
}), /* @__PURE__ */
|
|
417
|
+
}), /* @__PURE__ */ E("p", {
|
|
418
418
|
className: "mt-1 text-2xl font-semibold",
|
|
419
419
|
children: $.paused
|
|
420
420
|
})]
|
|
421
421
|
}),
|
|
422
|
-
/* @__PURE__ */
|
|
422
|
+
/* @__PURE__ */ D("div", {
|
|
423
423
|
className: "rounded-lg border bg-card p-4",
|
|
424
|
-
children: [/* @__PURE__ */
|
|
424
|
+
children: [/* @__PURE__ */ D("div", {
|
|
425
425
|
className: "flex items-center gap-2 text-status-error-text",
|
|
426
|
-
children: [/* @__PURE__ */
|
|
426
|
+
children: [/* @__PURE__ */ E(w, { size: 16 }), /* @__PURE__ */ E("span", {
|
|
427
427
|
className: "text-sm",
|
|
428
428
|
children: "Failed"
|
|
429
429
|
})]
|
|
430
|
-
}), /* @__PURE__ */
|
|
430
|
+
}), /* @__PURE__ */ E("p", {
|
|
431
431
|
className: "mt-1 text-2xl font-semibold",
|
|
432
432
|
children: $.failed
|
|
433
433
|
})]
|
|
434
434
|
})
|
|
435
435
|
]
|
|
436
436
|
}),
|
|
437
|
-
/* @__PURE__ */
|
|
437
|
+
/* @__PURE__ */ D("p", {
|
|
438
438
|
className: "text-sm text-muted-foreground",
|
|
439
439
|
children: [
|
|
440
440
|
Q.length,
|
|
@@ -443,30 +443,30 @@ var A = () => {
|
|
|
443
443
|
" found"
|
|
444
444
|
]
|
|
445
445
|
}),
|
|
446
|
-
Q.length > 0 ? /* @__PURE__ */
|
|
446
|
+
Q.length > 0 ? /* @__PURE__ */ E(ee, {
|
|
447
447
|
data: Q,
|
|
448
448
|
columns: oe,
|
|
449
449
|
keyField: "id",
|
|
450
|
-
onRowClick: (e) => Z(`/apps/${
|
|
451
|
-
}) : /* @__PURE__ */
|
|
452
|
-
icon: /* @__PURE__ */
|
|
450
|
+
onRowClick: (e) => Z(`/apps/${k}/webhooks/${e.id}`)
|
|
451
|
+
}) : /* @__PURE__ */ E(n, {
|
|
452
|
+
icon: /* @__PURE__ */ E(C, { size: 32 }),
|
|
453
453
|
title: P("devportal.noWebhooksFound", "No webhooks found"),
|
|
454
454
|
description: I || R ? P("devportal.tryAdjustingFilters", "Try adjusting your filters") : P("devportal.createFirstWebhook", "Create your first webhook to receive real-time event notifications"),
|
|
455
|
-
action: !I && !R ? /* @__PURE__ */
|
|
456
|
-
onClick: () => Z(`/apps/${
|
|
455
|
+
action: !I && !R ? /* @__PURE__ */ D("button", {
|
|
456
|
+
onClick: () => Z(`/apps/${k}/webhooks/new`),
|
|
457
457
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
|
|
458
|
-
children: [/* @__PURE__ */
|
|
458
|
+
children: [/* @__PURE__ */ E(x, { size: 16 }), P("devportal.createWebhook", "Create Webhook")]
|
|
459
459
|
}) : void 0
|
|
460
460
|
})
|
|
461
461
|
]
|
|
462
462
|
})
|
|
463
463
|
});
|
|
464
464
|
};
|
|
465
|
-
function
|
|
465
|
+
function A(e) {
|
|
466
466
|
let t = new Date(e), n = (/* @__PURE__ */ new Date()).getTime() - t.getTime(), r = Math.floor(n / 6e4), i = Math.floor(r / 60), a = Math.floor(i / 24);
|
|
467
467
|
return r < 1 ? "Just now" : r < 60 ? `${r}m ago` : i < 24 ? `${i}h ago` : a < 7 ? `${a}d ago` : t.toLocaleDateString();
|
|
468
468
|
}
|
|
469
469
|
//#endregion
|
|
470
|
-
export {
|
|
470
|
+
export { k as WebhooksPage };
|
|
471
471
|
|
|
472
472
|
//# sourceMappingURL=WebhooksPage.js.map
|