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