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