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