@burdenoff/microfe-devportal 2026.717.1 → 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.
Files changed (42) hide show
  1. package/dist/devportal/components/PermissionGuard.d.ts +14 -1
  2. package/dist/devportal/components/PermissionGuard.d.ts.map +1 -1
  3. package/dist/devportal/components/PermissionGuard.js +16 -13
  4. package/dist/devportal/components/PermissionGuard.js.map +1 -1
  5. package/dist/devportal/pages/AdminReviewPage.js +9 -9
  6. package/dist/devportal/pages/ApiKeysPage.js +180 -181
  7. package/dist/devportal/pages/ApiKeysPage.js.map +1 -1
  8. package/dist/devportal/pages/ApplicationDetailPage.js +3 -3
  9. package/dist/devportal/pages/ApplicationVersionsPage.js +4 -4
  10. package/dist/devportal/pages/ApplicationVersionsPage.js.map +1 -1
  11. package/dist/devportal/pages/ApplicationsPage.js +4 -4
  12. package/dist/devportal/pages/ApplicationsPage.js.map +1 -1
  13. package/dist/devportal/pages/CreateApiKeyPage.js +1 -1
  14. package/dist/devportal/pages/CreateOAuthClientPage.js +1 -1
  15. package/dist/devportal/pages/CreateOrganizationPage.js +1 -1
  16. package/dist/devportal/pages/CreateWebhookPage.js +25 -25
  17. package/dist/devportal/pages/DashboardPage.d.ts.map +1 -1
  18. package/dist/devportal/pages/DashboardPage.js +110 -111
  19. package/dist/devportal/pages/DashboardPage.js.map +1 -1
  20. package/dist/devportal/pages/DelegationsPage.js +1 -1
  21. package/dist/devportal/pages/EditApplicationPage.js +4 -4
  22. package/dist/devportal/pages/ListingPreviewPage.d.ts.map +1 -1
  23. package/dist/devportal/pages/ListingPreviewPage.js +160 -161
  24. package/dist/devportal/pages/ListingPreviewPage.js.map +1 -1
  25. package/dist/devportal/pages/OAuthClientDetailPage.d.ts.map +1 -1
  26. package/dist/devportal/pages/OAuthClientDetailPage.js +166 -167
  27. package/dist/devportal/pages/OAuthClientDetailPage.js.map +1 -1
  28. package/dist/devportal/pages/OAuthClientsPage.d.ts.map +1 -1
  29. package/dist/devportal/pages/OAuthClientsPage.js +121 -122
  30. package/dist/devportal/pages/OAuthClientsPage.js.map +1 -1
  31. package/dist/devportal/pages/OrganizationDetailPage.js +3 -3
  32. package/dist/devportal/pages/OrganizationMembersPage.js +4 -4
  33. package/dist/devportal/pages/OrganizationsPage.js +1 -1
  34. package/dist/devportal/pages/PublishPage.js +246 -246
  35. package/dist/devportal/pages/PublishPage.js.map +1 -1
  36. package/dist/devportal/pages/PublisherProfilePage.js +4 -4
  37. package/dist/devportal/pages/PublisherProfilePage.js.map +1 -1
  38. package/dist/devportal/pages/StoreSubmissionPage.js +3 -3
  39. package/dist/devportal/pages/WebhookDetailPage.js +3 -3
  40. package/dist/devportal/pages/WebhooksPage.js +129 -129
  41. package/dist/devportal/pages/WebhooksPage.js.map +1 -1
  42. 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 ae } from "../components/SecretDisplay.js";
