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