@burdenoff/microfe-integrations 2026.1113.1 → 2026.1113.3

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