10
- import { DataTable as o } from "../components/DataTable.js";
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 ce } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
18
- import { AlertCircle as le, AlertTriangle as ue, Ban as u, Clock as de, Key as d, Loader2 as fe, Plus as f, RotateCw as pe, Search as me, Shield as p } from "lucide-react";
19
- import { jsx as m, jsxs as h } from "react/jsx-runtime";
20
- import { EmphasisPanel as he, GlassCard as g } from "@burdenoff/fe-libs/ui";
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 ge(e) {
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: _e, activeOrgId: ve } = e(), { t: ye } = ce(), b = (e, t) => {
41
- let n = ye(e);
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
- }, [x, be] = l(""), [S, xe] = l("all"), [C, w] = l(null), [T, E] = l(null), [D, O] = l(null), [k, A] = l(/* @__PURE__ */ new Set()), [j, M] = l(null), [Se, N] = l(!1), { data: P, loading: Ce, error: F, refetch: I } = ee({ fetchPolicy: "cache-and-network" }), { data: L } = r({ fetchPolicy: "cache-first" }), R = c(() => {
44
- let e = L?.currentUserApps?.apps;
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
- }, [L?.currentUserApps?.apps]), [z, { loading: B }] = te(), [we, { loading: V }] = ne(), H = c(() => P?.myApiKeys?.apiKeys.map(ge) ?? [], [P?.myApiKeys?.apiKeys]), U = (e) => {
47
- y?.(`${_e}${e}`);
48
- }, Te = async () => {
49
- if (C) try {
50
- await z({ variables: { keyId: C.id } }), w(null), await I();
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
- }, Ee = async () => {
53
- if (T) try {
54
- let e = (await we({ variables: { keyId: T.id } })).data?.rotateAPIKey.apiSecret;
55
- e && O(e), E(null), await I();
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
- }, W = H.filter((e) => {
58
- let t = !R || R.has(e.appId), n = !x || e.name.toLowerCase().includes(x.toLowerCase()) || e.prefix.toLowerCase().includes(x.toLowerCase()) || (e.appName?.toLowerCase().includes(x.toLowerCase()) ?? !1), r = S === "all" || S === "active" && !v(e.expiresAt) || S === "expired" && v(e.expiresAt);
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
- }), G = c(() => H.filter((e) => k.has(e.id)), [H, k]), K = c(() => G.filter((e) => !v(e.expiresAt)), [G]), q = W.filter((e) => !v(e.expiresAt)), J = q.length > 0 && q.every((e) => k.has(e.id)), Y = q.some((e) => k.has(e.id)) && !J, X = (e, t) => {
61
- A((n) => {
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
- A((t) => {
65
+ j((t) => {
67
66
  let n = new Set(t);
68
- return q.forEach((t) => {
67
+ return J.forEach((t) => {
69
68
  e ? n.add(t.id) : n.delete(t.id);
70
69
  }), n;
71
70
  });
72
- }, Q = () => A(/* @__PURE__ */ new Set());
73
- if (Ce && !P) return /* @__PURE__ */ m(i, {
74
- title: b("devportal.apiKeys", "API Keys"),
75
- description: b("devportal.manageApiKeys", "Manage your API keys for programmatic access"),
76
- children: /* @__PURE__ */ h("div", {
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__ */ m(fe, { className: "h-8 w-8 animate-spin text-text-secondary" }), /* @__PURE__ */ m("span", {
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: b("devportal.loadingApiKeys", "Loading API keys...")
79
+ children: x("devportal.loadingApiKeys", "Loading API keys...")
81
80
  })]
82
81
  })
83
82
  });
84
- if (F) return /* @__PURE__ */ m(i, {
85
- title: b("devportal.apiKeys", "API Keys"),
86
- description: b("devportal.manageApiKeys", "Manage your API keys for programmatic access"),
87
- children: /* @__PURE__ */ h("div", {
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__ */ m(le, { className: "mx-auto h-8 w-8 text-status-error-text" }),
91
- /* @__PURE__ */ m("h3", {
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: b("devportal.failedToLoadApiKeys", "Failed to load API keys")
92
+ children: x("devportal.failedToLoadApiKeys", "Failed to load API keys")
94
93
  }),
95
- /* @__PURE__ */ m("p", {
94
+ /* @__PURE__ */ p("p", {
96
95
  className: "mt-1 text-sm text-text-secondary",
97
- children: re(F)
96
+ children: re(I)
98
97
  }),
99
- /* @__PURE__ */ m("button", {
100
- onClick: () => I(),
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: b("devportal.tryAgain", "Try Again")
101
+ children: x("devportal.tryAgain", "Try Again")
103
102
  })
104
103
  ]
105
104
  })
106
105
  });
107
- let De = [
106
+ let Ee = [
108
107
  {
109
108
  key: "select",
110
- header: /* @__PURE__ */ m(a, {
111
- checked: J,
112
- indeterminate: Y,
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__ */ m("div", {
116
+ render: (e) => /* @__PURE__ */ p("div", {
118
117
  onClick: (e) => e.stopPropagation(),
119
- children: /* @__PURE__ */ m(a, {
120
- checked: k.has(e.id),
118
+ children: /* @__PURE__ */ p(a, {
119
+ checked: A.has(e.id),
121
120
  disabled: v(e.expiresAt),
122
- onChange: (t) => X(e.id, 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__ */ h("div", {
129
+ render: (e) => /* @__PURE__ */ m("div", {
131
130
  className: "flex items-center gap-3",
132
- children: [/* @__PURE__ */ m("div", {
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__ */ m(d, { size: 20 })
135
- }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("div", {
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__ */ m("p", {
137
+ /* @__PURE__ */ p("p", {
139
138
  className: "font-medium",
140
139
  children: e.name
141
140
  }),
142
- v(e.expiresAt) && /* @__PURE__ */ m("span", {
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__ */ m("span", {
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__ */ h("p", {
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__ */ h("code", {
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__ */ h("div", {
167
+ render: (e) => /* @__PURE__ */ m("div", {
169
168
  className: "flex flex-wrap gap-1",
170
- children: [e.scopes.slice(0, 3).map((e) => /* @__PURE__ */ m("span", {
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__ */ h("span", {
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__ */ m("span", {
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__ */ m("span", {
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__ */ h("div", {
197
+ render: (e) => /* @__PURE__ */ m("div", {
199
198
  className: "flex items-center gap-2",
200
- children: [/* @__PURE__ */ m(ie, { active: !v(e.expiresAt) }), /* @__PURE__ */ m("span", {
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__ */ m("span", {
209
+ render: (e) => v(e.expiresAt) ? /* @__PURE__ */ p("span", {
211
210
  className: "text-xs text-text-secondary",
212
211
  children: "No actions"
213
- }) : /* @__PURE__ */ h("div", {
212
+ }) : /* @__PURE__ */ m("div", {
214
213
  className: "flex items-center gap-1",
215
- children: [/* @__PURE__ */ h("button", {
214
+ children: [/* @__PURE__ */ m("button", {
216
215
  type: "button",
217
216
  title: "Rotate secret",
218
- disabled: V,
217
+ disabled: H,
219
218
  onClick: (t) => {
220
- t.stopPropagation(), E(e);
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__ */ m(pe, { size: 14 }), /* @__PURE__ */ m("span", {
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__ */ h("button", {
226
+ }), /* @__PURE__ */ m("button", {
228
227
  type: "button",
229
228
  title: "Revoke key",
230
- disabled: B,
229
+ disabled: V,
231
230
  onClick: (t) => {
232
- t.stopPropagation(), w(e);
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__ */ m(u, { size: 14 }), /* @__PURE__ */ m("span", {
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: W.length,
244
- active: W.filter((e) => !v(e.expiresAt)).length,
245
- expiringSoon: W.filter((e) => _(e.expiresAt)).length,
246
- expired: W.filter((e) => v(e.expiresAt)).length
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__ */ m(oe, {
249
- permission: se.APP_READ,
250
- children: /* @__PURE__ */ h(i, {
251
- title: b("devportal.apiKeys", "API Keys"),
252
- description: b("devportal.manageApiKeys", "Manage your API keys for programmatic access"),
253
- purpose: b("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."),
254
- actions: /* @__PURE__ */ h("button", {
255
- onClick: () => U("/api-keys/new"),
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__ */ m(f, { size: 16 }), b("devportal.generateApiKey", "Generate API Key")]
256
+ children: [/* @__PURE__ */ p(f, { size: 16 }), x("devportal.generateApiKey", "Generate API Key")]
258
257
  }),
259
258
  children: [
260
- D && /* @__PURE__ */ m(ae, {
259
+ O && /* @__PURE__ */ p(o, {
261
260
  title: "API Key Rotated",
262
- secret: D,
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: () => O(null)
263
+ onDismiss: () => k(null)
265
264
  }),
266
- j && /* @__PURE__ */ m("div", {
267
- className: t("rounded-lg border px-4 py-3 text-sm", j.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"),
268
- children: /* @__PURE__ */ h("div", {
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__ */ m("span", { children: j.message }), /* @__PURE__ */ m("button", {
271
- onClick: () => M(null),
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__ */ m("div", {
276
+ /* @__PURE__ */ p("div", {
278
277
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
279
- children: /* @__PURE__ */ h("div", {
278
+ children: /* @__PURE__ */ m("div", {
280
279
  className: "flex flex-1 items-center gap-4",
281
- children: [/* @__PURE__ */ h("div", {
280
+ children: [/* @__PURE__ */ m("div", {
282
281
  className: "relative flex-1 max-w-md",
283
- children: [/* @__PURE__ */ m(me, {
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__ */ m("input", {
285
+ }), /* @__PURE__ */ p("input", {
287
286
  type: "text",
288
287
  placeholder: "Search by name, prefix, or app...",
289
- value: x,
290
- onChange: (e) => be(e.target.value),
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__ */ h("select", {
294
- value: S,
295
- onChange: (e) => xe(e.target.value),
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__ */ m("option", {
297
+ /* @__PURE__ */ p("option", {
299
298
  value: "all",
300
299
  children: "All Status"
301
300
  }),
302
- /* @__PURE__ */ m("option", {
301
+ /* @__PURE__ */ p("option", {
303
302
  value: "active",
304
303
  children: "Active"
305
304
  }),
306
- /* @__PURE__ */ m("option", {
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__ */ m(he, { children: /* @__PURE__ */ h("div", {
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(g, {
316
+ /* @__PURE__ */ m(h, {
318
317
  treatment: "metric",
319
318
  className: "p-4",
320
- children: [/* @__PURE__ */ h("div", {
319
+ children: [/* @__PURE__ */ m("div", {
321
320
  className: "flex items-center gap-2 text-text-secondary",
322
- children: [/* @__PURE__ */ m(d, { size: 16 }), /* @__PURE__ */ m("span", {
321
+ children: [/* @__PURE__ */ p(d, { size: 16 }), /* @__PURE__ */ p("span", {
323
322
  className: "text-sm",
324
323
  children: "Total Keys"
325
324
  })]
326
- }), /* @__PURE__ */ m("p", {
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(g, {
330
+ /* @__PURE__ */ m(h, {
332
331
  treatment: "metric",
333
332
  className: "p-4",
334
- children: [/* @__PURE__ */ h("div", {
333
+ children: [/* @__PURE__ */ m("div", {
335
334
  className: "flex items-center gap-2 text-status-success-text",
336
- children: [/* @__PURE__ */ m(p, { size: 16 }), /* @__PURE__ */ m("span", {
335
+ children: [/* @__PURE__ */ p(me, { size: 16 }), /* @__PURE__ */ p("span", {
337
336
  className: "text-sm",
338
337
  children: "Active"
339
338
  })]
340
- }), /* @__PURE__ */ m("p", {
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(g, {
344
+ /* @__PURE__ */ m(h, {
346
345
  treatment: "metric",
347
346
  className: "p-4",
348
- children: [/* @__PURE__ */ h("div", {
347
+ children: [/* @__PURE__ */ m("div", {
349
348
  className: "flex items-center gap-2 text-status-warning-text",
350
- children: [/* @__PURE__ */ m(de, { size: 16 }), /* @__PURE__ */ m("span", {
349
+ children: [/* @__PURE__ */ p(ue, { size: 16 }), /* @__PURE__ */ p("span", {
351
350
  className: "text-sm",
352
351
  children: "Expiring Soon"
353
352
  })]
354
- }), /* @__PURE__ */ m("p", {
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(g, {
358
+ /* @__PURE__ */ m(h, {
360
359
  treatment: "metric",
361
360
  className: "p-4",
362
- children: [/* @__PURE__ */ h("div", {
361
+ children: [/* @__PURE__ */ m("div", {
363
362
  className: "flex items-center gap-2 text-status-error-text",
364
- children: [/* @__PURE__ */ m(ue, { size: 16 }), /* @__PURE__ */ m("span", {
363
+ children: [/* @__PURE__ */ p(le, { size: 16 }), /* @__PURE__ */ p("span", {
365
364
  className: "text-sm",
366
365
  children: "Expired"
367
366
  })]
368
- }), /* @__PURE__ */ m("p", {
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__ */ h("p", {
374
+ /* @__PURE__ */ m("p", {
376
375
  className: "text-sm text-text-secondary",
377
376
  children: [
378
- W.length,
377
+ G.length,
379
378
  " API key",
380
- W.length === 1 ? "" : "s",
379
+ G.length === 1 ? "" : "s",
381
380
  " ",
382
381
  "found"
383
382
  ]
384
383
  }),
385
- W.length > 0 && /* @__PURE__ */ m("div", {
384
+ G.length > 0 && /* @__PURE__ */ p("div", {
386
385
  className: "rounded-card border border-border-seam bg-bg-surface p-4",
387
- children: /* @__PURE__ */ h("div", {
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__ */ h("div", {
388
+ children: [/* @__PURE__ */ m("div", {
390
389
  className: "flex flex-wrap items-center gap-3",
391
- children: [/* @__PURE__ */ h("div", {
390
+ children: [/* @__PURE__ */ m("div", {
392
391
  className: "flex items-center gap-2",
393
- children: [/* @__PURE__ */ m(a, {
394
- checked: J,
395
- indeterminate: Y,
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__ */ m("span", {
397
+ }), /* @__PURE__ */ p("span", {
399
398
  className: "text-sm font-medium",
400
399
  children: "Select all active keys"
401
400
  })]
402
- }), k.size > 0 && /* @__PURE__ */ m("button", {
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__ */ h("div", {
406
+ }), /* @__PURE__ */ m("div", {
408
407
  className: "flex flex-wrap items-center gap-2",
409
- children: [/* @__PURE__ */ h("span", {
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: [k.size, " selected"]
412
- }), /* @__PURE__ */ h("button", {
413
- onClick: () => N(!0),
414
- disabled: K.length === 0,
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__ */ m(u, { size: 16 }),
416
+ /* @__PURE__ */ p(u, { size: 16 }),
418
417
  "Revoke Selected",
419
- K.length > 0 ? ` (${K.length})` : ""
418
+ q.length > 0 ? ` (${q.length})` : ""
420
419
  ]
421
420
  })]
422
421
  })]
423
422
  })
424
423
  }),
425
- W.length > 0 ? /* @__PURE__ */ m(o, {
426
- data: W,
427
- columns: De,
424
+ G.length > 0 ? /* @__PURE__ */ p(ae, {
425
+ data: G,
426
+ columns: Ee,
428
427
  keyField: "id"
429
- }) : /* @__PURE__ */ m(n, {
428
+ }) : /* @__PURE__ */ p(n, {
430
429
  illustration: "empty-data",
431
- title: b("devportal.noApiKeysFound", "No API keys found"),
432
- description: x || S !== "all" ? b("devportal.tryAdjustingFilters", "Try adjusting your filters") : b("devportal.generateFirstApiKey", "Generate your first API key to start making API calls"),
433
- action: !x && S === "all" ? /* @__PURE__ */ h("button", {
434
- onClick: () => U("/api-keys/new"),
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__ */ m(f, { size: 16 }), b("devportal.generateApiKey", "Generate API Key")]
435
+ children: [/* @__PURE__ */ p(f, { size: 16 }), x("devportal.generateApiKey", "Generate API Key")]
437
436
  }) : void 0
438
437
  }),
439
- /* @__PURE__ */ m(s, {
440
- open: C !== null,
438
+ /* @__PURE__ */ p(s, {
439
+ open: w !== null,
441
440
  onOpenChange: (e) => {
442
- e || w(null);
441
+ e || T(null);
443
442
  },
444
- onConfirm: Te,
443
+ onConfirm: Ce,
445
444
  title: "Revoke API Key",
446
- description: `Are you sure you want to revoke "${C?.name ?? ""}"? This action cannot be undone. Any application or service using this key will immediately lose access.`,
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: B
449
+ loading: V
451
450
  }),
452
- /* @__PURE__ */ m(s, {
453
- open: T !== null,
451
+ /* @__PURE__ */ p(s, {
452
+ open: E !== null,
454
453
  onOpenChange: (e) => {
455
- e || E(null);
454
+ e || D(null);
456
455
  },
457
- onConfirm: Ee,
456
+ onConfirm: we,
458
457
  title: "Rotate API Key Secret",
459
- description: `This will generate a new secret for "${T?.name ?? ""}" and immediately invalidate the current one. Make sure to update all services using this key before the old secret stops working.`,
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: V
462
+ loading: H
464
463
  }),
465
- /* @__PURE__ */ m(s, {
466
- open: Se,
467
- onOpenChange: N,
464
+ /* @__PURE__ */ p(s, {
465
+ open: be,
466
+ onOpenChange: P,
468
467
  onConfirm: async () => {
469
- if (K.length === 0) return;
470
- let e = await Promise.allSettled(K.map((e) => z({ variables: { keyId: e.id } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
471
- M({
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
- }), N(!1), Q(), await I();
473
+ }), P(!1), Q(), await L();
475
474
  },
476
475
  title: "Revoke selected API keys",
477
- description: `Revoke ${K.length} selected API key${K.length === 1 ? "" : "s"}? Any service using these keys will immediately lose access.`,
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: B
480
+ loading: V
482
481
  })
483
482
  ]
484
483
  })