@burdenoff/microfe-integrations 2026.1113.1 → 2026.1113.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.
Files changed (50) hide show
  1. package/dist/generated/wspace-operations.d.ts +4 -0
  2. package/dist/generated/wspace-operations.js +1 -0
  3. package/dist/generated/wspace-operations.js.map +1 -1
  4. package/dist/integrations/IntegrationsUserRoutes.d.ts +7 -0
  5. package/dist/integrations/IntegrationsUserRoutes.js +57 -47
  6. package/dist/integrations/IntegrationsUserRoutes.js.map +1 -1
  7. package/dist/integrations/components/AddConnectionDialog.d.ts +8 -2
  8. package/dist/integrations/components/AddConnectionDialog.js +17 -15
  9. package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
  10. package/dist/integrations/components/ConnectedAppsMoreMenu.d.ts +12 -0
  11. package/dist/integrations/components/ConnectedAppsMoreMenu.js +60 -0
  12. package/dist/integrations/components/ConnectedAppsMoreMenu.js.map +1 -0
  13. package/dist/integrations/components/ConnectionCard.d.ts +7 -1
  14. package/dist/integrations/components/ConnectionCard.js +27 -19
  15. package/dist/integrations/components/ConnectionCard.js.map +1 -1
  16. package/dist/integrations/components/PopularAppTiles.d.ts +7 -0
  17. package/dist/integrations/components/PopularAppTiles.js +33 -0
  18. package/dist/integrations/components/PopularAppTiles.js.map +1 -0
  19. package/dist/integrations/components/ProviderCard.d.ts +6 -0
  20. package/dist/integrations/components/ProviderCard.js +67 -61
  21. package/dist/integrations/components/ProviderCard.js.map +1 -1
  22. package/dist/integrations/components/RecentActivity.d.ts +7 -0
  23. package/dist/integrations/components/RecentActivity.js +74 -0
  24. package/dist/integrations/components/RecentActivity.js.map +1 -0
  25. package/dist/integrations/hooks/useLogs.d.ts +2 -0
  26. package/dist/integrations/hooks/useLogs.js +2 -1
  27. package/dist/integrations/hooks/useLogs.js.map +1 -1
  28. package/dist/integrations/hooks/useVaultName.d.ts +1 -0
  29. package/dist/integrations/hooks/useVaultName.js +27 -0
  30. package/dist/integrations/hooks/useVaultName.js.map +1 -0
  31. package/dist/integrations/pages/ConnectionDetail.js +559 -286
  32. package/dist/integrations/pages/ConnectionDetail.js.map +1 -1
  33. package/dist/integrations/pages/ConnectionLogs.d.ts +3 -0
  34. package/dist/integrations/pages/ConnectionLogs.js +178 -142
  35. package/dist/integrations/pages/ConnectionLogs.js.map +1 -1
  36. package/dist/integrations/pages/ConnectionsList.js +376 -243
  37. package/dist/integrations/pages/ConnectionsList.js.map +1 -1
  38. package/dist/integrations/pages/ProviderCatalog.js +199 -179
  39. package/dist/integrations/pages/ProviderCatalog.js.map +1 -1
  40. package/dist/integrations/pages/ProviderDetail.js +284 -265
  41. package/dist/integrations/pages/ProviderDetail.js.map +1 -1
  42. package/dist/integrations/providers/IntegrationsProvider.js +22 -21
  43. package/dist/integrations/providers/IntegrationsProvider.js.map +1 -1
  44. package/dist/integrations/types/index.d.ts +12 -0
  45. package/dist/integrations/utils/connectedApps.d.ts +26 -0
  46. package/dist/integrations/utils/connectedApps.js +46 -0
  47. package/dist/integrations/utils/connectedApps.js.map +1 -0
  48. package/dist/integrations/utils/mappers.js +1 -0
  49. package/dist/integrations/utils/mappers.js.map +1 -1
  50. package/package.json +2 -2
@@ -1,81 +1,86 @@
1
1
  import { cn as e } from "../utils/cn.js";
2
- import { useTr as t } from "../hooks/useTr.js";
3
- import { useAuthTypeLabel as ee } from "../hooks/useLabel.js";
4
- import { useFormatLastUsed as te } from "../hooks/useFormatLastUsed.js";
5
- import { useFormatDate as ne } from "../hooks/useFormatDate.js";
6
- import { useIntegrations as re } from "../providers/IntegrationsProvider.js";
7
- import { INTEGRATION_PERMISSIONS as n } from "../constants/permissions.js";
8
- import { INTEGRATION_FEATURE_FLAGS as ie } from "../constants/featureFlags.js";
9
- import { joinPath as r } from "../utils/navigation.js";
10
- import { useConnection as ae, useDeleteConnection as oe, useRefreshToken as se, useRevokeConnection as ce, useTestConnection as le } from "../hooks/useConnections.js";
11
- import { ConnectionStatusBadge as ue } from "../components/ConnectionStatusBadge.js";
12
- import { ConnectionShareDialog as de, PrivateConnectionBadge as fe } from "../components/ConnectionSharing.js";
13
- import { ConfirmDialog as pe } from "../components/ConfirmDialog.js";
14
- import { nativeConfirm as me, nativeImpact as he, nativeNotify as i } from "../../utils/nativeBridge.js";
2
+ import { useTr as ee } from "../hooks/useTr.js";
3
+ import { useAuthTypeLabel as te } from "../hooks/useLabel.js";
4
+ import { useFormatLastUsed as ne } from "../hooks/useFormatLastUsed.js";
5
+ import { useFormatDate as re } from "../hooks/useFormatDate.js";
6
+ import { useIntegrations as ie } from "../providers/IntegrationsProvider.js";
7
+ import { INTEGRATION_PERMISSIONS as t } from "../constants/permissions.js";
8
+ import { INTEGRATION_FEATURE_FLAGS as ae } from "../constants/featureFlags.js";
9
+ import { joinPath as n } from "../utils/navigation.js";
10
+ import { useConnection as oe, useDeleteConnection as se, useRefreshToken as ce, useRevokeConnection as le, useTestConnection as ue } from "../hooks/useConnections.js";
11
+ import { ConnectionStatusBadge as de } from "../components/ConnectionStatusBadge.js";
12
+ import { ConnectionShareDialog as fe, PrivateConnectionBadge as pe } from "../components/ConnectionSharing.js";
13
+ import { ConfirmDialog as me } from "../components/ConfirmDialog.js";
14
+ import { nativeConfirm as he, nativeImpact as r, nativeNotify as i } from "../../utils/nativeBridge.js";
15
+ import { useVaultName as ge } from "../hooks/useVaultName.js";
16
+ import { AddConnectionDialog as _e } from "../components/AddConnectionDialog.js";
17
+ import { RecentActivity as ve } from "../components/RecentActivity.js";
18
+ import { canReconnect as ye, isRefreshed as be } from "../utils/connectedApps.js";
15
19
  import { useState as a } from "react";
16
- import { Activity as o, AlertCircle as ge, ArrowLeft as s, CheckCircle2 as c, Clock as _e, Key as l, Loader2 as u, Mail as ve, RefreshCw as ye, RotateCcw as d, Share2 as be, Shield as f, Trash2 as p, User as xe, XCircle as m, Zap as h } from "lucide-react";
17
- import { useParams as Se } from "react-router";
18
- import { usePermissions as Ce } from "@burdenoff/fe-libs/shared/providers/shell";
19
- import { jsx as g, jsxs as _ } from "react/jsx-runtime";
20
- import { useFeatureFlag as we } from "@burdenoff/fe-libs/shared/feature-flags";
21
- import { ProviderIcon as Te, canManageSharing as Ee } from "@burdenoff/fe-libs/connections";
22
- import { AlertDialog as De, AlertDialogAction as Oe, AlertDialogCancel as ke, AlertDialogContent as Ae, AlertDialogDescription as je, AlertDialogFooter as Me, AlertDialogHeader as v, AlertDialogTitle as y, Button as b, CTAOverflowMenu as x, EmphasisPanel as Ne, GlassCard as S, NextSteps as Pe, PagePurpose as Fe, ShowMore as C } from "@burdenoff/fe-libs/ui";
23
- import { suggestAnchorProps as Ie } from "@burdenoff/fe-libs/shared/proactive";
20
+ import { Activity as o, AlertCircle as s, ArrowLeft as c, CheckCircle2 as l, Clock as xe, Key as u, Loader2 as d, Mail as Se, RefreshCw as Ce, RotateCcw as f, Share2 as we, Shield as p, Trash2 as m, User as Te, XCircle as h, Zap as g } from "lucide-react";
21
+ import { useParams as Ee } from "react-router";
22
+ import { usePermissions as De } from "@burdenoff/fe-libs/shared/providers/shell";
23
+ import { Fragment as Oe, jsx as _, jsxs as v } from "react/jsx-runtime";
24
+ import { useFeatureFlag as ke } from "@burdenoff/fe-libs/shared/feature-flags";
25
+ import { ProviderIcon as Ae, canManageSharing as je } from "@burdenoff/fe-libs/connections";
26
+ import { AlertDialog as Me, AlertDialogAction as Ne, AlertDialogCancel as Pe, AlertDialogContent as Fe, AlertDialogDescription as Ie, AlertDialogFooter as Le, AlertDialogHeader as Re, AlertDialogTitle as ze, Button as y, CTAOverflowMenu as b, EmphasisPanel as Be, GlassCard as x, NextSteps as S, OptionalFields as Ve, PagePurpose as He, ShowMore as C, ShowTechnicalDetails as Ue } from "@burdenoff/fe-libs/ui";
27
+ import { suggestAnchorProps as w } from "@burdenoff/fe-libs/shared/proactive";
24
28
  // src/integrations/pages/ConnectionDetail.tsx
