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