@burdenoff/microfe-devportal 2026.716.2 → 2026.720.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/components/PermissionGuard.d.ts +14 -1
- package/dist/devportal/components/PermissionGuard.d.ts.map +1 -1
- package/dist/devportal/components/PermissionGuard.js +16 -13
- package/dist/devportal/components/PermissionGuard.js.map +1 -1
- package/dist/devportal/hooks/usePackageUpload.d.ts.map +1 -1
- package/dist/devportal/hooks/usePackageUpload.js.map +1 -1
- package/dist/devportal/pages/AdminReviewPage.js +9 -9
- package/dist/devportal/pages/ApiKeysPage.js +180 -181
- package/dist/devportal/pages/ApiKeysPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationDetailPage.js +3 -3
- package/dist/devportal/pages/ApplicationVersionsPage.js +4 -4
- package/dist/devportal/pages/ApplicationVersionsPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationsPage.js +4 -4
- package/dist/devportal/pages/ApplicationsPage.js.map +1 -1
- package/dist/devportal/pages/CreateApiKeyPage.js +1 -1
- package/dist/devportal/pages/CreateApplicationPage.d.ts.map +1 -1
- package/dist/devportal/pages/CreateApplicationPage.js.map +1 -1
- package/dist/devportal/pages/CreateOAuthClientPage.js +1 -1
- package/dist/devportal/pages/CreateOrganizationPage.js +1 -1
- package/dist/devportal/pages/CreatePhysicalItemPage.d.ts.map +1 -1
- package/dist/devportal/pages/CreatePhysicalItemPage.js +147 -116
- package/dist/devportal/pages/CreatePhysicalItemPage.js.map +1 -1
- package/dist/devportal/pages/CreateWebhookPage.js +25 -25
- package/dist/devportal/pages/DashboardPage.d.ts.map +1 -1
- package/dist/devportal/pages/DashboardPage.js +110 -111
- package/dist/devportal/pages/DashboardPage.js.map +1 -1
- package/dist/devportal/pages/DelegationsPage.js +1 -1
- package/dist/devportal/pages/EditApplicationPage.d.ts.map +1 -1
- package/dist/devportal/pages/EditApplicationPage.js +4 -4
- package/dist/devportal/pages/EditApplicationPage.js.map +1 -1
- package/dist/devportal/pages/ListingPreviewPage.d.ts.map +1 -1
- package/dist/devportal/pages/ListingPreviewPage.js +160 -161
- package/dist/devportal/pages/ListingPreviewPage.js.map +1 -1
- package/dist/devportal/pages/OAuthClientDetailPage.d.ts.map +1 -1
- package/dist/devportal/pages/OAuthClientDetailPage.js +166 -167
- package/dist/devportal/pages/OAuthClientDetailPage.js.map +1 -1
- package/dist/devportal/pages/OAuthClientsPage.d.ts.map +1 -1
- package/dist/devportal/pages/OAuthClientsPage.js +121 -122
- package/dist/devportal/pages/OAuthClientsPage.js.map +1 -1
- package/dist/devportal/pages/OrganizationDetailPage.js +3 -3
- package/dist/devportal/pages/OrganizationMembersPage.js +4 -4
- package/dist/devportal/pages/OrganizationsPage.js +1 -1
- package/dist/devportal/pages/PublishPage.d.ts.map +1 -1
- package/dist/devportal/pages/PublishPage.js +246 -246
- package/dist/devportal/pages/PublishPage.js.map +1 -1
- package/dist/devportal/pages/PublisherProfilePage.js +4 -4
- package/dist/devportal/pages/PublisherProfilePage.js.map +1 -1
- package/dist/devportal/pages/SellerDashboardPage.d.ts.map +1 -1
- package/dist/devportal/pages/SellerDashboardPage.js.map +1 -1
- package/dist/devportal/pages/SellerItemsPage.d.ts.map +1 -1
- package/dist/devportal/pages/SellerItemsPage.js.map +1 -1
- package/dist/devportal/pages/StoreSubmissionPage.js +3 -3
- package/dist/devportal/pages/WebhookDetailPage.js +3 -3
- package/dist/devportal/pages/WebhooksPage.js +129 -129
- package/dist/devportal/pages/WebhooksPage.js.map +1 -1
- package/dist/devportal/types/index.d.ts.map +1 -1
- package/dist/devportal/types/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -6,20 +6,19 @@ import { getErrorMessage as re } from "../hooks/useGraphQL.js";
|
|
|
6
6
|
import { PageLayout as i } from "../components/PageLayout.js";
|
|
7
7
|
import { ActiveIndicator as ie } from "../components/StatusBadge.js";
|
|
8
8
|
import { SelectionCheckbox as a } from "../components/SelectionCheckbox.js";
|
|
9
|
-
import { NewSecretAlert as
|
|
10
|
-
import { DataTable as
|
|
9
|
+
import { NewSecretAlert as o } from "../components/SecretDisplay.js";
|
|
10
|
+
import { DataTable as ae } from "../components/DataTable.js";
|
|
11
11
|
import { ConfirmDialog as s } from "../components/ConfirmDialog.js";
|
|
12
12
|
import { PermissionGuard as oe } from "../components/PermissionGuard.js";
|
|
13
13
|
import "../components/index.js";
|
|
14
|
-
import { DEVPORTAL_PERMISSIONS as se } from "../constants/permissions.js";
|
|
15
14
|
import "../hooks/index.js";
|
|
16
15
|
import { useMemo as c, useState as l } from "react";
|
|
17
|
-
import { useI18n as
|
|
18
|
-
import { AlertCircle as
|
|
19
|
-
import { jsx as
|
|
20
|
-
import { EmphasisPanel as he, GlassCard as
|
|
16
|
+
import { useI18n as se } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
17
|
+
import { AlertCircle as ce, AlertTriangle as le, Ban as u, Clock as ue, Key as d, Loader2 as de, Plus as f, RotateCw as fe, Search as pe, Shield as me } from "lucide-react";
|
|
18
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
19
|
+
import { EmphasisPanel as he, GlassCard as h } from "@burdenoff/fe-libs/ui";
|
|
21
20
|
//#region src/devportal/pages/ApiKeysPage.tsx
|
|
22
|
-
function
|
|
21
|
+
function g(e) {
|
|
23
22
|
return {
|
|
24
23
|
id: e.id,
|
|
25
24
|
name: e.name,
|
|
@@ -37,89 +36,89 @@ var _ = (e) => {
|
|
|
37
36
|
let t = Math.ceil((new Date(e).getTime() - Date.now()) / (1e3 * 60 * 60 * 24));
|
|
38
37
|
return t <= 30 && t > 0;
|
|
39
38
|
}, v = (e) => e ? new Date(e).getTime() < Date.now() : !1, y = () => {
|
|
40
|
-
let { navigate: y, basePath:
|
|
41
|
-
let n =
|
|
39
|
+
let { navigate: y, basePath: b, activeOrgId: ge } = e(), { t: _e } = se(), x = (e, t) => {
|
|
40
|
+
let n = _e(e);
|
|
42
41
|
return n === e ? t : n;
|
|
43
|
-
}, [
|
|
44
|
-
let e =
|
|
42
|
+
}, [S, ve] = l(""), [C, ye] = l("all"), [w, T] = l(null), [E, D] = l(null), [O, k] = l(null), [A, j] = l(/* @__PURE__ */ new Set()), [M, N] = l(null), [be, P] = l(!1), { data: F, loading: xe, error: I, refetch: L } = ee({ fetchPolicy: "cache-and-network" }), { data: R } = r({ fetchPolicy: "cache-first" }), z = c(() => {
|
|
43
|
+
let e = R?.currentUserApps?.apps;
|
|
45
44
|
return e?.length ? new Set(e.map((e) => e.id)) : null;
|
|
46
|
-
}, [
|
|
47
|
-
y?.(`${
|
|
48
|
-
},
|
|
49
|
-
if (
|
|
50
|
-
await
|
|
45
|
+
}, [R?.currentUserApps?.apps]), [B, { loading: V }] = te(), [Se, { loading: H }] = ne(), U = c(() => F?.myApiKeys?.apiKeys.map(g) ?? [], [F?.myApiKeys?.apiKeys]), W = (e) => {
|
|
46
|
+
y?.(`${b}${e}`);
|
|
47
|
+
}, Ce = async () => {
|
|
48
|
+
if (w) try {
|
|
49
|
+
await B({ variables: { keyId: w.id } }), T(null), await L();
|
|
51
50
|
} catch {}
|
|
52
|
-
},
|
|
53
|
-
if (
|
|
54
|
-
let e = (await
|
|
55
|
-
e &&
|
|
51
|
+
}, we = async () => {
|
|
52
|
+
if (E) try {
|
|
53
|
+
let e = (await Se({ variables: { keyId: E.id } })).data?.rotateAPIKey.apiSecret;
|
|
54
|
+
e && k(e), D(null), await L();
|
|
56
55
|
} catch {}
|
|
57
|
-
},
|
|
58
|
-
let t = !
|
|
56
|
+
}, G = U.filter((e) => {
|
|
57
|
+
let t = !z || z.has(e.appId), n = !S || e.name.toLowerCase().includes(S.toLowerCase()) || e.prefix.toLowerCase().includes(S.toLowerCase()) || (e.appName?.toLowerCase().includes(S.toLowerCase()) ?? !1), r = C === "all" || C === "active" && !v(e.expiresAt) || C === "expired" && v(e.expiresAt);
|
|
59
58
|
return t && n && r;
|
|
60
|
-
}),
|
|
61
|
-
|
|
59
|
+
}), K = c(() => U.filter((e) => A.has(e.id)), [U, A]), q = c(() => K.filter((e) => !v(e.expiresAt)), [K]), J = G.filter((e) => !v(e.expiresAt)), Y = J.length > 0 && J.every((e) => A.has(e.id)), X = J.some((e) => A.has(e.id)) && !Y, Te = (e, t) => {
|
|
60
|
+
j((n) => {
|
|
62
61
|
let r = new Set(n);
|
|
63
62
|
return t ? r.add(e) : r.delete(e), r;
|
|
64
63
|
});
|
|
65
64
|
}, Z = (e) => {
|
|
66
|
-
|
|
65
|
+
j((t) => {
|
|
67
66
|
let n = new Set(t);
|
|
68
|
-
return
|
|
67
|
+
return J.forEach((t) => {
|
|
69
68
|
e ? n.add(t.id) : n.delete(t.id);
|
|
70
69
|
}), n;
|
|
71
70
|
});
|
|
72
|
-
}, Q = () =>
|
|
73
|
-
if (
|
|
74
|
-
title:
|
|
75
|
-
description:
|
|
76
|
-
children: /* @__PURE__ */
|
|
71
|
+
}, Q = () => j(/* @__PURE__ */ new Set());
|
|
72
|
+
if (xe && !F) return /* @__PURE__ */ p(i, {
|
|
73
|
+
title: x("devportal.apiKeys", "API Keys"),
|
|
74
|
+
description: x("devportal.manageApiKeys", "Manage your API keys for programmatic access"),
|
|
75
|
+
children: /* @__PURE__ */ m("div", {
|
|
77
76
|
className: "flex items-center justify-center py-12",
|
|
78
|
-
children: [/* @__PURE__ */
|
|
77
|
+
children: [/* @__PURE__ */ p(de, { className: "h-8 w-8 animate-spin text-text-secondary" }), /* @__PURE__ */ p("span", {
|
|
79
78
|
className: "ml-2 text-text-secondary",
|
|
80
|
-
children:
|
|
79
|
+
children: x("devportal.loadingApiKeys", "Loading API keys...")
|
|
81
80
|
})]
|
|
82
81
|
})
|
|
83
82
|
});
|
|
84
|
-
if (
|
|
85
|
-
title:
|
|
86
|
-
description:
|
|
87
|
-
children: /* @__PURE__ */
|
|
83
|
+
if (I) return /* @__PURE__ */ p(i, {
|
|
84
|
+
title: x("devportal.apiKeys", "API Keys"),
|
|
85
|
+
description: x("devportal.manageApiKeys", "Manage your API keys for programmatic access"),
|
|
86
|
+
children: /* @__PURE__ */ m("div", {
|
|
88
87
|
className: "rounded-lg border border-status-error-border/50 bg-status-error-bg/10 p-6 text-center",
|
|
89
88
|
children: [
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ p(ce, { className: "mx-auto h-8 w-8 text-status-error-text" }),
|
|
90
|
+
/* @__PURE__ */ p("h3", {
|
|
92
91
|
className: "mt-2 font-medium text-status-error-text",
|
|
93
|
-
children:
|
|
92
|
+
children: x("devportal.failedToLoadApiKeys", "Failed to load API keys")
|
|
94
93
|
}),
|
|
95
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ p("p", {
|
|
96
95
|
className: "mt-1 text-sm text-text-secondary",
|
|
97
|
-
children: re(
|
|
96
|
+
children: re(I)
|
|
98
97
|
}),
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
onClick: () =>
|
|
98
|
+
/* @__PURE__ */ p("button", {
|
|
99
|
+
onClick: () => L(),
|
|
101
100
|
className: "mt-4 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
102
|
-
children:
|
|
101
|
+
children: x("devportal.tryAgain", "Try Again")
|
|
103
102
|
})
|
|
104
103
|
]
|
|
105
104
|
})
|
|
106
105
|
});
|
|
107
|
-
let
|
|
106
|
+
let Ee = [
|
|
108
107
|
{
|
|
109
108
|
key: "select",
|
|
110
|
-
header: /* @__PURE__ */
|
|
111
|
-
checked:
|
|
112
|
-
indeterminate:
|
|
109
|
+
header: /* @__PURE__ */ p(a, {
|
|
110
|
+
checked: Y,
|
|
111
|
+
indeterminate: X,
|
|
113
112
|
onChange: Z,
|
|
114
113
|
ariaLabel: "Select all visible API keys"
|
|
115
114
|
}),
|
|
116
115
|
className: "w-12",
|
|
117
|
-
render: (e) => /* @__PURE__ */
|
|
116
|
+
render: (e) => /* @__PURE__ */ p("div", {
|
|
118
117
|
onClick: (e) => e.stopPropagation(),
|
|
119
|
-
children: /* @__PURE__ */
|
|
120
|
-
checked:
|
|
118
|
+
children: /* @__PURE__ */ p(a, {
|
|
119
|
+
checked: A.has(e.id),
|
|
121
120
|
disabled: v(e.expiresAt),
|
|
122
|
-
onChange: (t) =>
|
|
121
|
+
onChange: (t) => Te(e.id, t),
|
|
123
122
|
ariaLabel: `Select API key ${e.name}`
|
|
124
123
|
})
|
|
125
124
|
})
|
|
@@ -127,28 +126,28 @@ var _ = (e) => {
|
|
|
127
126
|
{
|
|
128
127
|
key: "name",
|
|
129
128
|
header: "API Key",
|
|
130
|
-
render: (e) => /* @__PURE__ */
|
|
129
|
+
render: (e) => /* @__PURE__ */ m("div", {
|
|
131
130
|
className: "flex items-center gap-3",
|
|
132
|
-
children: [/* @__PURE__ */
|
|
131
|
+
children: [/* @__PURE__ */ p("div", {
|
|
133
132
|
className: t("flex h-10 w-10 items-center justify-center rounded-lg", v(e.expiresAt) ? "bg-status-error-bg-subtle text-status-error-text" : "bg-action-primary-bg/10 text-primary"),
|
|
134
|
-
children: /* @__PURE__ */
|
|
135
|
-
}), /* @__PURE__ */
|
|
133
|
+
children: /* @__PURE__ */ p(d, { size: 20 })
|
|
134
|
+
}), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("div", {
|
|
136
135
|
className: "flex items-center gap-2",
|
|
137
136
|
children: [
|
|
138
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ p("p", {
|
|
139
138
|
className: "font-medium",
|
|
140
139
|
children: e.name
|
|
141
140
|
}),
|
|
142
|
-
v(e.expiresAt) && /* @__PURE__ */
|
|
141
|
+
v(e.expiresAt) && /* @__PURE__ */ p("span", {
|
|
143
142
|
className: "rounded bg-status-error-bg-subtle px-1.5 py-0.5 text-xs text-status-error-text",
|
|
144
143
|
children: "Expired"
|
|
145
144
|
}),
|
|
146
|
-
_(e.expiresAt) && !v(e.expiresAt) && /* @__PURE__ */
|
|
145
|
+
_(e.expiresAt) && !v(e.expiresAt) && /* @__PURE__ */ p("span", {
|
|
147
146
|
className: "rounded bg-status-warning-bg-subtle px-1.5 py-0.5 text-xs text-status-warning-text",
|
|
148
147
|
children: "Expiring Soon"
|
|
149
148
|
})
|
|
150
149
|
]
|
|
151
|
-
}), e.appName && /* @__PURE__ */
|
|
150
|
+
}), e.appName && /* @__PURE__ */ m("p", {
|
|
152
151
|
className: "text-xs text-text-secondary",
|
|
153
152
|
children: ["App: ", e.appName]
|
|
154
153
|
})] })]
|
|
@@ -157,7 +156,7 @@ var _ = (e) => {
|
|
|
157
156
|
{
|
|
158
157
|
key: "prefix",
|
|
159
158
|
header: "Key Prefix",
|
|
160
|
-
render: (e) => /* @__PURE__ */
|
|
159
|
+
render: (e) => /* @__PURE__ */ m("code", {
|
|
161
160
|
className: "text-sm text-text-secondary",
|
|
162
161
|
children: [e.prefix, "..."]
|
|
163
162
|
})
|
|
@@ -165,12 +164,12 @@ var _ = (e) => {
|
|
|
165
164
|
{
|
|
166
165
|
key: "scopes",
|
|
167
166
|
header: "Scopes",
|
|
168
|
-
render: (e) => /* @__PURE__ */
|
|
167
|
+
render: (e) => /* @__PURE__ */ m("div", {
|
|
169
168
|
className: "flex flex-wrap gap-1",
|
|
170
|
-
children: [e.scopes.slice(0, 3).map((e) => /* @__PURE__ */
|
|
169
|
+
children: [e.scopes.slice(0, 3).map((e) => /* @__PURE__ */ p("span", {
|
|
171
170
|
className: "inline-flex rounded bg-bg-sunken px-1.5 py-0.5 text-xs",
|
|
172
171
|
children: e
|
|
173
|
-
}, e)), e.scopes.length > 3 && /* @__PURE__ */
|
|
172
|
+
}, e)), e.scopes.length > 3 && /* @__PURE__ */ m("span", {
|
|
174
173
|
className: "text-xs text-text-secondary",
|
|
175
174
|
children: ["+", e.scopes.length - 3]
|
|
176
175
|
})]
|
|
@@ -179,7 +178,7 @@ var _ = (e) => {
|
|
|
179
178
|
{
|
|
180
179
|
key: "lastUsed",
|
|
181
180
|
header: "Last Used",
|
|
182
|
-
render: (e) => /* @__PURE__ */
|
|
181
|
+
render: (e) => /* @__PURE__ */ p("span", {
|
|
183
182
|
className: "text-sm text-text-secondary",
|
|
184
183
|
children: e.lastUsedAt ? new Date(e.lastUsedAt).toLocaleDateString() : "Never"
|
|
185
184
|
})
|
|
@@ -187,7 +186,7 @@ var _ = (e) => {
|
|
|
187
186
|
{
|
|
188
187
|
key: "expires",
|
|
189
188
|
header: "Expires",
|
|
190
|
-
render: (e) => /* @__PURE__ */
|
|
189
|
+
render: (e) => /* @__PURE__ */ p("span", {
|
|
191
190
|
className: t("text-sm", v(e.expiresAt) ? "text-status-error-text" : _(e.expiresAt) ? "text-status-warning-text" : "text-text-secondary"),
|
|
192
191
|
children: e.expiresAt ? new Date(e.expiresAt).toLocaleDateString() : "Never"
|
|
193
192
|
})
|
|
@@ -195,9 +194,9 @@ var _ = (e) => {
|
|
|
195
194
|
{
|
|
196
195
|
key: "status",
|
|
197
196
|
header: "Status",
|
|
198
|
-
render: (e) => /* @__PURE__ */
|
|
197
|
+
render: (e) => /* @__PURE__ */ m("div", {
|
|
199
198
|
className: "flex items-center gap-2",
|
|
200
|
-
children: [/* @__PURE__ */
|
|
199
|
+
children: [/* @__PURE__ */ p(ie, { active: !v(e.expiresAt) }), /* @__PURE__ */ p("span", {
|
|
201
200
|
className: "text-sm",
|
|
202
201
|
children: v(e.expiresAt) ? "Expired" : "Active"
|
|
203
202
|
})]
|
|
@@ -207,32 +206,32 @@ var _ = (e) => {
|
|
|
207
206
|
key: "actions",
|
|
208
207
|
header: "Actions",
|
|
209
208
|
className: "w-28",
|
|
210
|
-
render: (e) => v(e.expiresAt) ? /* @__PURE__ */
|
|
209
|
+
render: (e) => v(e.expiresAt) ? /* @__PURE__ */ p("span", {
|
|
211
210
|
className: "text-xs text-text-secondary",
|
|
212
211
|
children: "No actions"
|
|
213
|
-
}) : /* @__PURE__ */
|
|
212
|
+
}) : /* @__PURE__ */ m("div", {
|
|
214
213
|
className: "flex items-center gap-1",
|
|
215
|
-
children: [/* @__PURE__ */
|
|
214
|
+
children: [/* @__PURE__ */ m("button", {
|
|
216
215
|
type: "button",
|
|
217
216
|
title: "Rotate secret",
|
|
218
|
-
disabled:
|
|
217
|
+
disabled: H,
|
|
219
218
|
onClick: (t) => {
|
|
220
|
-
t.stopPropagation(),
|
|
219
|
+
t.stopPropagation(), D(e);
|
|
221
220
|
},
|
|
222
221
|
className: t("inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs font-medium transition-colors", "text-status-info-text hover:bg-status-info-bg-subtle", "disabled:opacity-50 disabled:cursor-not-allowed"),
|
|
223
|
-
children: [/* @__PURE__ */
|
|
222
|
+
children: [/* @__PURE__ */ p(fe, { size: 14 }), /* @__PURE__ */ p("span", {
|
|
224
223
|
className: "sr-only sm:not-sr-only",
|
|
225
224
|
children: "Rotate"
|
|
226
225
|
})]
|
|
227
|
-
}), /* @__PURE__ */
|
|
226
|
+
}), /* @__PURE__ */ m("button", {
|
|
228
227
|
type: "button",
|
|
229
228
|
title: "Revoke key",
|
|
230
|
-
disabled:
|
|
229
|
+
disabled: V,
|
|
231
230
|
onClick: (t) => {
|
|
232
|
-
t.stopPropagation(),
|
|
231
|
+
t.stopPropagation(), T(e);
|
|
233
232
|
},
|
|
234
233
|
className: t("inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs font-medium transition-colors", "text-status-error-text hover:bg-status-error-bg-subtle", "disabled:opacity-50 disabled:cursor-not-allowed"),
|
|
235
|
-
children: [/* @__PURE__ */
|
|
234
|
+
children: [/* @__PURE__ */ p(u, { size: 14 }), /* @__PURE__ */ p("span", {
|
|
236
235
|
className: "sr-only sm:not-sr-only",
|
|
237
236
|
children: "Revoke"
|
|
238
237
|
})]
|
|
@@ -240,70 +239,70 @@ var _ = (e) => {
|
|
|
240
239
|
})
|
|
241
240
|
}
|
|
242
241
|
], $ = {
|
|
243
|
-
total:
|
|
244
|
-
active:
|
|
245
|
-
expiringSoon:
|
|
246
|
-
expired:
|
|
242
|
+
total: G.length,
|
|
243
|
+
active: G.filter((e) => !v(e.expiresAt)).length,
|
|
244
|
+
expiringSoon: G.filter((e) => _(e.expiresAt)).length,
|
|
245
|
+
expired: G.filter((e) => v(e.expiresAt)).length
|
|
247
246
|
};
|
|
248
|
-
return /* @__PURE__ */
|
|
249
|
-
|
|
250
|
-
children: /* @__PURE__ */
|
|
251
|
-
title:
|
|
252
|
-
description:
|
|
253
|
-
purpose:
|
|
254
|
-
actions: /* @__PURE__ */
|
|
255
|
-
onClick: () =>
|
|
247
|
+
return /* @__PURE__ */ p(oe, {
|
|
248
|
+
authOnly: !0,
|
|
249
|
+
children: /* @__PURE__ */ m(i, {
|
|
250
|
+
title: x("devportal.apiKeys", "API Keys"),
|
|
251
|
+
description: x("devportal.manageApiKeys", "Manage your API keys for programmatic access"),
|
|
252
|
+
purpose: x("devportal.apiKeysPurpose", "API keys authenticate server-to-server calls — use them in scripts, CI jobs, or backend services that talk to the platform without a logged-in user. Generate a key here, scope it to an app, and rotate it if it is ever exposed."),
|
|
253
|
+
actions: /* @__PURE__ */ m("button", {
|
|
254
|
+
onClick: () => W("/api-keys/new"),
|
|
256
255
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
257
|
-
children: [/* @__PURE__ */
|
|
256
|
+
children: [/* @__PURE__ */ p(f, { size: 16 }), x("devportal.generateApiKey", "Generate API Key")]
|
|
258
257
|
}),
|
|
259
258
|
children: [
|
|
260
|
-
|
|
259
|
+
O && /* @__PURE__ */ p(o, {
|
|
261
260
|
title: "API Key Rotated",
|
|
262
|
-
secret:
|
|
261
|
+
secret: O,
|
|
263
262
|
description: "The previous secret has been invalidated. Copy the new secret below — it will not be shown again.",
|
|
264
|
-
onDismiss: () =>
|
|
263
|
+
onDismiss: () => k(null)
|
|
265
264
|
}),
|
|
266
|
-
|
|
267
|
-
className: t("rounded-lg border px-4 py-3 text-sm",
|
|
268
|
-
children: /* @__PURE__ */
|
|
265
|
+
M && /* @__PURE__ */ p("div", {
|
|
266
|
+
className: t("rounded-lg border px-4 py-3 text-sm", M.type === "success" ? "border-border-subtle bg-status-success-bg-subtle text-status-success-text" : "border-status-error-border/40 bg-status-error-bg/10 text-status-error-text"),
|
|
267
|
+
children: /* @__PURE__ */ m("div", {
|
|
269
268
|
className: "flex items-center justify-between gap-3",
|
|
270
|
-
children: [/* @__PURE__ */
|
|
271
|
-
onClick: () =>
|
|
269
|
+
children: [/* @__PURE__ */ p("span", { children: M.message }), /* @__PURE__ */ p("button", {
|
|
270
|
+
onClick: () => N(null),
|
|
272
271
|
className: "text-xs font-medium underline underline-offset-2",
|
|
273
272
|
children: "Dismiss"
|
|
274
273
|
})]
|
|
275
274
|
})
|
|
276
275
|
}),
|
|
277
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ p("div", {
|
|
278
277
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
279
|
-
children: /* @__PURE__ */
|
|
278
|
+
children: /* @__PURE__ */ m("div", {
|
|
280
279
|
className: "flex flex-1 items-center gap-4",
|
|
281
|
-
children: [/* @__PURE__ */
|
|
280
|
+
children: [/* @__PURE__ */ m("div", {
|
|
282
281
|
className: "relative flex-1 max-w-md",
|
|
283
|
-
children: [/* @__PURE__ */
|
|
282
|
+
children: [/* @__PURE__ */ p(pe, {
|
|
284
283
|
size: 16,
|
|
285
284
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
|
|
286
|
-
}), /* @__PURE__ */
|
|
285
|
+
}), /* @__PURE__ */ p("input", {
|
|
287
286
|
type: "text",
|
|
288
287
|
placeholder: "Search by name, prefix, or app...",
|
|
289
|
-
value:
|
|
290
|
-
onChange: (e) =>
|
|
288
|
+
value: S,
|
|
289
|
+
onChange: (e) => ve(e.target.value),
|
|
291
290
|
className: "w-full rounded-md border bg-bg-surface pl-9 pr-4 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary"
|
|
292
291
|
})]
|
|
293
|
-
}), /* @__PURE__ */
|
|
294
|
-
value:
|
|
295
|
-
onChange: (e) =>
|
|
292
|
+
}), /* @__PURE__ */ m("select", {
|
|
293
|
+
value: C,
|
|
294
|
+
onChange: (e) => ye(e.target.value),
|
|
296
295
|
className: "rounded-md border bg-bg-surface px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary",
|
|
297
296
|
children: [
|
|
298
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ p("option", {
|
|
299
298
|
value: "all",
|
|
300
299
|
children: "All Status"
|
|
301
300
|
}),
|
|
302
|
-
/* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ p("option", {
|
|
303
302
|
value: "active",
|
|
304
303
|
children: "Active"
|
|
305
304
|
}),
|
|
306
|
-
/* @__PURE__ */
|
|
305
|
+
/* @__PURE__ */ p("option", {
|
|
307
306
|
value: "expired",
|
|
308
307
|
children: "Expired"
|
|
309
308
|
})
|
|
@@ -311,174 +310,174 @@ var _ = (e) => {
|
|
|
311
310
|
})]
|
|
312
311
|
})
|
|
313
312
|
}),
|
|
314
|
-
/* @__PURE__ */
|
|
313
|
+
/* @__PURE__ */ p(he, { children: /* @__PURE__ */ m("div", {
|
|
315
314
|
className: "grid grid-cols-2 gap-4 sm:grid-cols-4",
|
|
316
315
|
children: [
|
|
317
|
-
/* @__PURE__ */ h
|
|
316
|
+
/* @__PURE__ */ m(h, {
|
|
318
317
|
treatment: "metric",
|
|
319
318
|
className: "p-4",
|
|
320
|
-
children: [/* @__PURE__ */
|
|
319
|
+
children: [/* @__PURE__ */ m("div", {
|
|
321
320
|
className: "flex items-center gap-2 text-text-secondary",
|
|
322
|
-
children: [/* @__PURE__ */
|
|
321
|
+
children: [/* @__PURE__ */ p(d, { size: 16 }), /* @__PURE__ */ p("span", {
|
|
323
322
|
className: "text-sm",
|
|
324
323
|
children: "Total Keys"
|
|
325
324
|
})]
|
|
326
|
-
}), /* @__PURE__ */
|
|
325
|
+
}), /* @__PURE__ */ p("p", {
|
|
327
326
|
className: "mt-1 text-2xl font-semibold tabular-nums",
|
|
328
327
|
children: $.total
|
|
329
328
|
})]
|
|
330
329
|
}),
|
|
331
|
-
/* @__PURE__ */ h
|
|
330
|
+
/* @__PURE__ */ m(h, {
|
|
332
331
|
treatment: "metric",
|
|
333
332
|
className: "p-4",
|
|
334
|
-
children: [/* @__PURE__ */
|
|
333
|
+
children: [/* @__PURE__ */ m("div", {
|
|
335
334
|
className: "flex items-center gap-2 text-status-success-text",
|
|
336
|
-
children: [/* @__PURE__ */
|
|
335
|
+
children: [/* @__PURE__ */ p(me, { size: 16 }), /* @__PURE__ */ p("span", {
|
|
337
336
|
className: "text-sm",
|
|
338
337
|
children: "Active"
|
|
339
338
|
})]
|
|
340
|
-
}), /* @__PURE__ */
|
|
339
|
+
}), /* @__PURE__ */ p("p", {
|
|
341
340
|
className: "mt-1 text-2xl font-semibold tabular-nums",
|
|
342
341
|
children: $.active
|
|
343
342
|
})]
|
|
344
343
|
}),
|
|
345
|
-
/* @__PURE__ */ h
|
|
344
|
+
/* @__PURE__ */ m(h, {
|
|
346
345
|
treatment: "metric",
|
|
347
346
|
className: "p-4",
|
|
348
|
-
children: [/* @__PURE__ */
|
|
347
|
+
children: [/* @__PURE__ */ m("div", {
|
|
349
348
|
className: "flex items-center gap-2 text-status-warning-text",
|
|
350
|
-
children: [/* @__PURE__ */
|
|
349
|
+
children: [/* @__PURE__ */ p(ue, { size: 16 }), /* @__PURE__ */ p("span", {
|
|
351
350
|
className: "text-sm",
|
|
352
351
|
children: "Expiring Soon"
|
|
353
352
|
})]
|
|
354
|
-
}), /* @__PURE__ */
|
|
353
|
+
}), /* @__PURE__ */ p("p", {
|
|
355
354
|
className: "mt-1 text-2xl font-semibold tabular-nums",
|
|
356
355
|
children: $.expiringSoon
|
|
357
356
|
})]
|
|
358
357
|
}),
|
|
359
|
-
/* @__PURE__ */ h
|
|
358
|
+
/* @__PURE__ */ m(h, {
|
|
360
359
|
treatment: "metric",
|
|
361
360
|
className: "p-4",
|
|
362
|
-
children: [/* @__PURE__ */
|
|
361
|
+
children: [/* @__PURE__ */ m("div", {
|
|
363
362
|
className: "flex items-center gap-2 text-status-error-text",
|
|
364
|
-
children: [/* @__PURE__ */
|
|
363
|
+
children: [/* @__PURE__ */ p(le, { size: 16 }), /* @__PURE__ */ p("span", {
|
|
365
364
|
className: "text-sm",
|
|
366
365
|
children: "Expired"
|
|
367
366
|
})]
|
|
368
|
-
}), /* @__PURE__ */
|
|
367
|
+
}), /* @__PURE__ */ p("p", {
|
|
369
368
|
className: "mt-1 text-2xl font-semibold tabular-nums",
|
|
370
369
|
children: $.expired
|
|
371
370
|
})]
|
|
372
371
|
})
|
|
373
372
|
]
|
|
374
373
|
}) }),
|
|
375
|
-
/* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ m("p", {
|
|
376
375
|
className: "text-sm text-text-secondary",
|
|
377
376
|
children: [
|
|
378
|
-
|
|
377
|
+
G.length,
|
|
379
378
|
" API key",
|
|
380
|
-
|
|
379
|
+
G.length === 1 ? "" : "s",
|
|
381
380
|
" ",
|
|
382
381
|
"found"
|
|
383
382
|
]
|
|
384
383
|
}),
|
|
385
|
-
|
|
384
|
+
G.length > 0 && /* @__PURE__ */ p("div", {
|
|
386
385
|
className: "rounded-card border border-border-seam bg-bg-surface p-4",
|
|
387
|
-
children: /* @__PURE__ */
|
|
386
|
+
children: /* @__PURE__ */ m("div", {
|
|
388
387
|
className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
|
|
389
|
-
children: [/* @__PURE__ */
|
|
388
|
+
children: [/* @__PURE__ */ m("div", {
|
|
390
389
|
className: "flex flex-wrap items-center gap-3",
|
|
391
|
-
children: [/* @__PURE__ */
|
|
390
|
+
children: [/* @__PURE__ */ m("div", {
|
|
392
391
|
className: "flex items-center gap-2",
|
|
393
|
-
children: [/* @__PURE__ */
|
|
394
|
-
checked:
|
|
395
|
-
indeterminate:
|
|
392
|
+
children: [/* @__PURE__ */ p(a, {
|
|
393
|
+
checked: Y,
|
|
394
|
+
indeterminate: X,
|
|
396
395
|
onChange: Z,
|
|
397
396
|
ariaLabel: "Select all visible API keys"
|
|
398
|
-
}), /* @__PURE__ */
|
|
397
|
+
}), /* @__PURE__ */ p("span", {
|
|
399
398
|
className: "text-sm font-medium",
|
|
400
399
|
children: "Select all active keys"
|
|
401
400
|
})]
|
|
402
|
-
}),
|
|
401
|
+
}), A.size > 0 && /* @__PURE__ */ p("button", {
|
|
403
402
|
onClick: Q,
|
|
404
403
|
className: "text-sm text-text-secondary hover:text-text-primary",
|
|
405
404
|
children: "Clear selection"
|
|
406
405
|
})]
|
|
407
|
-
}), /* @__PURE__ */
|
|
406
|
+
}), /* @__PURE__ */ m("div", {
|
|
408
407
|
className: "flex flex-wrap items-center gap-2",
|
|
409
|
-
children: [/* @__PURE__ */
|
|
408
|
+
children: [/* @__PURE__ */ m("span", {
|
|
410
409
|
className: "rounded-full bg-bg-sunken px-3 py-1 text-sm font-medium text-text-secondary",
|
|
411
|
-
children: [
|
|
412
|
-
}), /* @__PURE__ */
|
|
413
|
-
onClick: () =>
|
|
414
|
-
disabled:
|
|
410
|
+
children: [A.size, " selected"]
|
|
411
|
+
}), /* @__PURE__ */ m("button", {
|
|
412
|
+
onClick: () => P(!0),
|
|
413
|
+
disabled: q.length === 0,
|
|
415
414
|
className: "inline-flex items-center gap-2 rounded-md border border-status-error-bg px-3 py-2 text-sm font-medium text-status-error-text transition-colors hover:bg-status-error-bg-subtle disabled:cursor-not-allowed disabled:opacity-50",
|
|
416
415
|
children: [
|
|
417
|
-
/* @__PURE__ */
|
|
416
|
+
/* @__PURE__ */ p(u, { size: 16 }),
|
|
418
417
|
"Revoke Selected",
|
|
419
|
-
|
|
418
|
+
q.length > 0 ? ` (${q.length})` : ""
|
|
420
419
|
]
|
|
421
420
|
})]
|
|
422
421
|
})]
|
|
423
422
|
})
|
|
424
423
|
}),
|
|
425
|
-
|
|
426
|
-
data:
|
|
427
|
-
columns:
|
|
424
|
+
G.length > 0 ? /* @__PURE__ */ p(ae, {
|
|
425
|
+
data: G,
|
|
426
|
+
columns: Ee,
|
|
428
427
|
keyField: "id"
|
|
429
|
-
}) : /* @__PURE__ */
|
|
428
|
+
}) : /* @__PURE__ */ p(n, {
|
|
430
429
|
illustration: "empty-data",
|
|
431
|
-
title:
|
|
432
|
-
description:
|
|
433
|
-
action: !
|
|
434
|
-
onClick: () =>
|
|
430
|
+
title: x("devportal.noApiKeysFound", "No API keys found"),
|
|
431
|
+
description: S || C !== "all" ? x("devportal.tryAdjustingFilters", "Try adjusting your filters") : x("devportal.generateFirstApiKey", "Generate your first API key to start making API calls"),
|
|
432
|
+
action: !S && C === "all" ? /* @__PURE__ */ m("button", {
|
|
433
|
+
onClick: () => W("/api-keys/new"),
|
|
435
434
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
436
|
-
children: [/* @__PURE__ */
|
|
435
|
+
children: [/* @__PURE__ */ p(f, { size: 16 }), x("devportal.generateApiKey", "Generate API Key")]
|
|
437
436
|
}) : void 0
|
|
438
437
|
}),
|
|
439
|
-
/* @__PURE__ */
|
|
440
|
-
open:
|
|
438
|
+
/* @__PURE__ */ p(s, {
|
|
439
|
+
open: w !== null,
|
|
441
440
|
onOpenChange: (e) => {
|
|
442
|
-
e ||
|
|
441
|
+
e || T(null);
|
|
443
442
|
},
|
|
444
|
-
onConfirm:
|
|
443
|
+
onConfirm: Ce,
|
|
445
444
|
title: "Revoke API Key",
|
|
446
|
-
description: `Are you sure you want to revoke "${
|
|
445
|
+
description: `Are you sure you want to revoke "${w?.name ?? ""}"? This action cannot be undone. Any application or service using this key will immediately lose access.`,
|
|
447
446
|
confirmLabel: "Revoke Key",
|
|
448
447
|
cancelLabel: "Cancel",
|
|
449
448
|
variant: "danger",
|
|
450
|
-
loading:
|
|
449
|
+
loading: V
|
|
451
450
|
}),
|
|
452
|
-
/* @__PURE__ */
|
|
453
|
-
open:
|
|
451
|
+
/* @__PURE__ */ p(s, {
|
|
452
|
+
open: E !== null,
|
|
454
453
|
onOpenChange: (e) => {
|
|
455
|
-
e ||
|
|
454
|
+
e || D(null);
|
|
456
455
|
},
|
|
457
|
-
onConfirm:
|
|
456
|
+
onConfirm: we,
|
|
458
457
|
title: "Rotate API Key Secret",
|
|
459
|
-
description: `This will generate a new secret for "${
|
|
458
|
+
description: `This will generate a new secret for "${E?.name ?? ""}" and immediately invalidate the current one. Make sure to update all services using this key before the old secret stops working.`,
|
|
460
459
|
confirmLabel: "Rotate Secret",
|
|
461
460
|
cancelLabel: "Cancel",
|
|
462
461
|
variant: "warning",
|
|
463
|
-
loading:
|
|
462
|
+
loading: H
|
|
464
463
|
}),
|
|
465
|
-
/* @__PURE__ */
|
|
466
|
-
open:
|
|
467
|
-
onOpenChange:
|
|
464
|
+
/* @__PURE__ */ p(s, {
|
|
465
|
+
open: be,
|
|
466
|
+
onOpenChange: P,
|
|
468
467
|
onConfirm: async () => {
|
|
469
|
-
if (
|
|
470
|
-
let e = await Promise.allSettled(
|
|
471
|
-
|
|
468
|
+
if (q.length === 0) return;
|
|
469
|
+
let e = await Promise.allSettled(q.map((e) => B({ variables: { keyId: e.id } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
|
|
470
|
+
N({
|
|
472
471
|
type: n === 0 ? "success" : "error",
|
|
473
472
|
message: `Revoked ${t} API key${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`
|
|
474
|
-
}),
|
|
473
|
+
}), P(!1), Q(), await L();
|
|
475
474
|
},
|
|
476
475
|
title: "Revoke selected API keys",
|
|
477
|
-
description: `Revoke ${
|
|
476
|
+
description: `Revoke ${q.length} selected API key${q.length === 1 ? "" : "s"}? Any service using these keys will immediately lose access.`,
|
|
478
477
|
confirmLabel: "Revoke Keys",
|
|
479
478
|
cancelLabel: "Cancel",
|
|
480
479
|
variant: "danger",
|
|
481
|
-
loading:
|
|
480
|
+
loading: V
|
|
482
481
|
})
|
|
483
482
|
]
|
|
484
483
|
})
|