@burdenoff/microfe-integrations 2026.625.2 → 2026.625.4
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/integrations/components/ConnectionStatusBadge.js +1 -1
- package/dist/integrations/components/ConnectionStatusBadge.js.map +1 -1
- package/dist/integrations/pages/AddConnectionWizard.js +258 -256
- package/dist/integrations/pages/AddConnectionWizard.js.map +1 -1
- package/dist/integrations/pages/ConnectionDetail.js +187 -152
- package/dist/integrations/pages/ConnectionDetail.js.map +1 -1
- package/dist/integrations/pages/ConnectionLogs.js +43 -55
- package/dist/integrations/pages/ConnectionLogs.js.map +1 -1
- package/dist/integrations/pages/ConnectionsList.js +66 -79
- package/dist/integrations/pages/ConnectionsList.js.map +1 -1
- package/dist/integrations/pages/IntegrationsOverview.js +101 -81
- package/dist/integrations/pages/IntegrationsOverview.js.map +1 -1
- package/dist/integrations/pages/IntegrationsSettings.js +52 -48
- package/dist/integrations/pages/IntegrationsSettings.js.map +1 -1
- package/dist/integrations/pages/ProviderCatalog.js +94 -106
- package/dist/integrations/pages/ProviderCatalog.js.map +1 -1
- package/dist/integrations/pages/ProviderDetail.js +211 -190
- package/dist/integrations/pages/ProviderDetail.js.map +1 -1
- package/dist/integrations/pages/ProviderEditorPage.js +147 -143
- package/dist/integrations/pages/ProviderEditorPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -3,45 +3,45 @@ import { cn as t } from "../utils/cn.js";
|
|
|
3
3
|
import { INTEGRATION_PERMISSIONS as n } from "../constants/permissions.js";
|
|
4
4
|
import { joinPath as r } from "../utils/navigation.js";
|
|
5
5
|
import { formatDate as i, formatLastUsed as ee, getAuthTypeLabel as te } from "../utils/integrationsHelpers.js";
|
|
6
|
-
import { useConnection as ne, useDeleteConnection as re, useRefreshToken as ie, useRevokeConnection as
|
|
7
|
-
import { ProviderIcon as
|
|
8
|
-
import { ConnectionStatusBadge as
|
|
9
|
-
import { INTEGRATION_FEATURE_FLAGS as
|
|
10
|
-
import { ConfirmDialog as
|
|
11
|
-
import { nativeConfirm as
|
|
12
|
-
import { useState as
|
|
13
|
-
import { Activity as
|
|
6
|
+
import { useConnection as ne, useDeleteConnection as re, useRefreshToken as ie, useRevokeConnection as ae, useTestConnection as a } from "../hooks/useConnections.js";
|
|
7
|
+
import { ProviderIcon as oe } from "../components/ProviderIcon.js";
|
|
8
|
+
import { ConnectionStatusBadge as se } from "../components/ConnectionStatusBadge.js";
|
|
9
|
+
import { INTEGRATION_FEATURE_FLAGS as ce } from "../constants/featureFlags.js";
|
|
10
|
+
import { ConfirmDialog as le } from "../components/ConfirmDialog.js";
|
|
11
|
+
import { nativeConfirm as ue, nativeImpact as de, nativeNotify as o } from "../../utils/nativeBridge.js";
|
|
12
|
+
import { useState as s } from "react";
|
|
13
|
+
import { Activity as c, AlertCircle as fe, ArrowLeft as l, CheckCircle2 as u, Clock as pe, Key as d, Loader2 as f, Mail as me, RefreshCw as he, RotateCcw as p, Shield as m, Trash2 as h, User as ge, XCircle as g, Zap as _ } from "lucide-react";
|
|
14
14
|
import { useParams as _e } from "react-router-dom";
|
|
15
15
|
import { useI18n as ve, usePermissions as ye } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
16
16
|
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
17
17
|
import { useFeatureFlag as be } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
18
|
-
import { AlertDialog as xe, AlertDialogAction as Se, AlertDialogCancel as
|
|
18
|
+
import { AlertDialog as xe, AlertDialogAction as Se, AlertDialogCancel as Ce, AlertDialogContent as we, AlertDialogDescription as Te, AlertDialogFooter as Ee, AlertDialogHeader as De, AlertDialogTitle as Oe, Button as b, CTAOverflowMenu as x, EmphasisPanel as S, GlassCard as C, NextSteps as w, PagePurpose as T, ShowMore as ke } from "@burdenoff/fe-libs/ui";
|
|
19
19
|
//#region src/integrations/pages/ConnectionDetail.tsx
|
|
20
|
-
function
|
|
21
|
-
let { connectionId:
|
|
22
|
-
let r =
|
|
20
|
+
function E() {
|
|
21
|
+
let { connectionId: E } = _e(), { basePath: D = "/", navigate: O } = e(), { t: Ae } = ve(), k = (e, t, n) => {
|
|
22
|
+
let r = Ae(e, n);
|
|
23
23
|
return r === e ? n ? Object.entries(n).reduce((e, [t, n]) => e.replace(`{{${t}}}`, String(n)).replace(`{${t}}`, String(n)), t) : t : r;
|
|
24
|
-
}, { connection:
|
|
25
|
-
|
|
24
|
+
}, { connection: A, loading: je, error: j, refetch: M } = ne(E ?? ""), { testConnection: Me, loading: N } = a(), { refreshToken: Ne, loading: Pe } = ie(), { revokeConnection: Fe, loading: P } = ae(), { deleteConnection: F, loading: I } = re(), L = be(ce.OAUTH_REFRESH, !0), { hasPermission: R, isLoading: Ie } = ye(), z = R(n.CONNECTION_UPDATE), B = R(n.CONNECTION_DELETE), [V, Le] = s(null), [H, U] = s(null), [Re, W] = s(!1), [G, K] = s(!1), [ze, q] = s(!1), J = (e, t) => {
|
|
25
|
+
U({
|
|
26
26
|
type: e,
|
|
27
27
|
message: t
|
|
28
|
-
}), setTimeout(() =>
|
|
28
|
+
}), setTimeout(() => U(null), 5e3);
|
|
29
29
|
};
|
|
30
|
-
if (
|
|
30
|
+
if (je || Ie) return /* @__PURE__ */ y("div", {
|
|
31
31
|
className: "flex flex-col items-center justify-center py-20",
|
|
32
|
-
children: [/* @__PURE__ */ v(
|
|
32
|
+
children: [/* @__PURE__ */ v(f, {
|
|
33
33
|
size: 48,
|
|
34
34
|
className: "animate-spin text-primary"
|
|
35
35
|
}), /* @__PURE__ */ v("span", {
|
|
36
36
|
className: "mt-6 text-sm font-medium text-text-secondary",
|
|
37
|
-
children:
|
|
37
|
+
children: k("integrations.connectionDetail.loading", "Loading connection details...")
|
|
38
38
|
})]
|
|
39
39
|
});
|
|
40
|
-
if (
|
|
40
|
+
if (j || !A) return /* @__PURE__ */ v("div", {
|
|
41
41
|
className: "p-6 max-w-4xl mx-auto",
|
|
42
42
|
children: /* @__PURE__ */ y("div", {
|
|
43
43
|
className: "rounded-xl border border-border-default bg-status-error-bg-subtle p-6 flex items-start gap-4",
|
|
44
|
-
children: [/* @__PURE__ */ v(
|
|
44
|
+
children: [/* @__PURE__ */ v(fe, {
|
|
45
45
|
size: 24,
|
|
46
46
|
className: "text-status-error-text flex-shrink-0"
|
|
47
47
|
}), /* @__PURE__ */ y("div", {
|
|
@@ -49,31 +49,31 @@ function A() {
|
|
|
49
49
|
children: [
|
|
50
50
|
/* @__PURE__ */ v("h3", {
|
|
51
51
|
className: "font-semibold text-status-error-text mb-1",
|
|
52
|
-
children:
|
|
52
|
+
children: k("integrations.connectionDetail.error.title", "Connection not found")
|
|
53
53
|
}),
|
|
54
54
|
/* @__PURE__ */ v("p", {
|
|
55
55
|
className: "text-sm text-status-error-text mb-3",
|
|
56
|
-
children:
|
|
56
|
+
children: j?.message || k("integrations.connectionDetail.error.description", "The requested connection could not be loaded.")
|
|
57
57
|
}),
|
|
58
58
|
/* @__PURE__ */ y("div", {
|
|
59
59
|
className: "flex gap-2",
|
|
60
60
|
children: [/* @__PURE__ */ y("button", {
|
|
61
61
|
type: "button",
|
|
62
|
-
onClick: () =>
|
|
62
|
+
onClick: () => M(),
|
|
63
63
|
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",
|
|
64
64
|
children: [
|
|
65
|
-
/* @__PURE__ */ v(
|
|
65
|
+
/* @__PURE__ */ v(he, { size: 14 }),
|
|
66
66
|
" ",
|
|
67
|
-
|
|
67
|
+
k("integrations.connectionDetail.error.retry", "Try Again")
|
|
68
68
|
]
|
|
69
69
|
}), /* @__PURE__ */ y("button", {
|
|
70
70
|
type: "button",
|
|
71
|
-
onClick: () =>
|
|
71
|
+
onClick: () => O?.(r(D, "connections")),
|
|
72
72
|
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",
|
|
73
73
|
children: [
|
|
74
|
-
/* @__PURE__ */ v(
|
|
74
|
+
/* @__PURE__ */ v(l, { size: 14 }),
|
|
75
75
|
" ",
|
|
76
|
-
|
|
76
|
+
k("integrations.connectionDetail.error.back", "Back to Connections")
|
|
77
77
|
]
|
|
78
78
|
})]
|
|
79
79
|
})
|
|
@@ -81,60 +81,87 @@ function A() {
|
|
|
81
81
|
})]
|
|
82
82
|
})
|
|
83
83
|
});
|
|
84
|
-
let
|
|
85
|
-
let e = await
|
|
86
|
-
e && (
|
|
87
|
-
},
|
|
88
|
-
await
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
},
|
|
92
|
-
await
|
|
93
|
-
},
|
|
94
|
-
|
|
95
|
-
let e = await
|
|
96
|
-
title:
|
|
97
|
-
message:
|
|
98
|
-
okButtonTitle:
|
|
99
|
-
cancelButtonTitle:
|
|
84
|
+
let Y = async () => {
|
|
85
|
+
let e = await Me(A.id);
|
|
86
|
+
e && (Le(e), J(e.success ? "success" : "error", e.message));
|
|
87
|
+
}, X = async () => {
|
|
88
|
+
await Ne(A.id), J("success", k("integrations.connectionDetail.notifications.refreshSuccess", "Token refreshed successfully")), M();
|
|
89
|
+
}, Be = async () => {
|
|
90
|
+
q(!0);
|
|
91
|
+
}, Ve = async () => {
|
|
92
|
+
await Fe(A.id), J("success", k("integrations.connectionDetail.notifications.revokeSuccess", "Connection revoked")), q(!1), M();
|
|
93
|
+
}, He = async () => {
|
|
94
|
+
de("medium");
|
|
95
|
+
let e = await ue({
|
|
96
|
+
title: k("integrations.connectionDetail.deleteDialog.title", "Delete Connection"),
|
|
97
|
+
message: k("integrations.connectionDetail.deleteDialog.message", "Delete this connection? This cannot be undone."),
|
|
98
|
+
okButtonTitle: k("integrations.connectionDetail.deleteDialog.confirm", "Delete"),
|
|
99
|
+
cancelButtonTitle: k("integrations.connectionDetail.deleteDialog.cancel", "Cancel")
|
|
100
100
|
});
|
|
101
101
|
if (e === null) {
|
|
102
|
-
|
|
102
|
+
W(!0);
|
|
103
103
|
return;
|
|
104
104
|
}
|
|
105
105
|
e && await Z();
|
|
106
106
|
}, Z = async () => {
|
|
107
107
|
try {
|
|
108
|
-
await
|
|
108
|
+
await F(A.id, G), J("success", k("integrations.connectionDetail.notifications.deleteSuccess", "Connection deleted")), o("success"), W(!1), K(!1), O?.(r(D, "connections"));
|
|
109
109
|
} catch (e) {
|
|
110
|
-
|
|
110
|
+
J("error", e instanceof Error ? e.message : "Failed to delete connection"), o("error");
|
|
111
111
|
}
|
|
112
|
-
}, Q =
|
|
112
|
+
}, Q = N || Pe || P || I, $ = !!(A.vaultId || A.credentialSecretId), Ue = [
|
|
113
|
+
{
|
|
114
|
+
id: "test",
|
|
115
|
+
label: k("integrations.connectionDetail.nextSteps.test.label", "Test the connection"),
|
|
116
|
+
description: k("integrations.connectionDetail.nextSteps.test.description", "Run a live check to confirm credentials still work before relying on it."),
|
|
117
|
+
icon: /* @__PURE__ */ v(_, { size: 16 }),
|
|
118
|
+
onClick: () => {
|
|
119
|
+
Y();
|
|
120
|
+
},
|
|
121
|
+
done: A.status === "active" && !!V?.success
|
|
122
|
+
},
|
|
123
|
+
...z && A.provider.authType === "oauth2" && L ? [{
|
|
124
|
+
id: "refresh",
|
|
125
|
+
label: k("integrations.connectionDetail.nextSteps.refresh.label", "Refresh the access token"),
|
|
126
|
+
description: k("integrations.connectionDetail.nextSteps.refresh.description", "Renew OAuth credentials if requests start failing with an auth error."),
|
|
127
|
+
icon: /* @__PURE__ */ v(p, { size: 16 }),
|
|
128
|
+
onClick: () => {
|
|
129
|
+
X();
|
|
130
|
+
}
|
|
131
|
+
}] : [],
|
|
132
|
+
{
|
|
133
|
+
id: "logs",
|
|
134
|
+
label: k("integrations.connectionDetail.nextSteps.logs.label", "Review activity logs"),
|
|
135
|
+
description: k("integrations.connectionDetail.nextSteps.logs.description", "See recent requests and errors for this connection to debug issues."),
|
|
136
|
+
icon: /* @__PURE__ */ v(c, { size: 16 }),
|
|
137
|
+
onClick: () => O?.(r(D, "logs"))
|
|
138
|
+
}
|
|
139
|
+
];
|
|
113
140
|
return /* @__PURE__ */ y("div", {
|
|
114
141
|
className: "space-y-6 p-6 max-w-5xl mx-auto",
|
|
115
142
|
children: [
|
|
116
|
-
|
|
117
|
-
className: t("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",
|
|
118
|
-
children: [
|
|
143
|
+
H && /* @__PURE__ */ y("div", {
|
|
144
|
+
className: t("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"),
|
|
145
|
+
children: [H.type === "success" ? /* @__PURE__ */ v(u, { size: 20 }) : /* @__PURE__ */ v(g, { size: 20 }), /* @__PURE__ */ v("span", {
|
|
119
146
|
className: "font-medium",
|
|
120
|
-
children:
|
|
147
|
+
children: H.message
|
|
121
148
|
})]
|
|
122
149
|
}),
|
|
123
150
|
/* @__PURE__ */ v(xe, {
|
|
124
|
-
open:
|
|
151
|
+
open: Re,
|
|
125
152
|
onOpenChange: (e) => {
|
|
126
|
-
e || (
|
|
153
|
+
e || (W(!1), K(!1));
|
|
127
154
|
},
|
|
128
|
-
children: /* @__PURE__ */ y(
|
|
155
|
+
children: /* @__PURE__ */ y(we, {
|
|
129
156
|
className: "max-w-md",
|
|
130
157
|
children: [
|
|
131
|
-
/* @__PURE__ */ y(
|
|
158
|
+
/* @__PURE__ */ y(De, { children: [/* @__PURE__ */ v(Oe, { children: "Delete connection" }), /* @__PURE__ */ v(Te, { children: "This removes the connection record immediately. You can also remove the mapped vault secret if you no longer need it." })] }),
|
|
132
159
|
$ && /* @__PURE__ */ y("label", {
|
|
133
160
|
className: "flex items-start gap-3 rounded-lg border border-border-subtle/60 bg-bg-surface px-4 py-3 cursor-pointer",
|
|
134
161
|
children: [/* @__PURE__ */ v("input", {
|
|
135
162
|
type: "checkbox",
|
|
136
|
-
checked:
|
|
137
|
-
onChange: (e) =>
|
|
163
|
+
checked: G,
|
|
164
|
+
onChange: (e) => K(e.target.checked),
|
|
138
165
|
className: "mt-0.5",
|
|
139
166
|
"aria-label": "Also remove mapped vault secret"
|
|
140
167
|
}), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
@@ -145,51 +172,51 @@ function A() {
|
|
|
145
172
|
children: "Use this only if no other connections rely on the same secret."
|
|
146
173
|
})] })]
|
|
147
174
|
}),
|
|
148
|
-
/* @__PURE__ */ y(
|
|
175
|
+
/* @__PURE__ */ y(Ee, { children: [/* @__PURE__ */ v(Ce, {
|
|
149
176
|
onClick: () => {
|
|
150
|
-
|
|
177
|
+
W(!1), K(!1);
|
|
151
178
|
},
|
|
152
179
|
children: "Cancel"
|
|
153
180
|
}), /* @__PURE__ */ y(Se, {
|
|
154
|
-
disabled:
|
|
181
|
+
disabled: I,
|
|
155
182
|
onClick: (e) => {
|
|
156
183
|
e.preventDefault(), Z();
|
|
157
184
|
},
|
|
158
185
|
className: "inline-flex items-center gap-2 bg-status-error-bg text-action-primary-text disabled:opacity-50",
|
|
159
|
-
children: [
|
|
186
|
+
children: [I ? /* @__PURE__ */ v(f, {
|
|
160
187
|
size: 14,
|
|
161
188
|
className: "animate-spin"
|
|
162
|
-
}) : /* @__PURE__ */ v(
|
|
189
|
+
}) : /* @__PURE__ */ v(h, { size: 14 }), "Delete connection"]
|
|
163
190
|
})] })
|
|
164
191
|
]
|
|
165
192
|
})
|
|
166
193
|
}),
|
|
167
|
-
/* @__PURE__ */ v(
|
|
168
|
-
open:
|
|
169
|
-
title:
|
|
170
|
-
description:
|
|
171
|
-
confirmLabel:
|
|
172
|
-
cancelLabel:
|
|
173
|
-
loading:
|
|
194
|
+
/* @__PURE__ */ v(le, {
|
|
195
|
+
open: ze,
|
|
196
|
+
title: k("integrations.connectionDetail.confirm.revokeTitle", "Revoke connection"),
|
|
197
|
+
description: k("integrations.connectionDetail.confirm.revoke", "Are you sure you want to revoke this connection? This will disconnect the external service."),
|
|
198
|
+
confirmLabel: k("integrations.connectionDetail.actions.revoke", "Revoke"),
|
|
199
|
+
cancelLabel: k("integrations.connectionDetail.actions.cancel", "Cancel"),
|
|
200
|
+
loading: P,
|
|
174
201
|
destructive: !0,
|
|
175
|
-
icon: /* @__PURE__ */ v(
|
|
176
|
-
onConfirm:
|
|
177
|
-
onCancel: () =>
|
|
202
|
+
icon: /* @__PURE__ */ v(m, { size: 20 }),
|
|
203
|
+
onConfirm: Ve,
|
|
204
|
+
onCancel: () => q(!1)
|
|
178
205
|
}),
|
|
179
206
|
/* @__PURE__ */ v("div", {
|
|
180
207
|
className: "rounded-xl border border-border-seam bg-accent-wash p-6",
|
|
181
208
|
children: /* @__PURE__ */ y("div", {
|
|
182
209
|
className: "flex items-center gap-4",
|
|
183
210
|
children: [
|
|
184
|
-
/* @__PURE__ */ v(
|
|
211
|
+
/* @__PURE__ */ v(b, {
|
|
185
212
|
variant: "ghost",
|
|
186
213
|
size: "icon",
|
|
187
|
-
onClick: () =>
|
|
188
|
-
"aria-label":
|
|
189
|
-
children: /* @__PURE__ */ v(
|
|
214
|
+
onClick: () => O?.(r(D, "connections")),
|
|
215
|
+
"aria-label": k("integrations.connectionDetail.actions.backAriaLabel", "Back"),
|
|
216
|
+
children: /* @__PURE__ */ v(l, { size: 20 })
|
|
190
217
|
}),
|
|
191
|
-
/* @__PURE__ */ v(
|
|
192
|
-
provider:
|
|
218
|
+
/* @__PURE__ */ v(oe, {
|
|
219
|
+
provider: A.provider,
|
|
193
220
|
size: 56
|
|
194
221
|
}),
|
|
195
222
|
/* @__PURE__ */ y("div", {
|
|
@@ -198,92 +225,100 @@ function A() {
|
|
|
198
225
|
className: "flex items-center gap-3",
|
|
199
226
|
children: [/* @__PURE__ */ v("h1", {
|
|
200
227
|
className: "text-2xl sm:text-3xl font-bold text-text-primary",
|
|
201
|
-
children:
|
|
202
|
-
}), /* @__PURE__ */ v(
|
|
203
|
-
status:
|
|
228
|
+
children: A.name
|
|
229
|
+
}), /* @__PURE__ */ v(se, {
|
|
230
|
+
status: A.status,
|
|
204
231
|
size: "md"
|
|
205
232
|
})]
|
|
206
233
|
}), /* @__PURE__ */ y("p", {
|
|
207
234
|
className: "text-sm text-text-secondary mt-0.5",
|
|
208
235
|
children: [
|
|
209
|
-
|
|
236
|
+
A.provider.name,
|
|
210
237
|
" · ",
|
|
211
|
-
te(
|
|
238
|
+
te(A.provider.authType)
|
|
212
239
|
]
|
|
213
240
|
})]
|
|
214
241
|
})
|
|
215
242
|
]
|
|
216
243
|
})
|
|
217
244
|
}),
|
|
245
|
+
/* @__PURE__ */ v(T, {
|
|
246
|
+
icon: /* @__PURE__ */ v(c, { size: 16 }),
|
|
247
|
+
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: A.provider.name })
|
|
248
|
+
}),
|
|
249
|
+
(z || B) && /* @__PURE__ */ v(w, {
|
|
250
|
+
storageKey: "integrations-connection-detail",
|
|
251
|
+
steps: Ue
|
|
252
|
+
}),
|
|
218
253
|
/* @__PURE__ */ y("div", {
|
|
219
254
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
220
|
-
children: [/* @__PURE__ */ y(
|
|
221
|
-
className: "
|
|
255
|
+
children: [/* @__PURE__ */ y(S, {
|
|
256
|
+
className: "p-5 space-y-4",
|
|
222
257
|
children: [/* @__PURE__ */ y("h2", {
|
|
223
258
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
224
|
-
children: [/* @__PURE__ */ v(
|
|
259
|
+
children: [/* @__PURE__ */ v(c, {
|
|
225
260
|
size: 18,
|
|
226
261
|
className: "text-primary"
|
|
227
|
-
}),
|
|
262
|
+
}), k("integrations.connectionDetail.sections.info", "Connection Info")]
|
|
228
263
|
}), /* @__PURE__ */ y("div", {
|
|
229
264
|
className: "space-y-3",
|
|
230
265
|
children: [
|
|
231
|
-
|
|
266
|
+
A.description && /* @__PURE__ */ y("div", {
|
|
232
267
|
className: "py-2 border-b border-border-seam",
|
|
233
268
|
children: [/* @__PURE__ */ v("span", {
|
|
234
269
|
className: "text-xs text-text-secondary uppercase tracking-wide",
|
|
235
|
-
children:
|
|
270
|
+
children: k("integrations.connectionDetail.fields.description", "Description")
|
|
236
271
|
}), /* @__PURE__ */ v("p", {
|
|
237
272
|
className: "text-sm text-text-primary mt-0.5",
|
|
238
|
-
children:
|
|
273
|
+
children: A.description
|
|
239
274
|
})]
|
|
240
275
|
}),
|
|
241
276
|
/* @__PURE__ */ y("div", {
|
|
242
277
|
className: "flex items-center justify-between py-2 border-b border-border-seam",
|
|
243
278
|
children: [/* @__PURE__ */ v("span", {
|
|
244
279
|
className: "text-sm text-text-secondary",
|
|
245
|
-
children:
|
|
280
|
+
children: k("integrations.connectionDetail.fields.provider", "Provider")
|
|
246
281
|
}), /* @__PURE__ */ v("span", {
|
|
247
282
|
className: "text-sm font-medium text-text-primary",
|
|
248
|
-
children:
|
|
283
|
+
children: A.provider.name
|
|
249
284
|
})]
|
|
250
285
|
}),
|
|
251
|
-
|
|
286
|
+
A.externalAccountEmail && /* @__PURE__ */ y("div", {
|
|
252
287
|
className: "flex items-center justify-between py-2 border-b border-border-seam",
|
|
253
288
|
children: [/* @__PURE__ */ y("span", {
|
|
254
289
|
className: "text-sm text-text-secondary flex items-center gap-1",
|
|
255
290
|
children: [
|
|
256
|
-
/* @__PURE__ */ v(
|
|
291
|
+
/* @__PURE__ */ v(me, { size: 14 }),
|
|
257
292
|
" ",
|
|
258
|
-
|
|
293
|
+
k("integrations.connectionDetail.fields.account", "Account")
|
|
259
294
|
]
|
|
260
295
|
}), /* @__PURE__ */ v("span", {
|
|
261
296
|
className: "text-sm font-medium text-text-primary",
|
|
262
|
-
children:
|
|
297
|
+
children: A.externalAccountEmail
|
|
263
298
|
})]
|
|
264
299
|
}),
|
|
265
|
-
|
|
300
|
+
A.externalAccountName && /* @__PURE__ */ y("div", {
|
|
266
301
|
className: "flex items-center justify-between py-2 border-b border-border-seam",
|
|
267
302
|
children: [/* @__PURE__ */ y("span", {
|
|
268
303
|
className: "text-sm text-text-secondary flex items-center gap-1",
|
|
269
304
|
children: [
|
|
270
|
-
/* @__PURE__ */ v(
|
|
305
|
+
/* @__PURE__ */ v(ge, { size: 14 }),
|
|
271
306
|
" ",
|
|
272
|
-
|
|
307
|
+
k("integrations.connectionDetail.fields.name", "Name")
|
|
273
308
|
]
|
|
274
309
|
}), /* @__PURE__ */ v("span", {
|
|
275
310
|
className: "text-sm font-medium text-text-primary",
|
|
276
|
-
children:
|
|
311
|
+
children: A.externalAccountName
|
|
277
312
|
})]
|
|
278
313
|
}),
|
|
279
|
-
|
|
314
|
+
A.errorMessage && /* @__PURE__ */ y("div", {
|
|
280
315
|
className: "py-2 border-b border-border-seam",
|
|
281
316
|
children: [/* @__PURE__ */ v("span", {
|
|
282
317
|
className: "text-xs text-status-error-text uppercase tracking-wide",
|
|
283
|
-
children:
|
|
318
|
+
children: k("integrations.connectionDetail.fields.error", "Error")
|
|
284
319
|
}), /* @__PURE__ */ v("p", {
|
|
285
320
|
className: "text-sm text-status-error-text mt-0.5 bg-status-error-bg-subtle rounded-lg p-2",
|
|
286
|
-
children:
|
|
321
|
+
children: A.errorMessage
|
|
287
322
|
})]
|
|
288
323
|
}),
|
|
289
324
|
/* @__PURE__ */ y("div", {
|
|
@@ -291,33 +326,33 @@ function A() {
|
|
|
291
326
|
children: [/* @__PURE__ */ y("span", {
|
|
292
327
|
className: "text-sm text-text-secondary flex items-center gap-1",
|
|
293
328
|
children: [
|
|
294
|
-
/* @__PURE__ */ v(
|
|
329
|
+
/* @__PURE__ */ v(pe, { size: 14 }),
|
|
295
330
|
" ",
|
|
296
|
-
|
|
331
|
+
k("integrations.connectionDetail.fields.lastUsed", "Last Used")
|
|
297
332
|
]
|
|
298
333
|
}), /* @__PURE__ */ v("span", {
|
|
299
334
|
className: "text-sm text-text-primary",
|
|
300
|
-
children: ee(
|
|
335
|
+
children: ee(A.lastUsedAt)
|
|
301
336
|
})]
|
|
302
337
|
}),
|
|
303
338
|
/* @__PURE__ */ y("div", {
|
|
304
339
|
className: "flex items-center justify-between py-2 border-b border-border-seam",
|
|
305
340
|
children: [/* @__PURE__ */ v("span", {
|
|
306
341
|
className: "text-sm text-text-secondary",
|
|
307
|
-
children:
|
|
342
|
+
children: k("integrations.connectionDetail.fields.healthCheck", "Health Check")
|
|
308
343
|
}), /* @__PURE__ */ v("span", {
|
|
309
344
|
className: "text-sm text-text-primary",
|
|
310
|
-
children: i(
|
|
345
|
+
children: i(A.lastHealthCheck)
|
|
311
346
|
})]
|
|
312
347
|
}),
|
|
313
348
|
/* @__PURE__ */ y("div", {
|
|
314
349
|
className: "flex items-center justify-between py-2",
|
|
315
350
|
children: [/* @__PURE__ */ v("span", {
|
|
316
351
|
className: "text-sm text-text-secondary",
|
|
317
|
-
children:
|
|
352
|
+
children: k("integrations.connectionDetail.fields.created", "Created")
|
|
318
353
|
}), /* @__PURE__ */ v("span", {
|
|
319
354
|
className: "text-sm text-text-primary",
|
|
320
|
-
children: i(
|
|
355
|
+
children: i(A.createdAt)
|
|
321
356
|
})]
|
|
322
357
|
})
|
|
323
358
|
]
|
|
@@ -325,133 +360,133 @@ function A() {
|
|
|
325
360
|
}), /* @__PURE__ */ y("div", {
|
|
326
361
|
className: "space-y-4",
|
|
327
362
|
children: [
|
|
328
|
-
/* @__PURE__ */ y(
|
|
363
|
+
/* @__PURE__ */ y(C, {
|
|
329
364
|
className: "border-border-seam p-5",
|
|
330
365
|
children: [/* @__PURE__ */ y("h2", {
|
|
331
366
|
className: "font-semibold text-text-primary flex items-center gap-2 mb-3",
|
|
332
|
-
children: [/* @__PURE__ */ v(
|
|
367
|
+
children: [/* @__PURE__ */ v(m, {
|
|
333
368
|
size: 18,
|
|
334
369
|
className: "text-primary"
|
|
335
|
-
}),
|
|
336
|
-
}),
|
|
370
|
+
}), k("integrations.connectionDetail.sections.scopes", "Granted Scopes")]
|
|
371
|
+
}), A.grantedScopes.length > 0 ? /* @__PURE__ */ v(ke, {
|
|
337
372
|
collapsedHeight: 88,
|
|
338
373
|
label: "Show all scopes",
|
|
339
374
|
children: /* @__PURE__ */ v("div", {
|
|
340
375
|
className: "flex flex-wrap gap-2",
|
|
341
|
-
children:
|
|
376
|
+
children: A.grantedScopes.map((e) => /* @__PURE__ */ v("span", {
|
|
342
377
|
className: "text-xs px-2.5 py-1 rounded-full bg-bg-sunken text-text-secondary font-mono",
|
|
343
378
|
children: e
|
|
344
379
|
}, e))
|
|
345
380
|
})
|
|
346
381
|
}) : /* @__PURE__ */ v("p", {
|
|
347
382
|
className: "text-sm text-text-secondary",
|
|
348
|
-
children:
|
|
383
|
+
children: k("integrations.connectionDetail.scopes.empty", "No scopes granted.")
|
|
349
384
|
})]
|
|
350
385
|
}),
|
|
351
|
-
|
|
352
|
-
className: t("rounded-xl border p-5",
|
|
386
|
+
V && /* @__PURE__ */ y("div", {
|
|
387
|
+
className: t("rounded-xl border p-5", V.success ? "border-border-default bg-status-success-bg-subtle" : "border-border-default bg-status-error-bg-subtle"),
|
|
353
388
|
children: [
|
|
354
389
|
/* @__PURE__ */ y("h2", {
|
|
355
|
-
className: t("font-semibold flex items-center gap-2 mb-2",
|
|
356
|
-
children: [
|
|
390
|
+
className: t("font-semibold flex items-center gap-2 mb-2", V.success ? "text-status-success-text" : "text-status-error-text"),
|
|
391
|
+
children: [V.success ? /* @__PURE__ */ v(u, { size: 18 }) : /* @__PURE__ */ v(g, { size: 18 }), V.success ? k("integrations.connectionDetail.testResult.passed", "Connection Test Passed") : k("integrations.connectionDetail.testResult.failed", "Connection Test Failed")]
|
|
357
392
|
}),
|
|
358
393
|
/* @__PURE__ */ v("p", {
|
|
359
|
-
className: t("text-sm",
|
|
360
|
-
children:
|
|
394
|
+
className: t("text-sm", V.success ? "text-status-success-text" : "text-status-error-text"),
|
|
395
|
+
children: V.message
|
|
361
396
|
}),
|
|
362
397
|
/* @__PURE__ */ v("p", {
|
|
363
398
|
className: "text-xs text-text-secondary mt-1",
|
|
364
|
-
children:
|
|
399
|
+
children: k("integrations.connectionDetail.testResult.latency", "Latency: {latency}ms", { latency: V.latencyMs })
|
|
365
400
|
})
|
|
366
401
|
]
|
|
367
402
|
}),
|
|
368
|
-
$ && /* @__PURE__ */ y(
|
|
403
|
+
$ && /* @__PURE__ */ y(C, {
|
|
369
404
|
className: "border-border-seam p-5",
|
|
370
405
|
children: [/* @__PURE__ */ y("h2", {
|
|
371
406
|
className: "font-semibold text-text-primary flex items-center gap-2 mb-3",
|
|
372
|
-
children: [/* @__PURE__ */ v(
|
|
407
|
+
children: [/* @__PURE__ */ v(d, {
|
|
373
408
|
size: 18,
|
|
374
409
|
className: "text-primary"
|
|
375
410
|
}), "Credential Storage"]
|
|
376
411
|
}), /* @__PURE__ */ y("div", {
|
|
377
412
|
className: "space-y-2 text-sm",
|
|
378
413
|
children: [
|
|
379
|
-
|
|
414
|
+
A.vaultId && /* @__PURE__ */ y("div", {
|
|
380
415
|
className: "flex items-center justify-between gap-3",
|
|
381
416
|
children: [/* @__PURE__ */ v("span", {
|
|
382
417
|
className: "text-text-secondary",
|
|
383
418
|
children: "Vault"
|
|
384
419
|
}), /* @__PURE__ */ v("span", {
|
|
385
420
|
className: "font-medium text-text-primary break-all",
|
|
386
|
-
children:
|
|
421
|
+
children: A.vaultId
|
|
387
422
|
})]
|
|
388
423
|
}),
|
|
389
|
-
|
|
424
|
+
A.credentialSecretName && /* @__PURE__ */ y("div", {
|
|
390
425
|
className: "flex items-center justify-between gap-3",
|
|
391
426
|
children: [/* @__PURE__ */ v("span", {
|
|
392
427
|
className: "text-text-secondary",
|
|
393
428
|
children: "Secret"
|
|
394
429
|
}), /* @__PURE__ */ v("span", {
|
|
395
430
|
className: "font-medium text-text-primary break-all",
|
|
396
|
-
children:
|
|
431
|
+
children: A.credentialSecretName
|
|
397
432
|
})]
|
|
398
433
|
}),
|
|
399
|
-
|
|
434
|
+
A.credentialSecretId && /* @__PURE__ */ y("div", {
|
|
400
435
|
className: "flex items-center justify-between gap-3",
|
|
401
436
|
children: [/* @__PURE__ */ v("span", {
|
|
402
437
|
className: "text-text-secondary",
|
|
403
438
|
children: "Secret ID"
|
|
404
439
|
}), /* @__PURE__ */ v("span", {
|
|
405
440
|
className: "font-mono text-xs text-text-primary break-all",
|
|
406
|
-
children:
|
|
441
|
+
children: A.credentialSecretId
|
|
407
442
|
})]
|
|
408
443
|
})
|
|
409
444
|
]
|
|
410
445
|
})]
|
|
411
446
|
}),
|
|
412
|
-
(
|
|
447
|
+
(z || B) && /* @__PURE__ */ y(C, {
|
|
413
448
|
className: "border-border-seam p-5",
|
|
414
449
|
children: [/* @__PURE__ */ y("h2", {
|
|
415
450
|
className: "font-semibold text-text-primary flex items-center gap-2 mb-3",
|
|
416
|
-
children: [/* @__PURE__ */ v(
|
|
451
|
+
children: [/* @__PURE__ */ v(d, {
|
|
417
452
|
size: 18,
|
|
418
453
|
className: "text-primary"
|
|
419
|
-
}),
|
|
420
|
-
}), /* @__PURE__ */ v(
|
|
454
|
+
}), k("integrations.connectionDetail.sections.actions", "Actions")]
|
|
455
|
+
}), /* @__PURE__ */ v(x, {
|
|
421
456
|
align: "start",
|
|
422
457
|
primary: {
|
|
423
|
-
label:
|
|
458
|
+
label: k("integrations.connectionDetail.actions.test", "Test Connection"),
|
|
424
459
|
onSelect: () => {
|
|
425
|
-
|
|
460
|
+
Y();
|
|
426
461
|
},
|
|
427
462
|
disabled: Q,
|
|
428
|
-
icon:
|
|
463
|
+
icon: N ? /* @__PURE__ */ v(f, {
|
|
429
464
|
size: 14,
|
|
430
465
|
className: "animate-spin"
|
|
431
|
-
}) : /* @__PURE__ */ v(
|
|
466
|
+
}) : /* @__PURE__ */ v(_, { size: 14 })
|
|
432
467
|
},
|
|
433
|
-
actions: [...
|
|
434
|
-
label:
|
|
468
|
+
actions: [...z && A.provider.authType === "oauth2" && L ? [{
|
|
469
|
+
label: k("integrations.connectionDetail.actions.refreshToken", "Refresh Token"),
|
|
435
470
|
onSelect: () => {
|
|
436
|
-
|
|
471
|
+
X();
|
|
437
472
|
},
|
|
438
473
|
disabled: Q,
|
|
439
|
-
icon: /* @__PURE__ */ v(
|
|
440
|
-
}] : [], ...
|
|
441
|
-
label:
|
|
474
|
+
icon: /* @__PURE__ */ v(p, { size: 14 })
|
|
475
|
+
}] : [], ...B ? [{
|
|
476
|
+
label: k("integrations.connectionDetail.actions.revoke", "Revoke"),
|
|
442
477
|
onSelect: () => {
|
|
443
|
-
|
|
478
|
+
Be();
|
|
444
479
|
},
|
|
445
480
|
disabled: Q,
|
|
446
|
-
icon: /* @__PURE__ */ v(
|
|
481
|
+
icon: /* @__PURE__ */ v(m, { size: 14 })
|
|
447
482
|
}, {
|
|
448
|
-
label:
|
|
483
|
+
label: k("integrations.connectionDetail.actions.delete", "Delete"),
|
|
449
484
|
onSelect: () => {
|
|
450
|
-
|
|
485
|
+
He();
|
|
451
486
|
},
|
|
452
487
|
intent: "destructive",
|
|
453
488
|
disabled: Q,
|
|
454
|
-
icon: /* @__PURE__ */ v(
|
|
489
|
+
icon: /* @__PURE__ */ v(h, { size: 14 })
|
|
455
490
|
}] : []]
|
|
456
491
|
})]
|
|
457
492
|
})
|
|
@@ -462,6 +497,6 @@ function A() {
|
|
|
462
497
|
});
|
|
463
498
|
}
|
|
464
499
|
//#endregion
|
|
465
|
-
export {
|
|
500
|
+
export { E as ConnectionDetail };
|
|
466
501
|
|
|
467
502
|
//# sourceMappingURL=ConnectionDetail.js.map
|