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