25
- function w() {
26
- let { connectionId: w } = Se(), { basePath: T = "/", navigate: E } = re(), D = t(), Le = ee(), Re = te(), O = ne(), { connection: k, loading: ze, error: A, refetch: j } = ae(w ?? ""), { testConnection: Be, loading: M } = le(), { refreshToken: Ve, loading: He } = se(), { revokeConnection: Ue, loading: N } = ce(), { deleteConnection: We, loading: P } = oe(), F = we(ie.OAUTH_REFRESH, !0), { hasPermission: I, isLoading: Ge } = Ce(), L = I(n.CONNECTION_UPDATE), R = I(n.CONNECTION_DELETE), Ke = I(n.CONNECTION_SHARE), [qe, z] = a(!1), [B, Je] = a(null), [V, H] = a(null), [Ye, U] = a(!1), [W, G] = a(!1), [Xe, K] = a(!1), q = (e, t) => {
27
- H({
29
+ var T = "Delete this connection? This cannot be undone.";
30
+ function E() {
31
+ let { connectionId: E } = Ee(), { basePath: D = "/", navigate: O, navigationV2: We = !1 } = ie(), k = ee(), Ge = te(), Ke = ne(), A = re(), { connection: j, loading: qe, error: M, refetch: N } = oe(E ?? ""), { testConnection: Je, loading: P } = ue(), { refreshToken: Ye, loading: Xe } = ce(), { revokeConnection: Ze, loading: F } = le(), { deleteConnection: Qe, loading: I } = se(), L = ke(ae.OAUTH_REFRESH, !0), { hasPermission: R, isLoading: $e } = De(), z = R(t.CONNECTION_UPDATE), B = R(t.CONNECTION_DELETE), et = R(t.CONNECTION_SHARE), tt = R(t.CONNECTION_CREATE), [nt, V] = a(!1), [H, rt] = a(null), [U, W] = a(null), [it, G] = a(!1), [at, K] = a(!1), [ot, q] = a(!1), [st, ct] = a(!1), lt = ge(j?.vaultId), J = (e, ee) => {
32
+ W({
28
33
  type: e,
29
- message: t
30
- }), setTimeout(() => H(null), 5e3);
34
+ message: ee
35
+ }), setTimeout(() => W(null), 5e3);
31
36
  };
32
- if (ze || Ge) return /* @__PURE__ */ _("div", {
37
+ if (qe || $e) return /* @__PURE__ */ v("div", {
33
38
  className: "flex flex-col items-center justify-center py-20",
34
- children: [/* @__PURE__ */ g(u, {
39
+ children: [/* @__PURE__ */ _(d, {
35
40
  size: 48,
36
41
  className: "animate-spin text-primary"
37
- }), /* @__PURE__ */ g("span", {
42
+ }), /* @__PURE__ */ _("span", {
38
43
  className: "mt-6 text-sm font-medium text-text-secondary",
39
- children: D("integrations.connectionDetail.loading", "Loading connection details...")
44
+ children: k("integrations.connectionDetail.loading", "Loading connection details...")
40
45
  })]
41
46
  });
42
- if (A || !k) return /* @__PURE__ */ g("div", {
47
+ if (M || !j) return /* @__PURE__ */ _("div", {
43
48
  className: "p-6 max-w-4xl mx-auto",
44
- children: /* @__PURE__ */ _("div", {
49
+ children: /* @__PURE__ */ v("div", {
45
50
  className: "rounded-xl border border-border-default bg-status-error-bg-subtle p-6 flex items-start gap-4",
46
- children: [/* @__PURE__ */ g(ge, {
51
+ children: [/* @__PURE__ */ _(s, {
47
52
  size: 24,
48
53
  className: "text-status-error-text flex-shrink-0"
49
- }), /* @__PURE__ */ _("div", {
54
+ }), /* @__PURE__ */ v("div", {
50
55
  className: "flex-1",
51
56
  children: [
52
- /* @__PURE__ */ g("h3", {
57
+ /* @__PURE__ */ _("h3", {
53
58
  className: "font-semibold text-status-error-text mb-1",
54
- children: D("integrations.connectionDetail.error.title", "Connection not found")
59
+ children: k("integrations.connectionDetail.error.title", "Connection not found")
55
60
  }),
56
- /* @__PURE__ */ g("p", {
61
+ /* @__PURE__ */ _("p", {
57
62
  className: "text-sm text-status-error-text mb-3",
58
- children: A?.message || D("integrations.connectionDetail.error.description", "The requested connection could not be loaded.")
63
+ children: M?.message || k("integrations.connectionDetail.error.description", "The requested connection could not be loaded.")
59
64
  }),
60
- /* @__PURE__ */ _("div", {
65
+ /* @__PURE__ */ v("div", {
61
66
  className: "flex gap-2",
62
- children: [/* @__PURE__ */ _("button", {
67
+ children: [/* @__PURE__ */ v("button", {
63
68
  type: "button",
64
- onClick: () => j(),
69
+ onClick: () => N(),
65
70
  className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-status-error-bg-subtle text-status-error-text hover:bg-status-error-bg-subtle/80 transition-colors",
66
71
  children: [
67
- /* @__PURE__ */ g(ye, { size: 14 }),
72
+ /* @__PURE__ */ _(Ce, { size: 14 }),
68
73
  " ",
69
- D("integrations.connectionDetail.error.retry", "Try Again")
74
+ k("integrations.connectionDetail.error.retry", "Try Again")
70
75
  ]
71
- }), /* @__PURE__ */ _("button", {
76
+ }), /* @__PURE__ */ v("button", {
72
77
  type: "button",
73
- onClick: () => E?.(r(T, "connections")),
78
+ onClick: () => O?.(n(D, "connections")),
74
79
  className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border-subtle hover:bg-accent transition-colors",
75
80
  children: [
76
- /* @__PURE__ */ g(s, { size: 14 }),
81
+ /* @__PURE__ */ _(c, { size: 14 }),
77
82
  " ",
78
- D("integrations.connectionDetail.error.back", "Back to Connections")
83
+ k("integrations.connectionDetail.error.back", "Back to Connections")
79
84
  ]
80
85
  })]
81
86
  })
@@ -83,432 +88,700 @@ function w() {
83
88
  })]
84
89
  })
85
90
  });
86
- let J = async () => {
87
- let e = await Be(k.id);
88
- e && (Je(e), q(e.success ? "success" : "error", e.message));
89
- }, Y = async () => {
90
- await Ve(k.id), q("success", D("integrations.connectionDetail.notifications.refreshSuccess", "Token refreshed successfully")), j();
91
- }, Ze = async () => {
92
- K(!0);
93
- }, Qe = async () => {
94
- await Ue(k.id), q("success", D("integrations.connectionDetail.notifications.revokeSuccess", "Connection revoked")), K(!1), j();
95
- }, $e = async () => {
96
- he("medium");
97
- let e = await me({
98
- title: D("integrations.connectionDetail.deleteDialog.title", "Delete Connection"),
99
- message: D("integrations.connectionDetail.deleteDialog.message", "Delete this connection? This cannot be undone."),
100
- okButtonTitle: D("integrations.connectionDetail.deleteDialog.confirm", "Delete"),
101
- cancelButtonTitle: D("integrations.connectionDetail.deleteDialog.cancel", "Cancel")
102
- });
103
- e === null ? U(!0) : e && await X();
91
+ let Y = async () => {
92
+ let e = await Je(j.id);
93
+ e && (rt(e), J(e.success ? "success" : "error", e.message));
104
94
  }, X = async () => {
105
95
  try {
106
- await We(k.id, W), q("success", D("integrations.connectionDetail.notifications.deleteSuccess", "Connection deleted")), i("success"), U(!1), G(!1), E?.(r(T, "connections"));
96
+ let e = await Ye(j.id);
97
+ be(e) ? J("success", k("integrations.connectionDetail.notifications.refreshSuccess", "Token refreshed successfully")) : J("error", k("integrations.connectionDetail.notifications.refreshFailed", "The token could not be refreshed. Reconnect to sign in again."));
98
+ } catch (e) {
99
+ J("error", e instanceof Error ? e.message : k("integrations.connectionDetail.notifications.refreshFailed", "The token could not be refreshed. Reconnect to sign in again."));
100
+ } finally {
101
+ N();
102
+ }
103
+ }, ut = async () => {
104
+ q(!0);
105
+ }, dt = async () => {
106
+ await Ze(j.id), J("success", k("integrations.connectionDetail.notifications.revokeSuccess", "Connection revoked")), q(!1), N();
107
+ }, ft = async () => {
108
+ r("medium");
109
+ let e = await he({
110
+ title: k("integrations.connectionDetail.deleteDialog.title", "Delete Connection"),
111
+ message: k("integrations.connectionDetail.deleteDialog.message", T),
112
+ okButtonTitle: k("integrations.connectionDetail.deleteDialog.confirm", "Delete"),
113
+ cancelButtonTitle: k("integrations.connectionDetail.deleteDialog.cancel", "Cancel")
114
+ });
115
+ e === null ? G(!0) : e && await pt();
116
+ }, pt = async () => {
117
+ try {
118
+ await Qe(j.id, at), J("success", k("integrations.connectionDetail.notifications.deleteSuccess", "Connection deleted")), i("success"), G(!1), K(!1), O?.(n(D, "connections"));
107
119
  } catch (e) {
108
- q("error", e instanceof Error ? e.message : "Failed to delete connection"), i("error");
120
+ J("error", e instanceof Error ? e.message : "Failed to delete connection"), i("error");
109
121
  }
110
- }, Z = M || He || N || P, Q = Ke && Ee(k.myAccess ?? null), $ = !!(k.vaultId || k.credentialSecretId), et = [
122
+ }, Z = P || Xe || F || I, Q = et && je(j.myAccess ?? null), $ = !!(j.vaultId || j.credentialSecretId), mt = [
111
123
  {
112
124
  id: "test",
113
- label: D("integrations.connectionDetail.nextSteps.test.label", "Test the connection"),
114
- description: D("integrations.connectionDetail.nextSteps.test.description", "Run a live check to confirm credentials still work before relying on it."),
115
- icon: /* @__PURE__ */ g(h, { size: 16 }),
125
+ label: k("integrations.connectionDetail.nextSteps.test.label", "Test the connection"),
126
+ description: k("integrations.connectionDetail.nextSteps.test.description", "Run a live check to confirm credentials still work before relying on it."),
127
+ icon: /* @__PURE__ */ _(g, { size: 16 }),
116
128
  onClick: () => {
117
- J();
129
+ Y();
118
130
  },
119
- done: k.status === "active" && !!B?.success
131
+ done: j.status === "active" && !!H?.success
120
132
  },
121
- ...L && k.provider.authType === "oauth2" && F ? [{
133
+ ...z && j.provider.authType === "oauth2" && L ? [{
122
134
  id: "refresh",
123
- label: D("integrations.connectionDetail.nextSteps.refresh.label", "Refresh the access token"),
124
- description: D("integrations.connectionDetail.nextSteps.refresh.description", "Renew OAuth credentials if requests start failing with an auth error."),
125
- icon: /* @__PURE__ */ g(d, { size: 16 }),
135
+ label: k("integrations.connectionDetail.nextSteps.refresh.label", "Refresh the access token"),
136
+ description: k("integrations.connectionDetail.nextSteps.refresh.description", "Renew OAuth credentials if requests start failing with an auth error."),
137
+ icon: /* @__PURE__ */ _(f, { size: 16 }),
126
138
  onClick: () => {
127
- Y();
139
+ X();
128
140
  }
129
141
  }] : [],
130
142
  {
131
143
  id: "logs",
132
- label: D("integrations.connectionDetail.nextSteps.logs.label", "Review activity logs"),
133
- description: D("integrations.connectionDetail.nextSteps.logs.description", "See recent requests and errors for this connection to debug issues."),
134
- icon: /* @__PURE__ */ g(o, { size: 16 }),
135
- onClick: () => E?.(r(T, "logs"))
144
+ label: k("integrations.connectionDetail.nextSteps.logs.label", "Review activity logs"),
145
+ description: k("integrations.connectionDetail.nextSteps.logs.description", "See recent requests and errors for this connection to debug issues."),
146
+ icon: /* @__PURE__ */ _(o, { size: 16 }),
147
+ onClick: () => O?.(n(D, "logs"))
136
148
  }
137
- ];
138
- return /* @__PURE__ */ _("div", {
149
+ ], ht = /* @__PURE__ */ v(Oe, { children: [
150
+ U && /* @__PURE__ */ v("div", {
151
+ className: e("fixed top-4 right-4 z-50 flex items-center gap-3 px-5 py-3 rounded-xl shadow-2xl border-2 animate-in slide-in-from-top-4 duration-200", U.type === "success" ? "bg-status-success-bg-subtle text-status-success-text border-border-default" : "bg-status-error-bg-subtle text-status-error-text border-border-default"),
152
+ children: [U.type === "success" ? /* @__PURE__ */ _(l, { size: 20 }) : /* @__PURE__ */ _(h, { size: 20 }), /* @__PURE__ */ _("span", {
153
+ className: "font-medium",
154
+ children: U.message
155
+ })]
156
+ }),
157
+ /* @__PURE__ */ _(Me, {
158
+ open: it,
159
+ onOpenChange: (e) => {
160
+ e || (G(!1), K(!1));
161
+ },
162
+ children: /* @__PURE__ */ v(Fe, {
163
+ className: "max-w-md",
164
+ children: [
165
+ /* @__PURE__ */ v(Re, { children: [/* @__PURE__ */ _(ze, { children: k("integrations.connectionDetail.deleteDialog.title", "Delete Connection") }), /* @__PURE__ */ v(Ie, { children: [We ? k("integrations.connectedApps.removeMessage", "Remove {{name}}? Workflows that use it stop working until you connect {{provider}} again.", {
166
+ name: j.name,
167
+ provider: j.provider.name
168
+ }) : k("integrations.connectionDetail.deleteDialog.message", T), $ && ` ${k("integrations.connectionDetail.deleteDialog.vaultHint", "You can also remove the mapped vault secret if you no longer need it.")}`] })] }),
169
+ $ && /* @__PURE__ */ v("label", {
170
+ className: "flex items-start gap-3 rounded-lg border border-border-subtle/60 bg-bg-surface px-4 py-3 cursor-pointer",
171
+ children: [/* @__PURE__ */ _("input", {
172
+ type: "checkbox",
173
+ checked: at,
174
+ onChange: (e) => K(e.target.checked),
175
+ className: "mt-0.5",
176
+ "aria-label": k("integrations.connectionDetail.deleteDialog.removeVaultSecret", "Also remove mapped vault secret")
177
+ }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
178
+ className: "text-sm font-medium text-text-primary",
179
+ children: k("integrations.connectionDetail.deleteDialog.removeVaultSecret", "Also remove mapped vault secret")
180
+ }), /* @__PURE__ */ _("p", {
181
+ className: "text-xs text-text-secondary mt-1",
182
+ children: k("integrations.connectionDetail.deleteDialog.removeVaultSecretHint", "Use this only if no other connections rely on the same secret.")
183
+ })] })]
184
+ }),
185
+ /* @__PURE__ */ v(Le, { children: [/* @__PURE__ */ _(Pe, {
186
+ onClick: () => {
187
+ G(!1), K(!1);
188
+ },
189
+ children: k("integrations.connectionDetail.deleteDialog.cancel", "Cancel")
190
+ }), /* @__PURE__ */ v(Ne, {
191
+ disabled: I,
192
+ onClick: (e) => {
193
+ e.preventDefault(), pt();
194
+ },
195
+ className: "inline-flex items-center gap-2 bg-status-error-bg text-action-primary-text disabled:opacity-50",
196
+ children: [I ? /* @__PURE__ */ _(d, {
197
+ size: 14,
198
+ className: "animate-spin"
199
+ }) : /* @__PURE__ */ _(m, { size: 14 }), k("integrations.connectionDetail.deleteDialog.deleteConnection", "Delete connection")]
200
+ })] })
201
+ ]
202
+ })
203
+ }),
204
+ /* @__PURE__ */ _(me, {
205
+ open: ot,
206
+ title: k("integrations.connectionDetail.confirm.revokeTitle", "Revoke connection"),
207
+ description: k("integrations.connectionDetail.confirm.revoke", "Are you sure you want to revoke this connection? This will disconnect the external service."),
208
+ confirmLabel: k("integrations.connectionDetail.actions.revoke", "Revoke"),
209
+ cancelLabel: k("integrations.connectionDetail.actions.cancel", "Cancel"),
210
+ loading: F,
211
+ destructive: !0,
212
+ icon: /* @__PURE__ */ _(p, { size: 20 }),
213
+ onConfirm: dt,
214
+ onCancel: () => q(!1)
215
+ }),
216
+ Q && /* @__PURE__ */ _(fe, {
217
+ connection: j,
218
+ open: nt,
219
+ onClose: () => V(!1),
220
+ onShared: () => {
221
+ J("success", k("integrations.connectionDetail.notifications.shareSuccess", "Sharing updated")), N();
222
+ }
223
+ })
224
+ ] }), gt = tt && ye(j.status), _t = j.externalAccountEmail || j.externalAccountName, vt = gt ? /* @__PURE__ */ v(y, {
225
+ onClick: () => ct(!0),
226
+ "data-testid": "connection-detail-reconnect",
227
+ children: [/* @__PURE__ */ _(f, {
228
+ size: 14,
229
+ "aria-hidden": "true"
230
+ }), k("integrations.connectedApps.reconnect", "Reconnect")]
231
+ }) : null;
232
+ return We ? /* @__PURE__ */ v("div", {
139
233
  className: "space-y-6 p-6 max-w-5xl mx-auto",
140
234
  children: [
141
- V && /* @__PURE__ */ _("div", {
142
- className: e("fixed top-4 right-4 z-50 flex items-center gap-3 px-5 py-3 rounded-xl shadow-2xl border-2 animate-in slide-in-from-top-4 duration-200", V.type === "success" ? "bg-status-success-bg-subtle text-status-success-text border-border-default" : "bg-status-error-bg-subtle text-status-error-text border-border-default"),
143
- children: [V.type === "success" ? /* @__PURE__ */ g(c, { size: 20 }) : /* @__PURE__ */ g(m, { size: 20 }), /* @__PURE__ */ g("span", {
144
- className: "font-medium",
145
- children: V.message
235
+ ht,
236
+ /* @__PURE__ */ _(_e, {
237
+ open: st,
238
+ onClose: () => ct(!1),
239
+ reconnect: st ? {
240
+ connectionId: j.id,
241
+ name: j.name,
242
+ providerId: j.provider.id,
243
+ authMethodKey: j.authMethodKey ?? null
244
+ } : null,
245
+ onConnectionCreated: () => {
246
+ N();
247
+ }
248
+ }),
249
+ /* @__PURE__ */ _("div", {
250
+ className: "rounded-xl border border-border-seam bg-accent-wash p-6",
251
+ children: /* @__PURE__ */ v("div", {
252
+ className: "flex flex-col gap-4 sm:flex-row sm:items-center",
253
+ children: [/* @__PURE__ */ v("div", {
254
+ className: "flex min-w-0 flex-1 items-center gap-4",
255
+ children: [
256
+ /* @__PURE__ */ _(y, {
257
+ variant: "ghost",
258
+ size: "icon",
259
+ className: "shrink-0",
260
+ onClick: () => O?.(D),
261
+ "aria-label": k("integrations.connectionDetail.actions.backAriaLabel", "Back"),
262
+ children: /* @__PURE__ */ _(c, { size: 20 })
263
+ }),
264
+ /* @__PURE__ */ _(Ae, {
265
+ provider: j.provider,
266
+ size: 56
267
+ }),
268
+ /* @__PURE__ */ v("div", {
269
+ className: "min-w-0 flex-1",
270
+ children: [/* @__PURE__ */ v("div", {
271
+ className: "flex flex-wrap items-center gap-3",
272
+ ...w({
273
+ entityType: "connection",
274
+ entityId: j.id
275
+ }),
276
+ children: [
277
+ /* @__PURE__ */ _("h1", {
278
+ className: "text-2xl sm:text-3xl font-bold text-text-primary break-words",
279
+ children: j.name
280
+ }),
281
+ /* @__PURE__ */ _(de, {
282
+ status: j.status,
283
+ size: "md"
284
+ }),
285
+ /* @__PURE__ */ _(pe, { connection: j })
286
+ ]
287
+ }), /* @__PURE__ */ v("p", {
288
+ className: "text-sm text-text-secondary mt-0.5",
289
+ children: [
290
+ _t ? k("integrations.connectedApps.signedInAs", "Signed in as {{account}}", { account: _t }) : j.provider.name,
291
+ " · ",
292
+ k("integrations.connectionCard.lastUsed", "Last used {{time}}", { time: Ke(j.lastUsedAt) })
293
+ ]
294
+ })]
295
+ })
296
+ ]
297
+ }), /* @__PURE__ */ v("div", {
298
+ className: "flex shrink-0 flex-wrap items-center gap-2",
299
+ children: [vt, /* @__PURE__ */ _(b, {
300
+ align: "end",
301
+ primary: {
302
+ label: k("integrations.connectedApps.test", "Test"),
303
+ onSelect: () => {
304
+ Y();
305
+ },
306
+ disabled: Z,
307
+ icon: P ? /* @__PURE__ */ _(d, {
308
+ size: 14,
309
+ className: "animate-spin"
310
+ }) : /* @__PURE__ */ _(g, { size: 14 })
311
+ },
312
+ actions: [
313
+ ...Q ? [{
314
+ label: k("integrations.connectionDetail.actions.share", "Share"),
315
+ onSelect: () => V(!0),
316
+ disabled: Z,
317
+ icon: /* @__PURE__ */ _(we, { size: 14 })
318
+ }] : [],
319
+ ...z && j.provider.authType === "oauth2" && L ? [{
320
+ label: k("integrations.connectionDetail.actions.refreshToken", "Refresh Token"),
321
+ onSelect: () => {
322
+ X();
323
+ },
324
+ disabled: Z,
325
+ icon: /* @__PURE__ */ _(f, { size: 14 })
326
+ }] : [],
327
+ ...B ? [{
328
+ label: k("integrations.connectionDetail.actions.revoke", "Revoke"),
329
+ onSelect: () => {
330
+ ut();
331
+ },
332
+ disabled: Z,
333
+ icon: /* @__PURE__ */ _(p, { size: 14 })
334
+ }, {
335
+ label: k("integrations.connectedApps.remove", "Remove"),
336
+ onSelect: () => {
337
+ r("medium"), G(!0);
338
+ },
339
+ intent: "destructive",
340
+ disabled: Z,
341
+ icon: /* @__PURE__ */ _(m, { size: 14 })
342
+ }] : []
343
+ ]
344
+ })]
345
+ })]
346
+ })
347
+ }),
348
+ j.errorMessage && /* @__PURE__ */ v("div", {
349
+ role: "alert",
350
+ className: "flex flex-col gap-3 rounded-xl border border-border-default bg-status-error-bg-subtle p-4 sm:flex-row sm:items-center sm:justify-between",
351
+ children: [/* @__PURE__ */ v("div", {
352
+ className: "flex items-start gap-3",
353
+ children: [/* @__PURE__ */ _(s, {
354
+ size: 20,
355
+ className: "mt-0.5 shrink-0 text-status-error-text"
356
+ }), /* @__PURE__ */ v("div", {
357
+ className: "min-w-0",
358
+ children: [/* @__PURE__ */ _("p", {
359
+ className: "font-semibold text-status-error-text",
360
+ children: k("integrations.connectedApps.brokenTitle", "{{provider}} stopped working", { provider: j.provider.name })
361
+ }), /* @__PURE__ */ _("p", {
362
+ className: "text-sm text-status-error-text break-words",
363
+ children: j.errorMessage
364
+ })]
365
+ })]
366
+ }), vt]
367
+ }),
368
+ H && /* @__PURE__ */ v("div", {
369
+ role: "status",
370
+ className: e("rounded-xl border p-4", H.success ? "border-border-default bg-status-success-bg-subtle" : "border-border-default bg-status-error-bg-subtle"),
371
+ children: [/* @__PURE__ */ v("p", {
372
+ className: e("font-semibold flex items-center gap-2", H.success ? "text-status-success-text" : "text-status-error-text"),
373
+ children: [H.success ? /* @__PURE__ */ _(l, { size: 18 }) : /* @__PURE__ */ _(h, { size: 18 }), H.success ? k("integrations.connectionDetail.testResult.passed", "Connection Test Passed") : k("integrations.connectionDetail.testResult.failed", "Connection Test Failed")]
374
+ }), /* @__PURE__ */ _("p", {
375
+ className: e("text-sm mt-1", H.success ? "text-status-success-text" : "text-status-error-text"),
376
+ children: H.message
146
377
  })]
147
378
  }),
148
- /* @__PURE__ */ g(De, {
149
- open: Ye,
150
- onOpenChange: (e) => {
151
- e || (U(!1), G(!1));
152
- },
153
- children: /* @__PURE__ */ _(Ae, {
154
- className: "max-w-md",
379
+ /* @__PURE__ */ _(Ve, {
380
+ storageKey: "integrations.connection-detail.more-details",
381
+ label: k("integrations.connectedApps.moreDetails", "More details"),
382
+ children: /* @__PURE__ */ v("div", {
383
+ className: "space-y-4",
155
384
  children: [
156
- /* @__PURE__ */ _(v, { children: [/* @__PURE__ */ g(y, { children: D("integrations.connectionDetail.deleteDialog.title", "Delete Connection") }), /* @__PURE__ */ g(je, { children: D("integrations.connectionDetail.deleteDialog.message", "This removes the connection record immediately. You can also remove the mapped vault secret if you no longer need it.") })] }),
157
- $ && /* @__PURE__ */ _("label", {
158
- className: "flex items-start gap-3 rounded-lg border border-border-subtle/60 bg-bg-surface px-4 py-3 cursor-pointer",
159
- children: [/* @__PURE__ */ g("input", {
160
- type: "checkbox",
161
- checked: W,
162
- onChange: (e) => G(e.target.checked),
163
- className: "mt-0.5",
164
- "aria-label": D("integrations.connectionDetail.deleteDialog.removeVaultSecret", "Also remove mapped vault secret")
165
- }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
166
- className: "text-sm font-medium text-text-primary",
167
- children: D("integrations.connectionDetail.deleteDialog.removeVaultSecret", "Also remove mapped vault secret")
168
- }), /* @__PURE__ */ g("p", {
169
- className: "text-xs text-text-secondary mt-1",
170
- children: D("integrations.connectionDetail.deleteDialog.removeVaultSecretHint", "Use this only if no other connections rely on the same secret.")
171
- })] })]
385
+ /* @__PURE__ */ v("div", {
386
+ className: "space-y-3 text-sm",
387
+ children: [j.description && /* @__PURE__ */ v("div", {
388
+ className: "py-2 border-b border-border-seam",
389
+ children: [/* @__PURE__ */ _("span", {
390
+ className: "text-xs text-text-secondary uppercase tracking-wide",
391
+ children: k("integrations.connectionDetail.fields.description", "Description")
392
+ }), /* @__PURE__ */ _("p", {
393
+ className: "text-text-primary mt-0.5",
394
+ children: j.description
395
+ })]
396
+ }), [
397
+ {
398
+ id: "app",
399
+ label: k("integrations.connectionDetail.fields.provider", "Provider"),
400
+ value: `${j.provider.name} · ${Ge(j.provider.authType)}`
401
+ },
402
+ ...j.externalAccountName && j.externalAccountEmail ? [{
403
+ id: "name",
404
+ label: k("integrations.connectionDetail.fields.name", "Name"),
405
+ value: j.externalAccountName
406
+ }] : [],
407
+ {
408
+ id: "health",
409
+ label: k("integrations.connectionDetail.fields.healthCheck", "Health Check"),
410
+ value: A(j.lastHealthCheck)
411
+ },
412
+ {
413
+ id: "created",
414
+ label: k("integrations.connectionDetail.fields.created", "Created"),
415
+ value: A(j.createdAt)
416
+ },
417
+ ...H ? [{
418
+ id: "latency",
419
+ label: k("integrations.connectedApps.testLatency", "Test latency"),
420
+ value: k("integrations.connectionDetail.testResult.latency", "Latency: {latency}ms", { latency: H.latencyMs })
421
+ }] : [],
422
+ ...$ ? [{
423
+ id: "storage",
424
+ label: k("integrations.connectionDetail.sections.credentialStorage", "Credential Storage"),
425
+ value: [lt ?? j.vaultId, j.credentialSecretName].filter(Boolean).join(" · ")
426
+ }] : []
427
+ ].map((e) => /* @__PURE__ */ v("div", {
428
+ className: "flex items-center justify-between gap-3 py-2 border-b border-border-seam",
429
+ children: [/* @__PURE__ */ _("span", {
430
+ className: "text-text-secondary",
431
+ children: e.label
432
+ }), /* @__PURE__ */ _("span", {
433
+ className: "text-text-primary text-end break-all",
434
+ children: e.value
435
+ })]
436
+ }, e.id))]
172
437
  }),
173
- /* @__PURE__ */ _(Me, { children: [/* @__PURE__ */ g(ke, {
174
- onClick: () => {
175
- U(!1), G(!1);
176
- },
177
- children: D("integrations.connectionDetail.deleteDialog.cancel", "Cancel")
178
- }), /* @__PURE__ */ _(Oe, {
179
- disabled: P,
180
- onClick: (e) => {
181
- e.preventDefault(), X();
182
- },
183
- className: "inline-flex items-center gap-2 bg-status-error-bg text-action-primary-text disabled:opacity-50",
184
- children: [P ? /* @__PURE__ */ g(u, {
185
- size: 14,
186
- className: "animate-spin"
187
- }) : /* @__PURE__ */ g(p, { size: 14 }), D("integrations.connectionDetail.deleteDialog.deleteConnection", "Delete connection")]
188
- })] })
438
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("h3", {
439
+ className: "text-sm font-medium text-text-primary mb-2 flex items-center gap-2",
440
+ children: [/* @__PURE__ */ _(p, {
441
+ size: 16,
442
+ className: "text-primary",
443
+ "aria-hidden": "true"
444
+ }), k("integrations.connectionDetail.sections.scopes", "Granted Scopes")]
445
+ }), j.grantedScopes.length > 0 ? /* @__PURE__ */ _(C, {
446
+ collapsedHeight: 88,
447
+ label: "Show all scopes",
448
+ children: /* @__PURE__ */ _("div", {
449
+ className: "flex flex-wrap gap-2",
450
+ children: j.grantedScopes.map((e) => /* @__PURE__ */ _("span", {
451
+ className: "text-xs px-2.5 py-1 rounded-full bg-bg-sunken text-text-secondary font-mono",
452
+ children: e
453
+ }, e))
454
+ })
455
+ }) : /* @__PURE__ */ _("p", {
456
+ className: "text-sm text-text-secondary",
457
+ children: k("integrations.connectionDetail.scopes.empty", "No scopes granted.")
458
+ })] }),
459
+ (z || B) && /* @__PURE__ */ _(S, {
460
+ storageKey: "integrations-connection-detail",
461
+ steps: mt
462
+ }),
463
+ /* @__PURE__ */ _(Ue, {
464
+ copyable: !0,
465
+ children: [
466
+ `connectionId: ${j.id}`,
467
+ `providerKey: ${j.provider.key}`,
468
+ `status: ${j.status}`,
469
+ ...j.vaultId ? [`vaultId: ${j.vaultId}`] : [],
470
+ ...j.credentialSecretId ? [`secretId: ${j.credentialSecretId}`] : []
471
+ ].join("\n")
472
+ })
189
473
  ]
190
474
  })
191
475
  }),
192
- /* @__PURE__ */ g(pe, {
193
- open: Xe,
194
- title: D("integrations.connectionDetail.confirm.revokeTitle", "Revoke connection"),
195
- description: D("integrations.connectionDetail.confirm.revoke", "Are you sure you want to revoke this connection? This will disconnect the external service."),
196
- confirmLabel: D("integrations.connectionDetail.actions.revoke", "Revoke"),
197
- cancelLabel: D("integrations.connectionDetail.actions.cancel", "Cancel"),
198
- loading: N,
199
- destructive: !0,
200
- icon: /* @__PURE__ */ g(f, { size: 20 }),
201
- onConfirm: Qe,
202
- onCancel: () => K(!1)
203
- }),
204
- Q && /* @__PURE__ */ g(de, {
205
- connection: k,
206
- open: qe,
207
- onClose: () => z(!1),
208
- onShared: () => {
209
- q("success", D("integrations.connectionDetail.notifications.shareSuccess", "Sharing updated")), j();
210
- }
211
- }),
212
- /* @__PURE__ */ g("div", {
476
+ /* @__PURE__ */ _(ve, {
477
+ connectionId: j.id,
478
+ onShowAll: () => O?.(n(D, `logs?connectionId=${encodeURIComponent(j.id)}`))
479
+ })
480
+ ]
481
+ }) : /* @__PURE__ */ v("div", {
482
+ className: "space-y-6 p-6 max-w-5xl mx-auto",
483
+ children: [
484
+ ht,
485
+ /* @__PURE__ */ _("div", {
213
486
  className: "rounded-xl border border-border-seam bg-accent-wash p-6",
214
- children: /* @__PURE__ */ _("div", {
487
+ children: /* @__PURE__ */ v("div", {
215
488
  className: "flex items-center gap-4",
216
489
  children: [
217
- /* @__PURE__ */ g(b, {
490
+ /* @__PURE__ */ _(y, {
218
491
  variant: "ghost",
219
492
  size: "icon",
220
- onClick: () => E?.(r(T, "connections")),
221
- "aria-label": D("integrations.connectionDetail.actions.backAriaLabel", "Back"),
222
- children: /* @__PURE__ */ g(s, { size: 20 })
493
+ onClick: () => O?.(n(D, "connections")),
494
+ "aria-label": k("integrations.connectionDetail.actions.backAriaLabel", "Back"),
495
+ children: /* @__PURE__ */ _(c, { size: 20 })
223
496
  }),
224
- /* @__PURE__ */ g(Te, {
225
- provider: k.provider,
497
+ /* @__PURE__ */ _(Ae, {
498
+ provider: j.provider,
226
499
  size: 56
227
500
  }),
228
- /* @__PURE__ */ _("div", {
501
+ /* @__PURE__ */ v("div", {
229
502
  className: "flex-1",
230
- children: [/* @__PURE__ */ _("div", {
503
+ children: [/* @__PURE__ */ v("div", {
231
504
  className: "flex items-center gap-3",
232
- ...Ie({
505
+ ...w({
233
506
  entityType: "connection",
234
- entityId: k.id
507
+ entityId: j.id
235
508
  }),
236
509
  children: [
237
- /* @__PURE__ */ g("h1", {
510
+ /* @__PURE__ */ _("h1", {
238
511
  className: "text-2xl sm:text-3xl font-bold text-text-primary",
239
- children: k.name
512
+ children: j.name
240
513
  }),
241
- /* @__PURE__ */ g(ue, {
242
- status: k.status,
514
+ /* @__PURE__ */ _(de, {
515
+ status: j.status,
243
516
  size: "md"
244
517
  }),
245
- /* @__PURE__ */ g(fe, { connection: k })
518
+ /* @__PURE__ */ _(pe, { connection: j })
246
519
  ]
247
- }), /* @__PURE__ */ _("p", {
520
+ }), /* @__PURE__ */ v("p", {
248
521
  className: "text-sm text-text-secondary mt-0.5",
249
522
  children: [
250
- k.provider.name,
523
+ j.provider.name,
251
524
  " · ",
252
- Le(k.provider.authType)
525
+ Ge(j.provider.authType)
253
526
  ]
254
527
  })]
255
528
  })
256
529
  ]
257
530
  })
258
531
  }),
259
- /* @__PURE__ */ g(Fe, {
260
- icon: /* @__PURE__ */ g(o, { size: 16 }),
261
- children: D("integrations.connectionDetail.purpose", "This is a single live link to {provider}. From here you can confirm it is healthy, see which account and scopes were granted, test it on demand, refresh or revoke its access, and review where its credentials are stored.", { provider: k.provider.name })
532
+ /* @__PURE__ */ _(He, {
533
+ icon: /* @__PURE__ */ _(o, { size: 16 }),
534
+ children: k("integrations.connectionDetail.purpose", "This is a single live link to {provider}. From here you can confirm it is healthy, see which account and scopes were granted, test it on demand, refresh or revoke its access, and review where its credentials are stored.", { provider: j.provider.name })
262
535
  }),
263
- (L || R) && /* @__PURE__ */ g(Pe, {
536
+ (z || B) && /* @__PURE__ */ _(S, {
264
537
  storageKey: "integrations-connection-detail",
265
- steps: et
538
+ steps: mt
266
539
  }),
267
- /* @__PURE__ */ _("div", {
540
+ /* @__PURE__ */ v("div", {
268
541
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
269
- children: [/* @__PURE__ */ _(Ne, {
542
+ children: [/* @__PURE__ */ v(Be, {
270
543
  className: "p-5 space-y-4",
271
- children: [/* @__PURE__ */ _("h2", {
544
+ children: [/* @__PURE__ */ v("h2", {
272
545
  className: "font-semibold text-text-primary flex items-center gap-2",
273
- children: [/* @__PURE__ */ g(o, {
546
+ children: [/* @__PURE__ */ _(o, {
274
547
  size: 18,
275
548
  className: "text-primary"
276
- }), D("integrations.connectionDetail.sections.info", "Connection Info")]
277
- }), /* @__PURE__ */ _("div", {
549
+ }), k("integrations.connectionDetail.sections.info", "Connection Info")]
550
+ }), /* @__PURE__ */ v("div", {
278
551
  className: "space-y-3",
279
552
  children: [
280
- k.description && /* @__PURE__ */ _("div", {
553
+ j.description && /* @__PURE__ */ v("div", {
281
554
  className: "py-2 border-b border-border-seam",
282
- children: [/* @__PURE__ */ g("span", {
555
+ children: [/* @__PURE__ */ _("span", {
283
556
  className: "text-xs text-text-secondary uppercase tracking-wide",
284
- children: D("integrations.connectionDetail.fields.description", "Description")
285
- }), /* @__PURE__ */ g("p", {
557
+ children: k("integrations.connectionDetail.fields.description", "Description")
558
+ }), /* @__PURE__ */ _("p", {
286
559
  className: "text-sm text-text-primary mt-0.5",
287
- children: k.description
560
+ children: j.description
288
561
  })]
289
562
  }),
290
- /* @__PURE__ */ _("div", {
563
+ /* @__PURE__ */ v("div", {
291
564
  className: "flex items-center justify-between py-2 border-b border-border-seam",
292
- children: [/* @__PURE__ */ g("span", {
565
+ children: [/* @__PURE__ */ _("span", {
293
566
  className: "text-sm text-text-secondary",
294
- children: D("integrations.connectionDetail.fields.provider", "Provider")
295
- }), /* @__PURE__ */ g("span", {
567
+ children: k("integrations.connectionDetail.fields.provider", "Provider")
568
+ }), /* @__PURE__ */ _("span", {
296
569
  className: "text-sm font-medium text-text-primary",
297
- children: k.provider.name
570
+ children: j.provider.name
298
571
  })]
299
572
  }),
300
- k.externalAccountEmail && /* @__PURE__ */ _("div", {
573
+ j.externalAccountEmail && /* @__PURE__ */ v("div", {
301
574
  className: "flex items-center justify-between py-2 border-b border-border-seam",
302
- children: [/* @__PURE__ */ _("span", {
575
+ children: [/* @__PURE__ */ v("span", {
303
576
  className: "text-sm text-text-secondary flex items-center gap-1",
304
577
  children: [
305
- /* @__PURE__ */ g(ve, { size: 14 }),
578
+ /* @__PURE__ */ _(Se, { size: 14 }),
306
579
  " ",
307
- D("integrations.connectionDetail.fields.account", "Account")
580
+ k("integrations.connectionDetail.fields.account", "Account")
308
581
  ]
309
- }), /* @__PURE__ */ g("span", {
582
+ }), /* @__PURE__ */ _("span", {
310
583
  className: "text-sm font-medium text-text-primary",
311
- children: k.externalAccountEmail
584
+ children: j.externalAccountEmail
312
585
  })]
313
586
  }),
314
- k.externalAccountName && /* @__PURE__ */ _("div", {
587
+ j.externalAccountName && /* @__PURE__ */ v("div", {
315
588
  className: "flex items-center justify-between py-2 border-b border-border-seam",
316
- children: [/* @__PURE__ */ _("span", {
589
+ children: [/* @__PURE__ */ v("span", {
317
590
  className: "text-sm text-text-secondary flex items-center gap-1",
318
591
  children: [
319
- /* @__PURE__ */ g(xe, { size: 14 }),
592
+ /* @__PURE__ */ _(Te, { size: 14 }),
320
593
  " ",
321
- D("integrations.connectionDetail.fields.name", "Name")
594
+ k("integrations.connectionDetail.fields.name", "Name")
322
595
  ]
323
- }), /* @__PURE__ */ g("span", {
596
+ }), /* @__PURE__ */ _("span", {
324
597
  className: "text-sm font-medium text-text-primary",
325
- children: k.externalAccountName
598
+ children: j.externalAccountName
326
599
  })]
327
600
  }),
328
- k.errorMessage && /* @__PURE__ */ _("div", {
601
+ j.errorMessage && /* @__PURE__ */ v("div", {
329
602
  className: "py-2 border-b border-border-seam",
330
- children: [/* @__PURE__ */ g("span", {
603
+ children: [/* @__PURE__ */ _("span", {
331
604
  className: "text-xs text-status-error-text uppercase tracking-wide",
332
- children: D("integrations.connectionDetail.fields.error", "Error")
333
- }), /* @__PURE__ */ g("p", {
605
+ children: k("integrations.connectionDetail.fields.error", "Error")
606
+ }), /* @__PURE__ */ _("p", {
334
607
  className: "text-sm text-status-error-text mt-0.5 bg-status-error-bg-subtle rounded-lg p-2",
335
- children: k.errorMessage
608
+ children: j.errorMessage
336
609
  })]
337
610
  }),
338
- /* @__PURE__ */ _("div", {
611
+ /* @__PURE__ */ v("div", {
339
612
  className: "flex items-center justify-between py-2 border-b border-border-seam",
340
- children: [/* @__PURE__ */ _("span", {
613
+ children: [/* @__PURE__ */ v("span", {
341
614
  className: "text-sm text-text-secondary flex items-center gap-1",
342
615
  children: [
343
- /* @__PURE__ */ g(_e, { size: 14 }),
616
+ /* @__PURE__ */ _(xe, { size: 14 }),
344
617
  " ",
345
- D("integrations.connectionDetail.fields.lastUsed", "Last Used")
618
+ k("integrations.connectionDetail.fields.lastUsed", "Last Used")
346
619
  ]
347
- }), /* @__PURE__ */ g("span", {
620
+ }), /* @__PURE__ */ _("span", {
348
621
  className: "text-sm text-text-primary",
349
- children: Re(k.lastUsedAt)
622
+ children: Ke(j.lastUsedAt)
350
623
  })]
351
624
  }),
352
- /* @__PURE__ */ _("div", {
625
+ /* @__PURE__ */ v("div", {
353
626
  className: "flex items-center justify-between py-2 border-b border-border-seam",
354
- children: [/* @__PURE__ */ g("span", {
627
+ children: [/* @__PURE__ */ _("span", {
355
628
  className: "text-sm text-text-secondary",
356
- children: D("integrations.connectionDetail.fields.healthCheck", "Health Check")
357
- }), /* @__PURE__ */ g("span", {
629
+ children: k("integrations.connectionDetail.fields.healthCheck", "Health Check")
630
+ }), /* @__PURE__ */ _("span", {
358
631
  className: "text-sm text-text-primary",
359
- children: O(k.lastHealthCheck)
632
+ children: A(j.lastHealthCheck)
360
633
  })]
361
634
  }),
362
- /* @__PURE__ */ _("div", {
635
+ /* @__PURE__ */ v("div", {
363
636
  className: "flex items-center justify-between py-2",
364
- children: [/* @__PURE__ */ g("span", {
637
+ children: [/* @__PURE__ */ _("span", {
365
638
  className: "text-sm text-text-secondary",
366
- children: D("integrations.connectionDetail.fields.created", "Created")
367
- }), /* @__PURE__ */ g("span", {
639
+ children: k("integrations.connectionDetail.fields.created", "Created")
640
+ }), /* @__PURE__ */ _("span", {
368
641
  className: "text-sm text-text-primary",
369
- children: O(k.createdAt)
642
+ children: A(j.createdAt)
370
643
  })]
371
644
  })
372
645
  ]
373
646
  })]
374
- }), /* @__PURE__ */ _("div", {
647
+ }), /* @__PURE__ */ v("div", {
375
648
  className: "space-y-4",
376
649
  children: [
377
- /* @__PURE__ */ _(S, {
650
+ /* @__PURE__ */ v(x, {
378
651
  className: "border-border-seam p-5",
379
- children: [/* @__PURE__ */ _("h2", {
652
+ children: [/* @__PURE__ */ v("h2", {
380
653
  className: "font-semibold text-text-primary flex items-center gap-2 mb-3",
381
- children: [/* @__PURE__ */ g(f, {
654
+ children: [/* @__PURE__ */ _(p, {
382
655
  size: 18,
383
656
  className: "text-primary"
384
- }), D("integrations.connectionDetail.sections.scopes", "Granted Scopes")]
385
- }), k.grantedScopes.length > 0 ? /* @__PURE__ */ g(C, {
657
+ }), k("integrations.connectionDetail.sections.scopes", "Granted Scopes")]
658
+ }), j.grantedScopes.length > 0 ? /* @__PURE__ */ _(C, {
386
659
  collapsedHeight: 88,
387
660
  label: "Show all scopes",
388
- children: /* @__PURE__ */ g("div", {
661
+ children: /* @__PURE__ */ _("div", {
389
662
  className: "flex flex-wrap gap-2",
390
- children: k.grantedScopes.map((e) => /* @__PURE__ */ g("span", {
663
+ children: j.grantedScopes.map((e) => /* @__PURE__ */ _("span", {
391
664
  className: "text-xs px-2.5 py-1 rounded-full bg-bg-sunken text-text-secondary font-mono",
392
665
  children: e
393
666
  }, e))
394
667
  })
395
- }) : /* @__PURE__ */ g("p", {
668
+ }) : /* @__PURE__ */ _("p", {
396
669
  className: "text-sm text-text-secondary",
397
- children: D("integrations.connectionDetail.scopes.empty", "No scopes granted.")
670
+ children: k("integrations.connectionDetail.scopes.empty", "No scopes granted.")
398
671
  })]
399
672
  }),
400
- B && /* @__PURE__ */ _("div", {
401
- className: e("rounded-xl border p-5", B.success ? "border-border-default bg-status-success-bg-subtle" : "border-border-default bg-status-error-bg-subtle"),
673
+ H && /* @__PURE__ */ v("div", {
674
+ className: e("rounded-xl border p-5", H.success ? "border-border-default bg-status-success-bg-subtle" : "border-border-default bg-status-error-bg-subtle"),
402
675
  children: [
403
- /* @__PURE__ */ _("h2", {
404
- className: e("font-semibold flex items-center gap-2 mb-2", B.success ? "text-status-success-text" : "text-status-error-text"),
405
- children: [B.success ? /* @__PURE__ */ g(c, { size: 18 }) : /* @__PURE__ */ g(m, { size: 18 }), B.success ? D("integrations.connectionDetail.testResult.passed", "Connection Test Passed") : D("integrations.connectionDetail.testResult.failed", "Connection Test Failed")]
676
+ /* @__PURE__ */ v("h2", {
677
+ className: e("font-semibold flex items-center gap-2 mb-2", H.success ? "text-status-success-text" : "text-status-error-text"),
678
+ children: [H.success ? /* @__PURE__ */ _(l, { size: 18 }) : /* @__PURE__ */ _(h, { size: 18 }), H.success ? k("integrations.connectionDetail.testResult.passed", "Connection Test Passed") : k("integrations.connectionDetail.testResult.failed", "Connection Test Failed")]
406
679
  }),
407
- /* @__PURE__ */ g("p", {
408
- className: e("text-sm", B.success ? "text-status-success-text" : "text-status-error-text"),
409
- children: B.message
680
+ /* @__PURE__ */ _("p", {
681
+ className: e("text-sm", H.success ? "text-status-success-text" : "text-status-error-text"),
682
+ children: H.message
410
683
  }),
411
- /* @__PURE__ */ g("p", {
684
+ /* @__PURE__ */ _("p", {
412
685
  className: "text-xs text-text-secondary mt-1",
413
- children: D("integrations.connectionDetail.testResult.latency", "Latency: {latency}ms", { latency: B.latencyMs })
686
+ children: k("integrations.connectionDetail.testResult.latency", "Latency: {latency}ms", { latency: H.latencyMs })
414
687
  })
415
688
  ]
416
689
  }),
417
- $ && /* @__PURE__ */ _(S, {
690
+ $ && /* @__PURE__ */ v(x, {
418
691
  className: "border-border-seam p-5",
419
- children: [/* @__PURE__ */ _("h2", {
692
+ children: [/* @__PURE__ */ v("h2", {
420
693
  className: "font-semibold text-text-primary flex items-center gap-2 mb-3",
421
- children: [/* @__PURE__ */ g(l, {
694
+ children: [/* @__PURE__ */ _(u, {
422
695
  size: 18,
423
696
  className: "text-primary"
424
- }), D("integrations.connectionDetail.sections.credentialStorage", "Credential Storage")]
425
- }), /* @__PURE__ */ _("div", {
697
+ }), k("integrations.connectionDetail.sections.credentialStorage", "Credential Storage")]
698
+ }), /* @__PURE__ */ v("div", {
426
699
  className: "space-y-2 text-sm",
427
700
  children: [
428
- k.vaultId && /* @__PURE__ */ _("div", {
701
+ j.vaultId && /* @__PURE__ */ v("div", {
429
702
  className: "flex items-center justify-between gap-3",
430
- children: [/* @__PURE__ */ g("span", {
703
+ children: [/* @__PURE__ */ _("span", {
431
704
  className: "text-text-secondary",
432
- children: D("integrations.connectionDetail.fields.vault", "Vault")
433
- }), /* @__PURE__ */ g("span", {
705
+ children: k("integrations.connectionDetail.fields.vault", "Vault")
706
+ }), /* @__PURE__ */ _("span", {
434
707
  className: "font-medium text-text-primary break-all",
435
- children: k.vaultId
708
+ children: lt ?? j.vaultId
436
709
  })]
437
710
  }),
438
- k.credentialSecretName && /* @__PURE__ */ _("div", {
711
+ j.credentialSecretName && /* @__PURE__ */ v("div", {
439
712
  className: "flex items-center justify-between gap-3",
440
- children: [/* @__PURE__ */ g("span", {
713
+ children: [/* @__PURE__ */ _("span", {
441
714
  className: "text-text-secondary",
442
- children: D("integrations.connectionDetail.fields.secret", "Secret")
443
- }), /* @__PURE__ */ g("span", {
715
+ children: k("integrations.connectionDetail.fields.secret", "Secret")
716
+ }), /* @__PURE__ */ _("span", {
444
717
  className: "font-medium text-text-primary break-all",
445
- children: k.credentialSecretName
718
+ children: j.credentialSecretName
446
719
  })]
447
720
  }),
448
- k.credentialSecretId && /* @__PURE__ */ _("div", {
721
+ j.credentialSecretId && /* @__PURE__ */ v("div", {
449
722
  className: "flex items-center justify-between gap-3",
450
- children: [/* @__PURE__ */ g("span", {
723
+ children: [/* @__PURE__ */ _("span", {
451
724
  className: "text-text-secondary",
452
- children: D("integrations.connectionDetail.fields.secretId", "Secret ID")
453
- }), /* @__PURE__ */ g("span", {
725
+ children: k("integrations.connectionDetail.fields.secretId", "Secret ID")
726
+ }), /* @__PURE__ */ _("span", {
454
727
  className: "font-mono text-xs text-text-primary break-all",
455
- children: k.credentialSecretId
728
+ children: j.credentialSecretId
456
729
  })]
457
730
  })
458
731
  ]
459
732
  })]
460
733
  }),
461
- (L || R || Q) && /* @__PURE__ */ _(S, {
734
+ (z || B || Q) && /* @__PURE__ */ v(x, {
462
735
  className: "border-border-seam p-5",
463
- children: [/* @__PURE__ */ _("h2", {
736
+ children: [/* @__PURE__ */ v("h2", {
464
737
  className: "font-semibold text-text-primary flex items-center gap-2 mb-3",
465
- children: [/* @__PURE__ */ g(l, {
738
+ children: [/* @__PURE__ */ _(u, {
466
739
  size: 18,
467
740
  className: "text-primary"
468
- }), D("integrations.connectionDetail.sections.actions", "Actions")]
469
- }), /* @__PURE__ */ g(x, {
741
+ }), k("integrations.connectionDetail.sections.actions", "Actions")]
742
+ }), /* @__PURE__ */ _(b, {
470
743
  align: "start",
471
744
  primary: {
472
- label: D("integrations.connectionDetail.actions.test", "Test Connection"),
745
+ label: k("integrations.connectionDetail.actions.test", "Test Connection"),
473
746
  onSelect: () => {
474
- J();
747
+ Y();
475
748
  },
476
749
  disabled: Z,
477
- icon: M ? /* @__PURE__ */ g(u, {
750
+ icon: P ? /* @__PURE__ */ _(d, {
478
751
  size: 14,
479
752
  className: "animate-spin"
480
- }) : /* @__PURE__ */ g(h, { size: 14 })
753
+ }) : /* @__PURE__ */ _(g, { size: 14 })
481
754
  },
482
755
  actions: [
483
756
  ...Q ? [{
484
- label: D("integrations.connectionDetail.actions.share", "Share"),
485
- onSelect: () => z(!0),
757
+ label: k("integrations.connectionDetail.actions.share", "Share"),
758
+ onSelect: () => V(!0),
486
759
  disabled: Z,
487
- icon: /* @__PURE__ */ g(be, { size: 14 })
760
+ icon: /* @__PURE__ */ _(we, { size: 14 })
488
761
  }] : [],
489
- ...L && k.provider.authType === "oauth2" && F ? [{
490
- label: D("integrations.connectionDetail.actions.refreshToken", "Refresh Token"),
762
+ ...z && j.provider.authType === "oauth2" && L ? [{
763
+ label: k("integrations.connectionDetail.actions.refreshToken", "Refresh Token"),
491
764
  onSelect: () => {
492
- Y();
765
+ X();
493
766
  },
494
767
  disabled: Z,
495
- icon: /* @__PURE__ */ g(d, { size: 14 })
768
+ icon: /* @__PURE__ */ _(f, { size: 14 })
496
769
  }] : [],
497
- ...R ? [{
498
- label: D("integrations.connectionDetail.actions.revoke", "Revoke"),
770
+ ...B ? [{
771
+ label: k("integrations.connectionDetail.actions.revoke", "Revoke"),
499
772
  onSelect: () => {
500
- Ze();
773
+ ut();
501
774
  },
502
775
  disabled: Z,
503
- icon: /* @__PURE__ */ g(f, { size: 14 })
776
+ icon: /* @__PURE__ */ _(p, { size: 14 })
504
777
  }, {
505
- label: D("integrations.connectionDetail.actions.delete", "Delete"),
778
+ label: k("integrations.connectionDetail.actions.delete", "Delete"),
506
779
  onSelect: () => {
507
- $e();
780
+ ft();
508
781
  },
509
782
  intent: "destructive",
510
783
  disabled: Z,
511
- icon: /* @__PURE__ */ g(p, { size: 14 })
784
+ icon: /* @__PURE__ */ _(m, { size: 14 })
512
785
  }] : []
513
786
  ]
514
787
  })]
@@ -519,6 +792,6 @@ function w() {
519
792
  ]
520
793
  });
521
794
  }
522
- export { w as ConnectionDetail };
795
+ export { E as ConnectionDetail };
523
796
 
524
797
  //# sourceMappingURL=ConnectionDetail.js.map