@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.
- package/dist/generated/wspace-operations.d.ts +4 -0
- package/dist/generated/wspace-operations.js +1 -0
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/integrations/IntegrationsUserRoutes.d.ts +7 -0
- package/dist/integrations/IntegrationsUserRoutes.js +57 -47
- package/dist/integrations/IntegrationsUserRoutes.js.map +1 -1
- package/dist/integrations/components/AddConnectionDialog.d.ts +8 -2
- package/dist/integrations/components/AddConnectionDialog.js +17 -15
- package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
- package/dist/integrations/components/ConnectedAppsMoreMenu.d.ts +12 -0
- package/dist/integrations/components/ConnectedAppsMoreMenu.js +60 -0
- package/dist/integrations/components/ConnectedAppsMoreMenu.js.map +1 -0
- package/dist/integrations/components/ConnectionCard.d.ts +7 -1
- package/dist/integrations/components/ConnectionCard.js +40 -26
- package/dist/integrations/components/ConnectionCard.js.map +1 -1
- package/dist/integrations/components/PopularAppTiles.d.ts +7 -0
- package/dist/integrations/components/PopularAppTiles.js +33 -0
- package/dist/integrations/components/PopularAppTiles.js.map +1 -0
- package/dist/integrations/components/ProviderCard.d.ts +6 -0
- package/dist/integrations/components/ProviderCard.js +67 -61
- package/dist/integrations/components/ProviderCard.js.map +1 -1
- package/dist/integrations/components/RecentActivity.d.ts +7 -0
- package/dist/integrations/components/RecentActivity.js +74 -0
- package/dist/integrations/components/RecentActivity.js.map +1 -0
- package/dist/integrations/hooks/useLogs.d.ts +2 -0
- package/dist/integrations/hooks/useLogs.js +2 -1
- package/dist/integrations/hooks/useLogs.js.map +1 -1
- package/dist/integrations/hooks/useVaultName.d.ts +1 -0
- package/dist/integrations/hooks/useVaultName.js +27 -0
- package/dist/integrations/hooks/useVaultName.js.map +1 -0
- package/dist/integrations/pages/ConnectionDetail.js +561 -283
- package/dist/integrations/pages/ConnectionDetail.js.map +1 -1
- package/dist/integrations/pages/ConnectionLogs.d.ts +3 -0
- package/dist/integrations/pages/ConnectionLogs.js +178 -142
- package/dist/integrations/pages/ConnectionLogs.js.map +1 -1
- package/dist/integrations/pages/ConnectionsList.js +376 -243
- package/dist/integrations/pages/ConnectionsList.js.map +1 -1
- package/dist/integrations/pages/ProviderCatalog.js +199 -179
- package/dist/integrations/pages/ProviderCatalog.js.map +1 -1
- package/dist/integrations/pages/ProviderDetail.js +284 -265
- package/dist/integrations/pages/ProviderDetail.js.map +1 -1
- package/dist/integrations/providers/IntegrationsProvider.js +22 -21
- package/dist/integrations/providers/IntegrationsProvider.js.map +1 -1
- package/dist/integrations/types/index.d.ts +12 -0
- package/dist/integrations/utils/connectedApps.d.ts +26 -0
- package/dist/integrations/utils/connectedApps.js +46 -0
- package/dist/integrations/utils/connectedApps.js.map +1 -0
- package/dist/integrations/utils/mappers.js +1 -0
- package/dist/integrations/utils/mappers.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,80 +1,86 @@
|
|
|
1
1
|
import { cn as e } from "../utils/cn.js";
|
|
2
|
-
import { useTr as
|
|
3
|
-
import { useAuthTypeLabel as
|
|
4
|
-
import { useFormatLastUsed as
|
|
5
|
-
import { useFormatDate as
|
|
6
|
-
import { useIntegrations as
|
|
7
|
-
import { INTEGRATION_PERMISSIONS as
|
|
8
|
-
import { INTEGRATION_FEATURE_FLAGS as
|
|
9
|
-
import { joinPath as
|
|
10
|
-
import { useConnection as
|
|
11
|
-
import { ConnectionStatusBadge as
|
|
12
|
-
import { ConnectionShareDialog as
|
|
13
|
-
import { ConfirmDialog as
|
|
14
|
-
import { nativeConfirm as
|
|
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
|
|
17
|
-
import { useParams as
|
|
18
|
-
import { usePermissions as
|
|
19
|
-
import { jsx as
|
|
20
|
-
import { useFeatureFlag as
|
|
21
|
-
import { ProviderIcon as
|
|
22
|
-
import { AlertDialog as
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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:
|
|
29
|
-
}), setTimeout(() =>
|
|
34
|
+
message: ee
|
|
35
|
+
}), setTimeout(() => W(null), 5e3);
|
|
30
36
|
};
|
|
31
|
-
if (
|
|
37
|
+
if (qe || $e) return /* @__PURE__ */ v("div", {
|
|
32
38
|
className: "flex flex-col items-center justify-center py-20",
|
|
33
|
-
children: [/* @__PURE__ */
|
|
39
|
+
children: [/* @__PURE__ */ _(d, {
|
|
34
40
|
size: 48,
|
|
35
41
|
className: "animate-spin text-primary"
|
|
36
|
-
}), /* @__PURE__ */
|
|
42
|
+
}), /* @__PURE__ */ _("span", {
|
|
37
43
|
className: "mt-6 text-sm font-medium text-text-secondary",
|
|
38
|
-
children:
|
|
44
|
+
children: k("integrations.connectionDetail.loading", "Loading connection details...")
|
|
39
45
|
})]
|
|
40
46
|
});
|
|
41
|
-
if (
|
|
47
|
+
if (M || !j) return /* @__PURE__ */ _("div", {
|
|
42
48
|
className: "p-6 max-w-4xl mx-auto",
|
|
43
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
51
|
+
children: [/* @__PURE__ */ _(s, {
|
|
46
52
|
size: 24,
|
|
47
53
|
className: "text-status-error-text flex-shrink-0"
|
|
48
|
-
}), /* @__PURE__ */
|
|
54
|
+
}), /* @__PURE__ */ v("div", {
|
|
49
55
|
className: "flex-1",
|
|
50
56
|
children: [
|
|
51
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ _("h3", {
|
|
52
58
|
className: "font-semibold text-status-error-text mb-1",
|
|
53
|
-
children:
|
|
59
|
+
children: k("integrations.connectionDetail.error.title", "Connection not found")
|
|
54
60
|
}),
|
|
55
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ _("p", {
|
|
56
62
|
className: "text-sm text-status-error-text mb-3",
|
|
57
|
-
children:
|
|
63
|
+
children: M?.message || k("integrations.connectionDetail.error.description", "The requested connection could not be loaded.")
|
|
58
64
|
}),
|
|
59
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ v("div", {
|
|
60
66
|
className: "flex gap-2",
|
|
61
|
-
children: [/* @__PURE__ */
|
|
67
|
+
children: [/* @__PURE__ */ v("button", {
|
|
62
68
|
type: "button",
|
|
63
|
-
onClick: () =>
|
|
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__ */
|
|
72
|
+
/* @__PURE__ */ _(Ce, { size: 14 }),
|
|
67
73
|
" ",
|
|
68
|
-
|
|
74
|
+
k("integrations.connectionDetail.error.retry", "Try Again")
|
|
69
75
|
]
|
|
70
|
-
}), /* @__PURE__ */
|
|
76
|
+
}), /* @__PURE__ */ v("button", {
|
|
71
77
|
type: "button",
|
|
72
|
-
onClick: () =>
|
|
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__ */
|
|
81
|
+
/* @__PURE__ */ _(c, { size: 14 }),
|
|
76
82
|
" ",
|
|
77
|
-
|
|
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
|
|
86
|
-
let e = await
|
|
87
|
-
e && (
|
|
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
|
-
|
|
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
|
-
|
|
120
|
+
J("error", e instanceof Error ? e.message : "Failed to delete connection"), i("error");
|
|
108
121
|
}
|
|
109
|
-
}, Z =
|
|
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:
|
|
113
|
-
description:
|
|
114
|
-
icon: /* @__PURE__ */ g
|
|
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
|
-
|
|
129
|
+
Y();
|
|
117
130
|
},
|
|
118
|
-
done:
|
|
131
|
+
done: j.status === "active" && !!H?.success
|
|
119
132
|
},
|
|
120
|
-
...
|
|
133
|
+
...z && j.provider.authType === "oauth2" && L ? [{
|
|
121
134
|
id: "refresh",
|
|
122
|
-
label:
|
|
123
|
-
description:
|
|
124
|
-
icon: /* @__PURE__ */
|
|
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
|
-
|
|
139
|
+
X();
|
|
127
140
|
}
|
|
128
141
|
}] : [],
|
|
129
142
|
{
|
|
130
143
|
id: "logs",
|
|
131
|
-
label:
|
|
132
|
-
description:
|
|
133
|
-
icon: /* @__PURE__ */
|
|
134
|
-
onClick: () =>
|
|
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
|
-
|
|
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
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
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__ */
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
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__ */
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
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__ */
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
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__ */
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
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__ */
|
|
487
|
+
children: /* @__PURE__ */ v("div", {
|
|
214
488
|
className: "flex items-center gap-4",
|
|
215
489
|
children: [
|
|
216
|
-
/* @__PURE__ */
|
|
490
|
+
/* @__PURE__ */ _(y, {
|
|
217
491
|
variant: "ghost",
|
|
218
492
|
size: "icon",
|
|
219
|
-
onClick: () =>
|
|
220
|
-
"aria-label":
|
|
221
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
224
|
-
provider:
|
|
497
|
+
/* @__PURE__ */ _(Ae, {
|
|
498
|
+
provider: j.provider,
|
|
225
499
|
size: 56
|
|
226
500
|
}),
|
|
227
|
-
/* @__PURE__ */
|
|
501
|
+
/* @__PURE__ */ v("div", {
|
|
228
502
|
className: "flex-1",
|
|
229
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
510
|
+
/* @__PURE__ */ _("h1", {
|
|
233
511
|
className: "text-2xl sm:text-3xl font-bold text-text-primary",
|
|
234
|
-
children:
|
|
512
|
+
children: j.name
|
|
235
513
|
}),
|
|
236
|
-
/* @__PURE__ */
|
|
237
|
-
status:
|
|
514
|
+
/* @__PURE__ */ _(de, {
|
|
515
|
+
status: j.status,
|
|
238
516
|
size: "md"
|
|
239
517
|
}),
|
|
240
|
-
/* @__PURE__ */
|
|
518
|
+
/* @__PURE__ */ _(pe, { connection: j })
|
|
241
519
|
]
|
|
242
|
-
}), /* @__PURE__ */
|
|
520
|
+
}), /* @__PURE__ */ v("p", {
|
|
243
521
|
className: "text-sm text-text-secondary mt-0.5",
|
|
244
522
|
children: [
|
|
245
|
-
|
|
523
|
+
j.provider.name,
|
|
246
524
|
" · ",
|
|
247
|
-
|
|
525
|
+
Ge(j.provider.authType)
|
|
248
526
|
]
|
|
249
527
|
})]
|
|
250
528
|
})
|
|
251
529
|
]
|
|
252
530
|
})
|
|
253
531
|
}),
|
|
254
|
-
/* @__PURE__ */
|
|
255
|
-
icon: /* @__PURE__ */
|
|
256
|
-
children:
|
|
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
|
-
(
|
|
536
|
+
(z || B) && /* @__PURE__ */ _(S, {
|
|
259
537
|
storageKey: "integrations-connection-detail",
|
|
260
|
-
steps:
|
|
538
|
+
steps: mt
|
|
261
539
|
}),
|
|
262
|
-
/* @__PURE__ */
|
|
540
|
+
/* @__PURE__ */ v("div", {
|
|
263
541
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
264
|
-
children: [/* @__PURE__ */
|
|
542
|
+
children: [/* @__PURE__ */ v(Be, {
|
|
265
543
|
className: "p-5 space-y-4",
|
|
266
|
-
children: [/* @__PURE__ */
|
|
544
|
+
children: [/* @__PURE__ */ v("h2", {
|
|
267
545
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
268
|
-
children: [/* @__PURE__ */
|
|
546
|
+
children: [/* @__PURE__ */ _(o, {
|
|
269
547
|
size: 18,
|
|
270
548
|
className: "text-primary"
|
|
271
|
-
}),
|
|
272
|
-
}), /* @__PURE__ */
|
|
549
|
+
}), k("integrations.connectionDetail.sections.info", "Connection Info")]
|
|
550
|
+
}), /* @__PURE__ */ v("div", {
|
|
273
551
|
className: "space-y-3",
|
|
274
552
|
children: [
|
|
275
|
-
|
|
553
|
+
j.description && /* @__PURE__ */ v("div", {
|
|
276
554
|
className: "py-2 border-b border-border-seam",
|
|
277
|
-
children: [/* @__PURE__ */
|
|
555
|
+
children: [/* @__PURE__ */ _("span", {
|
|
278
556
|
className: "text-xs text-text-secondary uppercase tracking-wide",
|
|
279
|
-
children:
|
|
280
|
-
}), /* @__PURE__ */
|
|
557
|
+
children: k("integrations.connectionDetail.fields.description", "Description")
|
|
558
|
+
}), /* @__PURE__ */ _("p", {
|
|
281
559
|
className: "text-sm text-text-primary mt-0.5",
|
|
282
|
-
children:
|
|
560
|
+
children: j.description
|
|
283
561
|
})]
|
|
284
562
|
}),
|
|
285
|
-
/* @__PURE__ */
|
|
563
|
+
/* @__PURE__ */ v("div", {
|
|
286
564
|
className: "flex items-center justify-between py-2 border-b border-border-seam",
|
|
287
|
-
children: [/* @__PURE__ */
|
|
565
|
+
children: [/* @__PURE__ */ _("span", {
|
|
288
566
|
className: "text-sm text-text-secondary",
|
|
289
|
-
children:
|
|
290
|
-
}), /* @__PURE__ */
|
|
567
|
+
children: k("integrations.connectionDetail.fields.provider", "Provider")
|
|
568
|
+
}), /* @__PURE__ */ _("span", {
|
|
291
569
|
className: "text-sm font-medium text-text-primary",
|
|
292
|
-
children:
|
|
570
|
+
children: j.provider.name
|
|
293
571
|
})]
|
|
294
572
|
}),
|
|
295
|
-
|
|
573
|
+
j.externalAccountEmail && /* @__PURE__ */ v("div", {
|
|
296
574
|
className: "flex items-center justify-between py-2 border-b border-border-seam",
|
|
297
|
-
children: [/* @__PURE__ */
|
|
575
|
+
children: [/* @__PURE__ */ v("span", {
|
|
298
576
|
className: "text-sm text-text-secondary flex items-center gap-1",
|
|
299
577
|
children: [
|
|
300
|
-
/* @__PURE__ */
|
|
578
|
+
/* @__PURE__ */ _(Se, { size: 14 }),
|
|
301
579
|
" ",
|
|
302
|
-
|
|
580
|
+
k("integrations.connectionDetail.fields.account", "Account")
|
|
303
581
|
]
|
|
304
|
-
}), /* @__PURE__ */
|
|
582
|
+
}), /* @__PURE__ */ _("span", {
|
|
305
583
|
className: "text-sm font-medium text-text-primary",
|
|
306
|
-
children:
|
|
584
|
+
children: j.externalAccountEmail
|
|
307
585
|
})]
|
|
308
586
|
}),
|
|
309
|
-
|
|
587
|
+
j.externalAccountName && /* @__PURE__ */ v("div", {
|
|
310
588
|
className: "flex items-center justify-between py-2 border-b border-border-seam",
|
|
311
|
-
children: [/* @__PURE__ */
|
|
589
|
+
children: [/* @__PURE__ */ v("span", {
|
|
312
590
|
className: "text-sm text-text-secondary flex items-center gap-1",
|
|
313
591
|
children: [
|
|
314
|
-
/* @__PURE__ */
|
|
592
|
+
/* @__PURE__ */ _(Te, { size: 14 }),
|
|
315
593
|
" ",
|
|
316
|
-
|
|
594
|
+
k("integrations.connectionDetail.fields.name", "Name")
|
|
317
595
|
]
|
|
318
|
-
}), /* @__PURE__ */
|
|
596
|
+
}), /* @__PURE__ */ _("span", {
|
|
319
597
|
className: "text-sm font-medium text-text-primary",
|
|
320
|
-
children:
|
|
598
|
+
children: j.externalAccountName
|
|
321
599
|
})]
|
|
322
600
|
}),
|
|
323
|
-
|
|
601
|
+
j.errorMessage && /* @__PURE__ */ v("div", {
|
|
324
602
|
className: "py-2 border-b border-border-seam",
|
|
325
|
-
children: [/* @__PURE__ */
|
|
603
|
+
children: [/* @__PURE__ */ _("span", {
|
|
326
604
|
className: "text-xs text-status-error-text uppercase tracking-wide",
|
|
327
|
-
children:
|
|
328
|
-
}), /* @__PURE__ */
|
|
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:
|
|
608
|
+
children: j.errorMessage
|
|
331
609
|
})]
|
|
332
610
|
}),
|
|
333
|
-
/* @__PURE__ */
|
|
611
|
+
/* @__PURE__ */ v("div", {
|
|
334
612
|
className: "flex items-center justify-between py-2 border-b border-border-seam",
|
|
335
|
-
children: [/* @__PURE__ */
|
|
613
|
+
children: [/* @__PURE__ */ v("span", {
|
|
336
614
|
className: "text-sm text-text-secondary flex items-center gap-1",
|
|
337
615
|
children: [
|
|
338
|
-
/* @__PURE__ */
|
|
616
|
+
/* @__PURE__ */ _(xe, { size: 14 }),
|
|
339
617
|
" ",
|
|
340
|
-
|
|
618
|
+
k("integrations.connectionDetail.fields.lastUsed", "Last Used")
|
|
341
619
|
]
|
|
342
|
-
}), /* @__PURE__ */
|
|
620
|
+
}), /* @__PURE__ */ _("span", {
|
|
343
621
|
className: "text-sm text-text-primary",
|
|
344
|
-
children:
|
|
622
|
+
children: Ke(j.lastUsedAt)
|
|
345
623
|
})]
|
|
346
624
|
}),
|
|
347
|
-
/* @__PURE__ */
|
|
625
|
+
/* @__PURE__ */ v("div", {
|
|
348
626
|
className: "flex items-center justify-between py-2 border-b border-border-seam",
|
|
349
|
-
children: [/* @__PURE__ */
|
|
627
|
+
children: [/* @__PURE__ */ _("span", {
|
|
350
628
|
className: "text-sm text-text-secondary",
|
|
351
|
-
children:
|
|
352
|
-
}), /* @__PURE__ */
|
|
629
|
+
children: k("integrations.connectionDetail.fields.healthCheck", "Health Check")
|
|
630
|
+
}), /* @__PURE__ */ _("span", {
|
|
353
631
|
className: "text-sm text-text-primary",
|
|
354
|
-
children:
|
|
632
|
+
children: A(j.lastHealthCheck)
|
|
355
633
|
})]
|
|
356
634
|
}),
|
|
357
|
-
/* @__PURE__ */
|
|
635
|
+
/* @__PURE__ */ v("div", {
|
|
358
636
|
className: "flex items-center justify-between py-2",
|
|
359
|
-
children: [/* @__PURE__ */
|
|
637
|
+
children: [/* @__PURE__ */ _("span", {
|
|
360
638
|
className: "text-sm text-text-secondary",
|
|
361
|
-
children:
|
|
362
|
-
}), /* @__PURE__ */
|
|
639
|
+
children: k("integrations.connectionDetail.fields.created", "Created")
|
|
640
|
+
}), /* @__PURE__ */ _("span", {
|
|
363
641
|
className: "text-sm text-text-primary",
|
|
364
|
-
children:
|
|
642
|
+
children: A(j.createdAt)
|
|
365
643
|
})]
|
|
366
644
|
})
|
|
367
645
|
]
|
|
368
646
|
})]
|
|
369
|
-
}), /* @__PURE__ */
|
|
647
|
+
}), /* @__PURE__ */ v("div", {
|
|
370
648
|
className: "space-y-4",
|
|
371
649
|
children: [
|
|
372
|
-
/* @__PURE__ */
|
|
650
|
+
/* @__PURE__ */ v(x, {
|
|
373
651
|
className: "border-border-seam p-5",
|
|
374
|
-
children: [/* @__PURE__ */
|
|
652
|
+
children: [/* @__PURE__ */ v("h2", {
|
|
375
653
|
className: "font-semibold text-text-primary flex items-center gap-2 mb-3",
|
|
376
|
-
children: [/* @__PURE__ */
|
|
654
|
+
children: [/* @__PURE__ */ _(p, {
|
|
377
655
|
size: 18,
|
|
378
656
|
className: "text-primary"
|
|
379
|
-
}),
|
|
380
|
-
}),
|
|
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__ */
|
|
661
|
+
children: /* @__PURE__ */ _("div", {
|
|
384
662
|
className: "flex flex-wrap gap-2",
|
|
385
|
-
children:
|
|
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__ */
|
|
668
|
+
}) : /* @__PURE__ */ _("p", {
|
|
391
669
|
className: "text-sm text-text-secondary",
|
|
392
|
-
children:
|
|
670
|
+
children: k("integrations.connectionDetail.scopes.empty", "No scopes granted.")
|
|
393
671
|
})]
|
|
394
672
|
}),
|
|
395
|
-
|
|
396
|
-
className: e("rounded-xl border p-5",
|
|
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__ */
|
|
399
|
-
className: e("font-semibold flex items-center gap-2 mb-2",
|
|
400
|
-
children: [
|
|
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__ */
|
|
403
|
-
className: e("text-sm",
|
|
404
|
-
children:
|
|
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__ */
|
|
684
|
+
/* @__PURE__ */ _("p", {
|
|
407
685
|
className: "text-xs text-text-secondary mt-1",
|
|
408
|
-
children:
|
|
686
|
+
children: k("integrations.connectionDetail.testResult.latency", "Latency: {latency}ms", { latency: H.latencyMs })
|
|
409
687
|
})
|
|
410
688
|
]
|
|
411
689
|
}),
|
|
412
|
-
$ && /* @__PURE__ */
|
|
690
|
+
$ && /* @__PURE__ */ v(x, {
|
|
413
691
|
className: "border-border-seam p-5",
|
|
414
|
-
children: [/* @__PURE__ */
|
|
692
|
+
children: [/* @__PURE__ */ v("h2", {
|
|
415
693
|
className: "font-semibold text-text-primary flex items-center gap-2 mb-3",
|
|
416
|
-
children: [/* @__PURE__ */
|
|
694
|
+
children: [/* @__PURE__ */ _(u, {
|
|
417
695
|
size: 18,
|
|
418
696
|
className: "text-primary"
|
|
419
|
-
}),
|
|
420
|
-
}), /* @__PURE__ */
|
|
697
|
+
}), k("integrations.connectionDetail.sections.credentialStorage", "Credential Storage")]
|
|
698
|
+
}), /* @__PURE__ */ v("div", {
|
|
421
699
|
className: "space-y-2 text-sm",
|
|
422
700
|
children: [
|
|
423
|
-
|
|
701
|
+
j.vaultId && /* @__PURE__ */ v("div", {
|
|
424
702
|
className: "flex items-center justify-between gap-3",
|
|
425
|
-
children: [/* @__PURE__ */
|
|
703
|
+
children: [/* @__PURE__ */ _("span", {
|
|
426
704
|
className: "text-text-secondary",
|
|
427
|
-
children:
|
|
428
|
-
}), /* @__PURE__ */
|
|
705
|
+
children: k("integrations.connectionDetail.fields.vault", "Vault")
|
|
706
|
+
}), /* @__PURE__ */ _("span", {
|
|
429
707
|
className: "font-medium text-text-primary break-all",
|
|
430
|
-
children:
|
|
708
|
+
children: lt ?? j.vaultId
|
|
431
709
|
})]
|
|
432
710
|
}),
|
|
433
|
-
|
|
711
|
+
j.credentialSecretName && /* @__PURE__ */ v("div", {
|
|
434
712
|
className: "flex items-center justify-between gap-3",
|
|
435
|
-
children: [/* @__PURE__ */
|
|
713
|
+
children: [/* @__PURE__ */ _("span", {
|
|
436
714
|
className: "text-text-secondary",
|
|
437
|
-
children:
|
|
438
|
-
}), /* @__PURE__ */
|
|
715
|
+
children: k("integrations.connectionDetail.fields.secret", "Secret")
|
|
716
|
+
}), /* @__PURE__ */ _("span", {
|
|
439
717
|
className: "font-medium text-text-primary break-all",
|
|
440
|
-
children:
|
|
718
|
+
children: j.credentialSecretName
|
|
441
719
|
})]
|
|
442
720
|
}),
|
|
443
|
-
|
|
721
|
+
j.credentialSecretId && /* @__PURE__ */ v("div", {
|
|
444
722
|
className: "flex items-center justify-between gap-3",
|
|
445
|
-
children: [/* @__PURE__ */
|
|
723
|
+
children: [/* @__PURE__ */ _("span", {
|
|
446
724
|
className: "text-text-secondary",
|
|
447
|
-
children:
|
|
448
|
-
}), /* @__PURE__ */
|
|
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:
|
|
728
|
+
children: j.credentialSecretId
|
|
451
729
|
})]
|
|
452
730
|
})
|
|
453
731
|
]
|
|
454
732
|
})]
|
|
455
733
|
}),
|
|
456
|
-
(
|
|
734
|
+
(z || B || Q) && /* @__PURE__ */ v(x, {
|
|
457
735
|
className: "border-border-seam p-5",
|
|
458
|
-
children: [/* @__PURE__ */
|
|
736
|
+
children: [/* @__PURE__ */ v("h2", {
|
|
459
737
|
className: "font-semibold text-text-primary flex items-center gap-2 mb-3",
|
|
460
|
-
children: [/* @__PURE__ */
|
|
738
|
+
children: [/* @__PURE__ */ _(u, {
|
|
461
739
|
size: 18,
|
|
462
740
|
className: "text-primary"
|
|
463
|
-
}),
|
|
464
|
-
}), /* @__PURE__ */
|
|
741
|
+
}), k("integrations.connectionDetail.sections.actions", "Actions")]
|
|
742
|
+
}), /* @__PURE__ */ _(b, {
|
|
465
743
|
align: "start",
|
|
466
744
|
primary: {
|
|
467
|
-
label:
|
|
745
|
+
label: k("integrations.connectionDetail.actions.test", "Test Connection"),
|
|
468
746
|
onSelect: () => {
|
|
469
|
-
|
|
747
|
+
Y();
|
|
470
748
|
},
|
|
471
749
|
disabled: Z,
|
|
472
|
-
icon:
|
|
750
|
+
icon: P ? /* @__PURE__ */ _(d, {
|
|
473
751
|
size: 14,
|
|
474
752
|
className: "animate-spin"
|
|
475
|
-
}) : /* @__PURE__ */ g
|
|
753
|
+
}) : /* @__PURE__ */ _(g, { size: 14 })
|
|
476
754
|
},
|
|
477
755
|
actions: [
|
|
478
756
|
...Q ? [{
|
|
479
|
-
label:
|
|
480
|
-
onSelect: () =>
|
|
757
|
+
label: k("integrations.connectionDetail.actions.share", "Share"),
|
|
758
|
+
onSelect: () => V(!0),
|
|
481
759
|
disabled: Z,
|
|
482
|
-
icon: /* @__PURE__ */
|
|
760
|
+
icon: /* @__PURE__ */ _(we, { size: 14 })
|
|
483
761
|
}] : [],
|
|
484
|
-
...
|
|
485
|
-
label:
|
|
762
|
+
...z && j.provider.authType === "oauth2" && L ? [{
|
|
763
|
+
label: k("integrations.connectionDetail.actions.refreshToken", "Refresh Token"),
|
|
486
764
|
onSelect: () => {
|
|
487
|
-
|
|
765
|
+
X();
|
|
488
766
|
},
|
|
489
767
|
disabled: Z,
|
|
490
|
-
icon: /* @__PURE__ */
|
|
768
|
+
icon: /* @__PURE__ */ _(f, { size: 14 })
|
|
491
769
|
}] : [],
|
|
492
|
-
...
|
|
493
|
-
label:
|
|
770
|
+
...B ? [{
|
|
771
|
+
label: k("integrations.connectionDetail.actions.revoke", "Revoke"),
|
|
494
772
|
onSelect: () => {
|
|
495
|
-
|
|
773
|
+
ut();
|
|
496
774
|
},
|
|
497
775
|
disabled: Z,
|
|
498
|
-
icon: /* @__PURE__ */
|
|
776
|
+
icon: /* @__PURE__ */ _(p, { size: 14 })
|
|
499
777
|
}, {
|
|
500
|
-
label:
|
|
778
|
+
label: k("integrations.connectionDetail.actions.delete", "Delete"),
|
|
501
779
|
onSelect: () => {
|
|
502
|
-
|
|
780
|
+
ft();
|
|
503
781
|
},
|
|
504
782
|
intent: "destructive",
|
|
505
783
|
disabled: Z,
|
|
506
|
-
icon: /* @__PURE__ */
|
|
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 {
|
|
795
|
+
export { E as ConnectionDetail };
|
|
518
796
|
|
|
519
797
|
//# sourceMappingURL=ConnectionDetail.js.map
|