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