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