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