@burdenoff/microfe-integrations 2026.1107.2 → 2026.1109.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/dev/main.d.ts +0 -2
- package/dist/generated/global-operations.d.ts +4 -2
- package/dist/generated/global-types.d.ts +2 -22
- package/dist/generated/wspace-operations.d.ts +995 -705
- package/dist/generated/wspace-operations.js +180 -167
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +4 -24
- package/dist/generated/wspace-types.js +1 -2
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/integrations/ConnectSourceDialog.d.ts +0 -2
- package/dist/integrations/ConnectSourceDialog.js +13 -14
- package/dist/integrations/ConnectSourceDialog.js.map +1 -1
- package/dist/integrations/ConnectionsPanel.d.ts +0 -2
- package/dist/integrations/ConnectionsPanel.js +5 -6
- package/dist/integrations/ConnectionsPanel.js.map +1 -1
- package/dist/integrations/IntegrationsAdminRoot.d.ts +0 -2
- package/dist/integrations/IntegrationsAdminRoot.js +14 -11
- package/dist/integrations/IntegrationsAdminRoot.js.map +1 -1
- package/dist/integrations/IntegrationsAdminRoutes.d.ts +1 -2
- package/dist/integrations/IntegrationsAdminRoutes.js +1 -2
- package/dist/integrations/IntegrationsAdminRoutes.js.map +1 -1
- package/dist/integrations/IntegrationsRoot.d.ts +0 -2
- package/dist/integrations/IntegrationsRoot.js +9 -6
- package/dist/integrations/IntegrationsRoot.js.map +1 -1
- package/dist/integrations/IntegrationsUserRoutes.d.ts +1 -2
- package/dist/integrations/IntegrationsUserRoutes.js +7 -8
- package/dist/integrations/IntegrationsUserRoutes.js.map +1 -1
- package/dist/integrations/components/AddConnectionDialog.d.ts +1 -3
- package/dist/integrations/components/AddConnectionDialog.js +12 -15
- package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
- package/dist/integrations/components/AuthMethodsEditor.d.ts +0 -2
- package/dist/integrations/components/AuthMethodsEditor.js +1 -2
- package/dist/integrations/components/AuthMethodsEditor.js.map +1 -1
- package/dist/integrations/components/ConfirmDialog.d.ts +1 -3
- package/dist/integrations/components/ConfirmDialog.js +1 -2
- package/dist/integrations/components/ConfirmDialog.js.map +1 -1
- package/dist/integrations/components/ConnectionCard.d.ts +0 -2
- package/dist/integrations/components/ConnectionCard.js +9 -10
- package/dist/integrations/components/ConnectionCard.js.map +1 -1
- package/dist/integrations/components/ConnectionModalFrame.d.ts +0 -2
- package/dist/integrations/components/ConnectionModalFrame.js +2 -3
- package/dist/integrations/components/ConnectionModalFrame.js.map +1 -1
- package/dist/integrations/components/ConnectionSharing.d.ts +0 -2
- package/dist/integrations/components/ConnectionSharing.js +7 -8
- package/dist/integrations/components/ConnectionSharing.js.map +1 -1
- package/dist/integrations/components/ConnectionStatusBadge.d.ts +0 -2
- package/dist/integrations/components/ConnectionStatusBadge.js +1 -2
- package/dist/integrations/components/ConnectionStatusBadge.js.map +1 -1
- package/dist/integrations/components/ConnectorSubmissionCard.d.ts +2 -4
- package/dist/integrations/components/ConnectorSubmissionCard.js +8 -9
- package/dist/integrations/components/ConnectorSubmissionCard.js.map +1 -1
- package/dist/integrations/components/ConnectorSubmissionPager.d.ts +1 -2
- package/dist/integrations/components/ConnectorSubmissionPager.js +1 -2
- package/dist/integrations/components/ConnectorSubmissionPager.js.map +1 -1
- package/dist/integrations/components/MailMessageBody.d.ts +1 -3
- package/dist/integrations/components/MailMessageBody.js +4 -5
- package/dist/integrations/components/MailMessageBody.js.map +1 -1
- package/dist/integrations/components/ProviderCard.d.ts +0 -2
- package/dist/integrations/components/ProviderCard.js +8 -9
- package/dist/integrations/components/ProviderCard.js.map +1 -1
- package/dist/integrations/constants/featureFlags.d.ts +0 -1
- package/dist/integrations/constants/featureFlags.js +1 -2
- package/dist/integrations/constants/featureFlags.js.map +1 -1
- package/dist/integrations/constants/permissions.d.ts +0 -1
- package/dist/integrations/constants/permissions.js +1 -2
- package/dist/integrations/constants/permissions.js.map +1 -1
- package/dist/integrations/events/integrations-events.d.ts +0 -1
- package/dist/integrations/events/useIntegrationsEventBus.d.ts +0 -2
- package/dist/integrations/events/useIntegrationsEventBus.js +1 -2
- package/dist/integrations/events/useIntegrationsEventBus.js.map +1 -1
- package/dist/integrations/hooks/useConnections.d.ts +3 -14
- package/dist/integrations/hooks/useConnections.js +74 -75
- package/dist/integrations/hooks/useConnections.js.map +1 -1
- package/dist/integrations/hooks/useConnectorSubmissions.d.ts +2 -10
- package/dist/integrations/hooks/useConnectorSubmissions.js +23 -24
- package/dist/integrations/hooks/useConnectorSubmissions.js.map +1 -1
- package/dist/integrations/hooks/useFormatDate.d.ts +0 -1
- package/dist/integrations/hooks/useFormatDate.js +1 -2
- package/dist/integrations/hooks/useFormatDate.js.map +1 -1
- package/dist/integrations/hooks/useFormatLastUsed.d.ts +0 -1
- package/dist/integrations/hooks/useFormatLastUsed.js +1 -2
- package/dist/integrations/hooks/useFormatLastUsed.js.map +1 -1
- package/dist/integrations/hooks/useLabel.d.ts +0 -2
- package/dist/integrations/hooks/useLabel.js +1 -2
- package/dist/integrations/hooks/useLabel.js.map +1 -1
- package/dist/integrations/hooks/useLogs.d.ts +1 -6
- package/dist/integrations/hooks/useLogs.js +6 -7
- package/dist/integrations/hooks/useLogs.js.map +1 -1
- package/dist/integrations/hooks/useMailbox.d.ts +19 -43
- package/dist/integrations/hooks/useMailbox.js +46 -47
- package/dist/integrations/hooks/useMailbox.js.map +1 -1
- package/dist/integrations/hooks/useProviders.d.ts +3 -14
- package/dist/integrations/hooks/useProviders.js +42 -43
- package/dist/integrations/hooks/useProviders.js.map +1 -1
- package/dist/integrations/hooks/useTr.d.ts +0 -1
- package/dist/integrations/hooks/useTr.js +1 -2
- package/dist/integrations/hooks/useTr.js.map +1 -1
- package/dist/integrations/index.d.ts +0 -1
- package/dist/integrations/index.js +9 -8
- package/dist/integrations/pages/AddConnectionWizard.d.ts +1 -2
- package/dist/integrations/pages/AddConnectionWizard.js +291 -306
- package/dist/integrations/pages/AddConnectionWizard.js.map +1 -1
- package/dist/integrations/pages/ConnectionDetail.d.ts +1 -2
- package/dist/integrations/pages/ConnectionDetail.js +241 -246
- package/dist/integrations/pages/ConnectionDetail.js.map +1 -1
- package/dist/integrations/pages/ConnectionLogs.d.ts +1 -2
- package/dist/integrations/pages/ConnectionLogs.js +154 -155
- package/dist/integrations/pages/ConnectionLogs.js.map +1 -1
- package/dist/integrations/pages/ConnectionsList.d.ts +1 -2
- package/dist/integrations/pages/ConnectionsList.js +40 -41
- package/dist/integrations/pages/ConnectionsList.js.map +1 -1
- package/dist/integrations/pages/ConnectorReviewQueuePage.d.ts +1 -2
- package/dist/integrations/pages/ConnectorReviewQueuePage.js +9 -10
- package/dist/integrations/pages/ConnectorReviewQueuePage.js.map +1 -1
- package/dist/integrations/pages/ConnectorSubmissionsPage.d.ts +1 -2
- package/dist/integrations/pages/ConnectorSubmissionsPage.js +138 -139
- package/dist/integrations/pages/ConnectorSubmissionsPage.js.map +1 -1
- package/dist/integrations/pages/IntegrationsOverview.d.ts +1 -2
- package/dist/integrations/pages/IntegrationsOverview.js +35 -36
- package/dist/integrations/pages/IntegrationsOverview.js.map +1 -1
- package/dist/integrations/pages/IntegrationsSettings.d.ts +1 -2
- package/dist/integrations/pages/IntegrationsSettings.js +7 -8
- package/dist/integrations/pages/IntegrationsSettings.js.map +1 -1
- package/dist/integrations/pages/IntegrationsUserLandingPage.d.ts +1 -2
- package/dist/integrations/pages/IntegrationsUserLandingPage.js +1 -2
- package/dist/integrations/pages/IntegrationsUserLandingPage.js.map +1 -1
- package/dist/integrations/pages/MailboxInbox.d.ts +1 -2
- package/dist/integrations/pages/MailboxInbox.js +135 -140
- package/dist/integrations/pages/MailboxInbox.js.map +1 -1
- package/dist/integrations/pages/ProviderCatalog.d.ts +1 -2
- package/dist/integrations/pages/ProviderCatalog.js +107 -108
- package/dist/integrations/pages/ProviderCatalog.js.map +1 -1
- package/dist/integrations/pages/ProviderDetail.d.ts +1 -2
- package/dist/integrations/pages/ProviderDetail.js +21 -22
- package/dist/integrations/pages/ProviderDetail.js.map +1 -1
- package/dist/integrations/pages/ProviderEditorPage.d.ts +1 -2
- package/dist/integrations/pages/ProviderEditorPage.js +261 -264
- package/dist/integrations/pages/ProviderEditorPage.js.map +1 -1
- package/dist/integrations/providers/IntegrationsProvider.d.ts +0 -2
- package/dist/integrations/providers/IntegrationsProvider.js +109 -96
- package/dist/integrations/providers/IntegrationsProvider.js.map +1 -1
- package/dist/integrations/store/integrationsStore.d.ts +0 -2
- package/dist/integrations/store/integrationsStore.js +1 -2
- package/dist/integrations/store/integrationsStore.js.map +1 -1
- package/dist/integrations/store/mailboxStore.d.ts +0 -2
- package/dist/integrations/store/mailboxStore.js +1 -2
- package/dist/integrations/store/mailboxStore.js.map +1 -1
- package/dist/integrations/translations/en.d.ts +0 -1
- package/dist/integrations/types/index.d.ts +0 -1
- package/dist/integrations/utils/appearance.d.ts +0 -1
- package/dist/integrations/utils/appearance.js +1 -2
- package/dist/integrations/utils/appearance.js.map +1 -1
- package/dist/integrations/utils/cn.d.ts +0 -2
- package/dist/integrations/utils/cn.js +2 -3
- package/dist/integrations/utils/cn.js.map +1 -1
- package/dist/integrations/utils/constants.d.ts +0 -1
- package/dist/integrations/utils/constants.js +1 -2
- package/dist/integrations/utils/constants.js.map +1 -1
- package/dist/integrations/utils/integrationsHelpers.d.ts +0 -2
- package/dist/integrations/utils/integrationsHelpers.js +1 -2
- package/dist/integrations/utils/integrationsHelpers.js.map +1 -1
- package/dist/integrations/utils/mailHtml.d.ts +0 -2
- package/dist/integrations/utils/mailHtml.js +3 -4
- package/dist/integrations/utils/mailHtml.js.map +1 -1
- package/dist/integrations/utils/mappers.d.ts +0 -2
- package/dist/integrations/utils/mappers.js +2 -3
- package/dist/integrations/utils/mappers.js.map +1 -1
- package/dist/integrations/utils/navigation.d.ts +0 -1
- package/dist/integrations/utils/navigation.js +2 -8
- package/dist/integrations/utils/navigation.js.map +1 -1
- package/dist/integrations/utils/paths.d.ts +0 -1
- package/dist/integrations/utils/paths.js +1 -2
- package/dist/integrations/utils/paths.js.map +1 -1
- package/dist/node_modules/clsx/dist/clsx.js +8 -7
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
- package/dist/node_modules/dompurify/dist/purify.es.js +20 -36
- package/dist/node_modules/dompurify/dist/purify.es.js.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +229 -167
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
- package/dist/utils/nativeBridge.d.ts +0 -1
- package/dist/utils/nativeBridge.js +1 -2
- package/package.json +63 -49
- package/dist/dev/main.d.ts.map +0 -1
- package/dist/generated/global-operations.d.ts.map +0 -1
- package/dist/generated/global-types.d.ts.map +0 -1
- package/dist/generated/wspace-operations.d.ts.map +0 -1
- package/dist/generated/wspace-types.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/integrations/ConnectSourceDialog.d.ts.map +0 -1
- package/dist/integrations/ConnectionsPanel.d.ts.map +0 -1
- package/dist/integrations/IntegrationsAdminRoot.d.ts.map +0 -1
- package/dist/integrations/IntegrationsAdminRoutes.d.ts.map +0 -1
- package/dist/integrations/IntegrationsRoot.d.ts.map +0 -1
- package/dist/integrations/IntegrationsUserRoutes.d.ts.map +0 -1
- package/dist/integrations/components/AddConnectionDialog.d.ts.map +0 -1
- package/dist/integrations/components/AuthMethodsEditor.d.ts.map +0 -1
- package/dist/integrations/components/ConfirmDialog.d.ts.map +0 -1
- package/dist/integrations/components/ConnectionCard.d.ts.map +0 -1
- package/dist/integrations/components/ConnectionModalFrame.d.ts.map +0 -1
- package/dist/integrations/components/ConnectionSharing.d.ts.map +0 -1
- package/dist/integrations/components/ConnectionStatusBadge.d.ts.map +0 -1
- package/dist/integrations/components/ConnectorSubmissionCard.d.ts.map +0 -1
- package/dist/integrations/components/ConnectorSubmissionPager.d.ts.map +0 -1
- package/dist/integrations/components/MailMessageBody.d.ts.map +0 -1
- package/dist/integrations/components/ProviderCard.d.ts.map +0 -1
- package/dist/integrations/constants/featureFlags.d.ts.map +0 -1
- package/dist/integrations/constants/permissions.d.ts.map +0 -1
- package/dist/integrations/events/integrations-events.d.ts.map +0 -1
- package/dist/integrations/events/useIntegrationsEventBus.d.ts.map +0 -1
- package/dist/integrations/hooks/useConnections.d.ts.map +0 -1
- package/dist/integrations/hooks/useConnectorSubmissions.d.ts.map +0 -1
- package/dist/integrations/hooks/useFormatDate.d.ts.map +0 -1
- package/dist/integrations/hooks/useFormatLastUsed.d.ts.map +0 -1
- package/dist/integrations/hooks/useLabel.d.ts.map +0 -1
- package/dist/integrations/hooks/useLogs.d.ts.map +0 -1
- package/dist/integrations/hooks/useMailbox.d.ts.map +0 -1
- package/dist/integrations/hooks/useProviders.d.ts.map +0 -1
- package/dist/integrations/hooks/useTr.d.ts.map +0 -1
- package/dist/integrations/index.d.ts.map +0 -1
- package/dist/integrations/pages/AddConnectionWizard.d.ts.map +0 -1
- package/dist/integrations/pages/ConnectionDetail.d.ts.map +0 -1
- package/dist/integrations/pages/ConnectionLogs.d.ts.map +0 -1
- package/dist/integrations/pages/ConnectionsList.d.ts.map +0 -1
- package/dist/integrations/pages/ConnectorReviewQueuePage.d.ts.map +0 -1
- package/dist/integrations/pages/ConnectorSubmissionsPage.d.ts.map +0 -1
- package/dist/integrations/pages/IntegrationsOverview.d.ts.map +0 -1
- package/dist/integrations/pages/IntegrationsSettings.d.ts.map +0 -1
- package/dist/integrations/pages/IntegrationsUserLandingPage.d.ts.map +0 -1
- package/dist/integrations/pages/MailboxInbox.d.ts.map +0 -1
- package/dist/integrations/pages/ProviderCatalog.d.ts.map +0 -1
- package/dist/integrations/pages/ProviderDetail.d.ts.map +0 -1
- package/dist/integrations/pages/ProviderEditorPage.d.ts.map +0 -1
- package/dist/integrations/providers/IntegrationsProvider.d.ts.map +0 -1
- package/dist/integrations/store/integrationsStore.d.ts.map +0 -1
- package/dist/integrations/store/mailboxStore.d.ts.map +0 -1
- package/dist/integrations/translations/en.d.ts.map +0 -1
- package/dist/integrations/types/index.d.ts.map +0 -1
- package/dist/integrations/utils/appearance.d.ts.map +0 -1
- package/dist/integrations/utils/cn.d.ts.map +0 -1
- package/dist/integrations/utils/constants.d.ts.map +0 -1
- package/dist/integrations/utils/integrationsHelpers.d.ts.map +0 -1
- package/dist/integrations/utils/mailHtml.d.ts.map +0 -1
- package/dist/integrations/utils/mappers.d.ts.map +0 -1
- package/dist/integrations/utils/navigation.d.ts.map +0 -1
- package/dist/integrations/utils/paths.d.ts.map +0 -1
- package/dist/utils/nativeBridge.d.ts.map +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { useTr as e } from "../hooks/useTr.js";
|
|
2
|
+
import { INTEGRATION_PERMISSIONS as t } from "../constants/permissions.js";
|
|
3
|
+
import { useIntegrations as n } from "../providers/IntegrationsProvider.js";
|
|
4
4
|
import { joinPath as r } from "../utils/navigation.js";
|
|
5
5
|
import { useInstallPlugin as i, useProvider as a, useUpdatePlugin as o } from "../hooks/useProviders.js";
|
|
6
6
|
import { AuthMethodsEditor as s } from "../components/AuthMethodsEditor.js";
|
|
7
|
-
import {
|
|
8
|
-
import { ArrowLeft as
|
|
9
|
-
import { useParams as
|
|
10
|
-
import { usePermissions as
|
|
11
|
-
import { jsx as
|
|
12
|
-
import { Button as
|
|
13
|
-
|
|
14
|
-
var
|
|
7
|
+
import { useId as c, useState as l } from "react";
|
|
8
|
+
import { ArrowLeft as u, Loader2 as d, Save as f, Shield as p } from "lucide-react";
|
|
9
|
+
import { useParams as m } from "react-router";
|
|
10
|
+
import { usePermissions as h } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
11
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
12
|
+
import { Button as v, EmphasisPanel as y, GlassCard as b, OptionalFields as x, PagePurpose as S } from "@burdenoff/fe-libs/ui";
|
|
13
|
+
// src/integrations/pages/ProviderEditorPage.tsx
|
|
14
|
+
var C = [
|
|
15
15
|
"COMMUNICATION",
|
|
16
16
|
"PRODUCTIVITY",
|
|
17
17
|
"CLOUD_STORAGE",
|
|
@@ -23,7 +23,7 @@ var w = [
|
|
|
23
23
|
"PAYMENT",
|
|
24
24
|
"ANALYTICS",
|
|
25
25
|
"CUSTOM"
|
|
26
|
-
],
|
|
26
|
+
], w = [
|
|
27
27
|
"OAUTH2",
|
|
28
28
|
"API_KEY",
|
|
29
29
|
"BASIC_AUTH",
|
|
@@ -31,7 +31,7 @@ var w = [
|
|
|
31
31
|
"SERVICE_ACCOUNT",
|
|
32
32
|
"CUSTOM"
|
|
33
33
|
];
|
|
34
|
-
function
|
|
34
|
+
function T(e, t) {
|
|
35
35
|
let n = e.trim();
|
|
36
36
|
if (n) try {
|
|
37
37
|
return JSON.parse(n);
|
|
@@ -39,7 +39,7 @@ function E(e, t) {
|
|
|
39
39
|
throw Error(`${t} must be valid JSON`);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function E(e) {
|
|
43
43
|
return {
|
|
44
44
|
communication: "COMMUNICATION",
|
|
45
45
|
productivity: "PRODUCTIVITY",
|
|
@@ -54,7 +54,7 @@ function D(e) {
|
|
|
54
54
|
other: "CUSTOM"
|
|
55
55
|
}[e || ""] || "CUSTOM";
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function D(e) {
|
|
58
58
|
return {
|
|
59
59
|
oauth2: "OAUTH2",
|
|
60
60
|
api_key: "API_KEY",
|
|
@@ -63,8 +63,8 @@ function O(e) {
|
|
|
63
63
|
service_account: "SERVICE_ACCOUNT"
|
|
64
64
|
}[e || ""] || "CUSTOM";
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
let { providerId:
|
|
66
|
+
function O() {
|
|
67
|
+
let { providerId: O } = m(), k = !!O, { basePath: A = "/", navigate: j } = n(), M = e(), { hasPermission: N, isLoading: P } = h(), F = N(t.PROVIDER_CREATE), I = N(t.PROVIDER_UPDATE), { provider: L, loading: R } = a(O ?? ""), { installPlugin: z, loading: B } = i(), { updatePlugin: V, loading: H } = o(), [U, W] = l(""), [G, K] = l({
|
|
68
68
|
key: "",
|
|
69
69
|
name: "",
|
|
70
70
|
description: "",
|
|
@@ -87,398 +87,395 @@ function k() {
|
|
|
87
87
|
rateLimitConfig: "",
|
|
88
88
|
configSchema: "",
|
|
89
89
|
isEnabled: !0
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
let J = A ? L : I, Y = l(), X = (e) => `${Y}-${e}`, Z = (e, t) => {
|
|
118
|
-
q((n) => ({
|
|
90
|
+
}), [q, J] = l(null);
|
|
91
|
+
L && k && L !== q && (J(L), K({
|
|
92
|
+
key: L.key,
|
|
93
|
+
name: L.name,
|
|
94
|
+
description: L.description || "",
|
|
95
|
+
category: E(L.category),
|
|
96
|
+
authType: D(L.authType),
|
|
97
|
+
icon: L.icon || "",
|
|
98
|
+
color: L.color || "",
|
|
99
|
+
website: L.website || "",
|
|
100
|
+
docsUrl: L.docsUrl || "",
|
|
101
|
+
baseUrl: L.baseUrl || "",
|
|
102
|
+
apiVersion: L.apiVersion || "",
|
|
103
|
+
pluginVersion: L.pluginVersion || "1.0.0",
|
|
104
|
+
pluginAuthor: L.pluginAuthor || "",
|
|
105
|
+
pluginRepository: L.pluginRepository || "",
|
|
106
|
+
displayOrder: String(L.displayOrder || 0),
|
|
107
|
+
defaultScopes: (L.defaultScopes || []).join(", "),
|
|
108
|
+
supportedFeatures: (L.supportedFeatures || []).join(", "),
|
|
109
|
+
oauthConfig: L.oauthConfig ? JSON.stringify(L.oauthConfig, null, 2) : "",
|
|
110
|
+
availableScopes: L.availableScopes ? JSON.stringify(L.availableScopes, null, 2) : "",
|
|
111
|
+
rateLimitConfig: L.rateLimitConfig ? JSON.stringify(L.rateLimitConfig, null, 2) : "",
|
|
112
|
+
configSchema: L.configSchema ? JSON.stringify(L.configSchema, null, 2) : "",
|
|
113
|
+
isEnabled: L.isEnabled
|
|
114
|
+
}));
|
|
115
|
+
let Y = k ? I : F, X = c(), Z = (e) => `${X}-${e}`, Q = (e, t) => {
|
|
116
|
+
K((n) => ({
|
|
119
117
|
...n,
|
|
120
118
|
[e]: t
|
|
121
119
|
}));
|
|
122
120
|
};
|
|
123
|
-
return
|
|
121
|
+
return P || k && R ? /* @__PURE__ */ g("div", {
|
|
124
122
|
className: "flex items-center justify-center py-20",
|
|
125
|
-
children: /* @__PURE__ */
|
|
123
|
+
children: /* @__PURE__ */ g(d, {
|
|
126
124
|
size: 44,
|
|
127
125
|
className: "animate-spin text-primary"
|
|
128
126
|
})
|
|
129
|
-
}) :
|
|
127
|
+
}) : Y ? /* @__PURE__ */ _("div", {
|
|
130
128
|
className: "space-y-6 p-6 max-w-5xl mx-auto",
|
|
131
129
|
children: [
|
|
132
|
-
/* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ _("div", {
|
|
133
131
|
className: "rounded-xl border border-border-seam bg-accent-wash p-6 flex items-center gap-4",
|
|
134
|
-
children: [/* @__PURE__ */
|
|
132
|
+
children: [/* @__PURE__ */ g(v, {
|
|
135
133
|
variant: "ghost",
|
|
136
134
|
size: "icon",
|
|
137
|
-
onClick: () =>
|
|
138
|
-
"aria-label":
|
|
139
|
-
children: /* @__PURE__ */
|
|
140
|
-
}), /* @__PURE__ */
|
|
135
|
+
onClick: () => j?.(r(A, "providers")),
|
|
136
|
+
"aria-label": M("integrations.common.back", "Back"),
|
|
137
|
+
children: /* @__PURE__ */ g(u, { size: 20 })
|
|
138
|
+
}), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("h1", {
|
|
141
139
|
className: "text-2xl font-bold text-text-primary",
|
|
142
|
-
children:
|
|
143
|
-
}), /* @__PURE__ */
|
|
140
|
+
children: k ? M("integrations.providerEditor.editTitle", "Edit Provider") : M("integrations.providerEditor.addTitle", "Add Provider")
|
|
141
|
+
}), /* @__PURE__ */ g("p", {
|
|
144
142
|
className: "text-sm text-text-secondary mt-1",
|
|
145
|
-
children:
|
|
143
|
+
children: M("integrations.providerEditor.subtitle", "Configure catalog metadata, auth configuration, and runtime settings.")
|
|
146
144
|
})] })]
|
|
147
145
|
}),
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
-
icon: /* @__PURE__ */
|
|
150
|
-
children:
|
|
146
|
+
/* @__PURE__ */ g(S, {
|
|
147
|
+
icon: /* @__PURE__ */ g(p, { size: 16 }),
|
|
148
|
+
children: M("integrations.providerEditor.purpose", "Providers are the building blocks of integrations: each one tells the platform how to authenticate with and call an external service. Use this form to register a new provider (or edit an existing one) — set its identity and category, choose how it authenticates, and optionally supply advanced OAuth, scope, and rate-limit configuration. Once saved and enabled, anyone in the workspace can create connections to it.")
|
|
151
149
|
}),
|
|
152
|
-
|
|
150
|
+
U && /* @__PURE__ */ g("div", {
|
|
153
151
|
className: "rounded-xl border border-border-seam bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
|
|
154
|
-
children:
|
|
152
|
+
children: U
|
|
155
153
|
}),
|
|
156
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ _("div", {
|
|
157
155
|
className: "grid grid-cols-1 lg:grid-cols-2 gap-4",
|
|
158
156
|
children: [
|
|
159
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ _(y, {
|
|
160
158
|
className: "p-5 space-y-4",
|
|
161
159
|
children: [
|
|
162
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ g("h2", {
|
|
163
161
|
className: "font-semibold text-text-primary",
|
|
164
|
-
children:
|
|
162
|
+
children: M("integrations.providerEditor.sections.coreDetails", "Core details")
|
|
165
163
|
}),
|
|
166
|
-
!
|
|
167
|
-
htmlFor:
|
|
164
|
+
!k && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
165
|
+
htmlFor: Z("key"),
|
|
168
166
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
169
|
-
children:
|
|
170
|
-
}), /* @__PURE__ */
|
|
171
|
-
id:
|
|
172
|
-
"aria-label":
|
|
173
|
-
value:
|
|
174
|
-
onChange: (e) =>
|
|
167
|
+
children: M("integrations.providerEditor.fields.key", "Key")
|
|
168
|
+
}), /* @__PURE__ */ g("input", {
|
|
169
|
+
id: Z("key"),
|
|
170
|
+
"aria-label": M("integrations.providerEditor.fields.key", "Key"),
|
|
171
|
+
value: G.key,
|
|
172
|
+
onChange: (e) => Q("key", e.target.value),
|
|
175
173
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm",
|
|
176
|
-
placeholder:
|
|
174
|
+
placeholder: M("integrations.providerEditor.fields.keyPlaceholder", "e.g. slack-user")
|
|
177
175
|
})] }),
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
htmlFor:
|
|
176
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
177
|
+
htmlFor: Z("name"),
|
|
180
178
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
181
|
-
children:
|
|
182
|
-
}), /* @__PURE__ */
|
|
183
|
-
id:
|
|
184
|
-
"aria-label":
|
|
185
|
-
value:
|
|
186
|
-
onChange: (e) =>
|
|
179
|
+
children: M("integrations.providerEditor.fields.name", "Name")
|
|
180
|
+
}), /* @__PURE__ */ g("input", {
|
|
181
|
+
id: Z("name"),
|
|
182
|
+
"aria-label": M("integrations.providerEditor.fields.name", "Name"),
|
|
183
|
+
value: G.name,
|
|
184
|
+
onChange: (e) => Q("name", e.target.value),
|
|
187
185
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
|
|
188
186
|
})] }),
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
-
htmlFor:
|
|
187
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
188
|
+
htmlFor: Z("description"),
|
|
191
189
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
192
|
-
children:
|
|
193
|
-
}), /* @__PURE__ */
|
|
194
|
-
id:
|
|
195
|
-
"aria-label":
|
|
196
|
-
value:
|
|
197
|
-
onChange: (e) =>
|
|
190
|
+
children: M("integrations.providerEditor.fields.description", "Description")
|
|
191
|
+
}), /* @__PURE__ */ g("textarea", {
|
|
192
|
+
id: Z("description"),
|
|
193
|
+
"aria-label": M("integrations.providerEditor.fields.description", "Description"),
|
|
194
|
+
value: G.description,
|
|
195
|
+
onChange: (e) => Q("description", e.target.value),
|
|
198
196
|
rows: 4,
|
|
199
197
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
|
|
200
198
|
})] }),
|
|
201
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ _("div", {
|
|
202
200
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
203
|
-
children: [/* @__PURE__ */
|
|
204
|
-
htmlFor:
|
|
201
|
+
children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
202
|
+
htmlFor: Z("category"),
|
|
205
203
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
206
|
-
children:
|
|
207
|
-
}), /* @__PURE__ */
|
|
208
|
-
id:
|
|
209
|
-
"aria-label":
|
|
210
|
-
value:
|
|
211
|
-
onChange: (e) =>
|
|
204
|
+
children: M("integrations.providerEditor.fields.category", "Category")
|
|
205
|
+
}), /* @__PURE__ */ g("select", {
|
|
206
|
+
id: Z("category"),
|
|
207
|
+
"aria-label": M("integrations.providerEditor.fields.category", "Category"),
|
|
208
|
+
value: G.category,
|
|
209
|
+
onChange: (e) => Q("category", e.target.value),
|
|
212
210
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
213
|
-
children:
|
|
211
|
+
children: C.map((e) => /* @__PURE__ */ g("option", {
|
|
214
212
|
value: e,
|
|
215
213
|
children: e
|
|
216
214
|
}, e))
|
|
217
|
-
})] }), /* @__PURE__ */
|
|
218
|
-
htmlFor:
|
|
215
|
+
})] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
216
|
+
htmlFor: Z("authType"),
|
|
219
217
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
220
|
-
children:
|
|
221
|
-
}), /* @__PURE__ */
|
|
222
|
-
id:
|
|
223
|
-
"aria-label":
|
|
224
|
-
value:
|
|
225
|
-
onChange: (e) =>
|
|
218
|
+
children: M("integrations.providerEditor.fields.authType", "Auth Type")
|
|
219
|
+
}), /* @__PURE__ */ g("select", {
|
|
220
|
+
id: Z("authType"),
|
|
221
|
+
"aria-label": M("integrations.providerEditor.fields.authType", "Auth Type"),
|
|
222
|
+
value: G.authType,
|
|
223
|
+
onChange: (e) => Q("authType", e.target.value),
|
|
226
224
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
227
|
-
children:
|
|
225
|
+
children: w.map((e) => /* @__PURE__ */ g("option", {
|
|
228
226
|
value: e,
|
|
229
227
|
children: e
|
|
230
228
|
}, e))
|
|
231
229
|
})] })]
|
|
232
230
|
}),
|
|
233
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ _("div", {
|
|
234
232
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
235
|
-
children: [/* @__PURE__ */
|
|
236
|
-
htmlFor:
|
|
233
|
+
children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
234
|
+
htmlFor: Z("website"),
|
|
237
235
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
238
|
-
children:
|
|
239
|
-
}), /* @__PURE__ */
|
|
240
|
-
id:
|
|
241
|
-
"aria-label":
|
|
242
|
-
value:
|
|
243
|
-
onChange: (e) =>
|
|
236
|
+
children: M("integrations.providerEditor.fields.website", "Website")
|
|
237
|
+
}), /* @__PURE__ */ g("input", {
|
|
238
|
+
id: Z("website"),
|
|
239
|
+
"aria-label": M("integrations.providerEditor.fields.website", "Website"),
|
|
240
|
+
value: G.website,
|
|
241
|
+
onChange: (e) => Q("website", e.target.value),
|
|
244
242
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
|
|
245
|
-
})] }), /* @__PURE__ */
|
|
246
|
-
htmlFor:
|
|
243
|
+
})] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
244
|
+
htmlFor: Z("docsUrl"),
|
|
247
245
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
248
|
-
children:
|
|
249
|
-
}), /* @__PURE__ */
|
|
250
|
-
id:
|
|
251
|
-
"aria-label":
|
|
252
|
-
value:
|
|
253
|
-
onChange: (e) =>
|
|
246
|
+
children: M("integrations.providerEditor.fields.docsUrl", "Docs URL")
|
|
247
|
+
}), /* @__PURE__ */ g("input", {
|
|
248
|
+
id: Z("docsUrl"),
|
|
249
|
+
"aria-label": M("integrations.providerEditor.fields.docsUrl", "Docs URL"),
|
|
250
|
+
value: G.docsUrl,
|
|
251
|
+
onChange: (e) => Q("docsUrl", e.target.value),
|
|
254
252
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
|
|
255
253
|
})] })]
|
|
256
254
|
}),
|
|
257
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ _("div", {
|
|
258
256
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
259
|
-
children: [/* @__PURE__ */
|
|
260
|
-
htmlFor:
|
|
257
|
+
children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
258
|
+
htmlFor: Z("pluginVersion"),
|
|
261
259
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
262
|
-
children:
|
|
263
|
-
}), /* @__PURE__ */
|
|
264
|
-
id:
|
|
265
|
-
"aria-label":
|
|
266
|
-
value:
|
|
267
|
-
onChange: (e) =>
|
|
260
|
+
children: M("integrations.providerEditor.fields.pluginVersion", "Plugin version")
|
|
261
|
+
}), /* @__PURE__ */ g("input", {
|
|
262
|
+
id: Z("pluginVersion"),
|
|
263
|
+
"aria-label": M("integrations.providerEditor.fields.pluginVersion", "Plugin version"),
|
|
264
|
+
value: G.pluginVersion,
|
|
265
|
+
onChange: (e) => Q("pluginVersion", e.target.value),
|
|
268
266
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
|
|
269
|
-
})] }), /* @__PURE__ */
|
|
270
|
-
htmlFor:
|
|
267
|
+
})] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
268
|
+
htmlFor: Z("displayOrder"),
|
|
271
269
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
272
|
-
children:
|
|
273
|
-
}), /* @__PURE__ */
|
|
274
|
-
id:
|
|
275
|
-
"aria-label":
|
|
270
|
+
children: M("integrations.providerEditor.fields.displayOrder", "Display order")
|
|
271
|
+
}), /* @__PURE__ */ g("input", {
|
|
272
|
+
id: Z("displayOrder"),
|
|
273
|
+
"aria-label": M("integrations.providerEditor.fields.displayOrder", "Display order"),
|
|
276
274
|
type: "number",
|
|
277
|
-
value:
|
|
278
|
-
onChange: (e) =>
|
|
275
|
+
value: G.displayOrder,
|
|
276
|
+
onChange: (e) => Q("displayOrder", e.target.value),
|
|
279
277
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
|
|
280
278
|
})] })]
|
|
281
279
|
}),
|
|
282
|
-
/* @__PURE__ */
|
|
280
|
+
/* @__PURE__ */ _("div", {
|
|
283
281
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
284
|
-
children: [/* @__PURE__ */
|
|
285
|
-
htmlFor:
|
|
282
|
+
children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
283
|
+
htmlFor: Z("pluginAuthor"),
|
|
286
284
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
287
|
-
children:
|
|
288
|
-
}), /* @__PURE__ */
|
|
289
|
-
id:
|
|
290
|
-
"aria-label":
|
|
291
|
-
value:
|
|
292
|
-
onChange: (e) =>
|
|
285
|
+
children: M("integrations.providerEditor.fields.pluginAuthor", "Plugin author")
|
|
286
|
+
}), /* @__PURE__ */ g("input", {
|
|
287
|
+
id: Z("pluginAuthor"),
|
|
288
|
+
"aria-label": M("integrations.providerEditor.fields.pluginAuthor", "Plugin author"),
|
|
289
|
+
value: G.pluginAuthor,
|
|
290
|
+
onChange: (e) => Q("pluginAuthor", e.target.value),
|
|
293
291
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
|
|
294
|
-
})] }), /* @__PURE__ */
|
|
295
|
-
htmlFor:
|
|
292
|
+
})] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
293
|
+
htmlFor: Z("pluginRepository"),
|
|
296
294
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
297
|
-
children:
|
|
298
|
-
}), /* @__PURE__ */
|
|
299
|
-
id:
|
|
300
|
-
"aria-label":
|
|
301
|
-
value:
|
|
302
|
-
onChange: (e) =>
|
|
295
|
+
children: M("integrations.providerEditor.fields.repository", "Repository")
|
|
296
|
+
}), /* @__PURE__ */ g("input", {
|
|
297
|
+
id: Z("pluginRepository"),
|
|
298
|
+
"aria-label": M("integrations.providerEditor.fields.repository", "Repository"),
|
|
299
|
+
value: G.pluginRepository,
|
|
300
|
+
onChange: (e) => Q("pluginRepository", e.target.value),
|
|
303
301
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
|
|
304
302
|
})] })]
|
|
305
303
|
})
|
|
306
304
|
]
|
|
307
305
|
}),
|
|
308
|
-
/* @__PURE__ */
|
|
306
|
+
/* @__PURE__ */ _(b, {
|
|
309
307
|
className: "border-border-seam p-5 space-y-4",
|
|
310
308
|
children: [
|
|
311
|
-
/* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ g("h2", {
|
|
312
310
|
className: "font-semibold text-text-primary",
|
|
313
|
-
children:
|
|
311
|
+
children: M("integrations.providerEditor.sections.runtimeConfig", "Runtime config")
|
|
314
312
|
}),
|
|
315
|
-
/* @__PURE__ */
|
|
316
|
-
htmlFor:
|
|
313
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
314
|
+
htmlFor: Z("baseUrl"),
|
|
317
315
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
318
|
-
children:
|
|
319
|
-
}), /* @__PURE__ */
|
|
320
|
-
id:
|
|
321
|
-
"aria-label":
|
|
322
|
-
value:
|
|
323
|
-
onChange: (e) =>
|
|
316
|
+
children: M("integrations.providerEditor.fields.baseUrl", "Base URL")
|
|
317
|
+
}), /* @__PURE__ */ g("input", {
|
|
318
|
+
id: Z("baseUrl"),
|
|
319
|
+
"aria-label": M("integrations.providerEditor.fields.baseUrl", "Base URL"),
|
|
320
|
+
value: G.baseUrl,
|
|
321
|
+
onChange: (e) => Q("baseUrl", e.target.value),
|
|
324
322
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
|
|
325
323
|
})] }),
|
|
326
|
-
/* @__PURE__ */
|
|
327
|
-
htmlFor:
|
|
324
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
325
|
+
htmlFor: Z("apiVersion"),
|
|
328
326
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
329
|
-
children:
|
|
330
|
-
}), /* @__PURE__ */
|
|
331
|
-
id:
|
|
332
|
-
"aria-label":
|
|
333
|
-
value:
|
|
334
|
-
onChange: (e) =>
|
|
327
|
+
children: M("integrations.providerEditor.fields.apiVersion", "API version")
|
|
328
|
+
}), /* @__PURE__ */ g("input", {
|
|
329
|
+
id: Z("apiVersion"),
|
|
330
|
+
"aria-label": M("integrations.providerEditor.fields.apiVersion", "API version"),
|
|
331
|
+
value: G.apiVersion,
|
|
332
|
+
onChange: (e) => Q("apiVersion", e.target.value),
|
|
335
333
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
|
|
336
334
|
})] }),
|
|
337
|
-
/* @__PURE__ */
|
|
338
|
-
htmlFor:
|
|
335
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
336
|
+
htmlFor: Z("defaultScopes"),
|
|
339
337
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
340
|
-
children:
|
|
341
|
-
}), /* @__PURE__ */
|
|
342
|
-
id:
|
|
343
|
-
"aria-label":
|
|
344
|
-
value:
|
|
345
|
-
onChange: (e) =>
|
|
346
|
-
placeholder:
|
|
338
|
+
children: M("integrations.providerEditor.fields.defaultScopes", "Default scopes")
|
|
339
|
+
}), /* @__PURE__ */ g("input", {
|
|
340
|
+
id: Z("defaultScopes"),
|
|
341
|
+
"aria-label": M("integrations.providerEditor.fields.defaultScopes", "Default scopes"),
|
|
342
|
+
value: G.defaultScopes,
|
|
343
|
+
onChange: (e) => Q("defaultScopes", e.target.value),
|
|
344
|
+
placeholder: M("integrations.providerEditor.fields.defaultScopesPlaceholder", "openid, profile, email"),
|
|
347
345
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
|
|
348
346
|
})] }),
|
|
349
|
-
/* @__PURE__ */
|
|
350
|
-
htmlFor:
|
|
347
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
348
|
+
htmlFor: Z("supportedFeatures"),
|
|
351
349
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
352
|
-
children:
|
|
353
|
-
}), /* @__PURE__ */
|
|
354
|
-
id:
|
|
355
|
-
"aria-label":
|
|
356
|
-
value:
|
|
357
|
-
onChange: (e) =>
|
|
358
|
-
placeholder:
|
|
350
|
+
children: M("integrations.providerEditor.fields.supportedFeatures", "Supported features")
|
|
351
|
+
}), /* @__PURE__ */ g("input", {
|
|
352
|
+
id: Z("supportedFeatures"),
|
|
353
|
+
"aria-label": M("integrations.providerEditor.fields.supportedFeatures", "Supported features"),
|
|
354
|
+
value: G.supportedFeatures,
|
|
355
|
+
onChange: (e) => Q("supportedFeatures", e.target.value),
|
|
356
|
+
placeholder: M("integrations.providerEditor.fields.supportedFeaturesPlaceholder", "messages, files, events"),
|
|
359
357
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
|
|
360
358
|
})] }),
|
|
361
|
-
/* @__PURE__ */
|
|
362
|
-
title:
|
|
363
|
-
description:
|
|
364
|
-
children: /* @__PURE__ */
|
|
359
|
+
/* @__PURE__ */ g(x, {
|
|
360
|
+
title: M("integrations.providerEditor.sections.advancedConfig", "Advanced provider config"),
|
|
361
|
+
description: M("integrations.providerEditor.sections.advancedConfigDescription", "Raw JSON for OAuth, scopes, rate limiting, and config schema. Most providers leave these blank."),
|
|
362
|
+
children: /* @__PURE__ */ g("div", {
|
|
365
363
|
className: "space-y-3",
|
|
366
364
|
children: [
|
|
367
|
-
["oauthConfig",
|
|
368
|
-
["availableScopes",
|
|
369
|
-
["rateLimitConfig",
|
|
370
|
-
["configSchema",
|
|
371
|
-
].map(([e, t]) => /* @__PURE__ */
|
|
372
|
-
htmlFor:
|
|
365
|
+
["oauthConfig", M("integrations.providerEditor.fields.oauthConfig", "OAuth config JSON")],
|
|
366
|
+
["availableScopes", M("integrations.providerEditor.fields.availableScopes", "Available scopes JSON")],
|
|
367
|
+
["rateLimitConfig", M("integrations.providerEditor.fields.rateLimitConfig", "Rate limit config JSON")],
|
|
368
|
+
["configSchema", M("integrations.providerEditor.fields.configSchema", "Config schema JSON")]
|
|
369
|
+
].map(([e, t]) => /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
370
|
+
htmlFor: Z(e),
|
|
373
371
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
374
372
|
children: t
|
|
375
|
-
}), /* @__PURE__ */
|
|
376
|
-
id:
|
|
373
|
+
}), /* @__PURE__ */ g("textarea", {
|
|
374
|
+
id: Z(e),
|
|
377
375
|
"aria-label": t,
|
|
378
|
-
value:
|
|
379
|
-
onChange: (t) =>
|
|
376
|
+
value: G[e],
|
|
377
|
+
onChange: (t) => Q(e, t.target.value),
|
|
380
378
|
rows: 4,
|
|
381
379
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm font-mono"
|
|
382
380
|
})] }, e))
|
|
383
381
|
})
|
|
384
382
|
}),
|
|
385
|
-
/* @__PURE__ */
|
|
383
|
+
/* @__PURE__ */ _("label", {
|
|
386
384
|
className: "flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface px-3 py-2.5",
|
|
387
|
-
children: [/* @__PURE__ */
|
|
385
|
+
children: [/* @__PURE__ */ g("input", {
|
|
388
386
|
type: "checkbox",
|
|
389
|
-
checked:
|
|
390
|
-
onChange: (e) =>
|
|
391
|
-
"aria-label":
|
|
392
|
-
}), /* @__PURE__ */
|
|
387
|
+
checked: G.isEnabled,
|
|
388
|
+
onChange: (e) => Q("isEnabled", e.target.checked),
|
|
389
|
+
"aria-label": M("integrations.providerEditor.fields.enabled", "Provider enabled")
|
|
390
|
+
}), /* @__PURE__ */ g("span", {
|
|
393
391
|
className: "text-sm text-text-primary",
|
|
394
|
-
children:
|
|
392
|
+
children: M("integrations.providerEditor.fields.enabled", "Provider enabled")
|
|
395
393
|
})]
|
|
396
394
|
})
|
|
397
395
|
]
|
|
398
396
|
}),
|
|
399
|
-
|
|
397
|
+
k && L && /* @__PURE__ */ g(b, {
|
|
400
398
|
className: "p-5",
|
|
401
|
-
children: /* @__PURE__ */
|
|
402
|
-
provider:
|
|
403
|
-
canManage:
|
|
399
|
+
children: /* @__PURE__ */ g(s, {
|
|
400
|
+
provider: L,
|
|
401
|
+
canManage: Y
|
|
404
402
|
})
|
|
405
403
|
})
|
|
406
404
|
]
|
|
407
405
|
}),
|
|
408
|
-
/* @__PURE__ */
|
|
406
|
+
/* @__PURE__ */ g("div", {
|
|
409
407
|
className: "flex justify-end",
|
|
410
|
-
children: /* @__PURE__ */ v
|
|
408
|
+
children: /* @__PURE__ */ _(v, {
|
|
411
409
|
onClick: async () => {
|
|
412
410
|
try {
|
|
413
|
-
|
|
411
|
+
W("");
|
|
414
412
|
let e = {
|
|
415
|
-
name:
|
|
416
|
-
description:
|
|
417
|
-
icon:
|
|
418
|
-
color:
|
|
419
|
-
website:
|
|
420
|
-
docsUrl:
|
|
421
|
-
baseUrl:
|
|
422
|
-
apiVersion:
|
|
423
|
-
pluginVersion:
|
|
424
|
-
pluginAuthor:
|
|
425
|
-
pluginRepository:
|
|
426
|
-
displayOrder: Number(
|
|
427
|
-
defaultScopes:
|
|
413
|
+
name: G.name.trim(),
|
|
414
|
+
description: G.description.trim() || void 0,
|
|
415
|
+
icon: G.icon.trim() || void 0,
|
|
416
|
+
color: G.color.trim() || void 0,
|
|
417
|
+
website: G.website.trim() || void 0,
|
|
418
|
+
docsUrl: G.docsUrl.trim() || void 0,
|
|
419
|
+
baseUrl: G.baseUrl.trim() || void 0,
|
|
420
|
+
apiVersion: G.apiVersion.trim() || void 0,
|
|
421
|
+
pluginVersion: G.pluginVersion.trim() || void 0,
|
|
422
|
+
pluginAuthor: G.pluginAuthor.trim() || void 0,
|
|
423
|
+
pluginRepository: G.pluginRepository.trim() || void 0,
|
|
424
|
+
displayOrder: Number(G.displayOrder || "0"),
|
|
425
|
+
defaultScopes: G.defaultScopes.split(",").flatMap((e) => {
|
|
428
426
|
let t = e.trim();
|
|
429
427
|
return t ? [t] : [];
|
|
430
428
|
}),
|
|
431
|
-
supportedFeatures:
|
|
429
|
+
supportedFeatures: G.supportedFeatures.split(",").flatMap((e) => {
|
|
432
430
|
let t = e.trim();
|
|
433
431
|
return t ? [t] : [];
|
|
434
432
|
}),
|
|
435
|
-
oauthConfig:
|
|
436
|
-
availableScopes:
|
|
437
|
-
rateLimitConfig:
|
|
438
|
-
configSchema:
|
|
439
|
-
isEnabled:
|
|
433
|
+
oauthConfig: T(G.oauthConfig, "OAuth config"),
|
|
434
|
+
availableScopes: T(G.availableScopes, "Available scopes"),
|
|
435
|
+
rateLimitConfig: T(G.rateLimitConfig, "Rate limit config"),
|
|
436
|
+
configSchema: T(G.configSchema, "Config schema"),
|
|
437
|
+
isEnabled: G.isEnabled
|
|
440
438
|
};
|
|
441
|
-
if (
|
|
439
|
+
if (k && O) await V(O, e), j?.(r(A, `providers/${O}`));
|
|
442
440
|
else {
|
|
443
|
-
let t = await
|
|
444
|
-
key:
|
|
445
|
-
category:
|
|
446
|
-
authType:
|
|
441
|
+
let t = await z({
|
|
442
|
+
key: G.key.trim(),
|
|
443
|
+
category: G.category,
|
|
444
|
+
authType: G.authType,
|
|
447
445
|
...e
|
|
448
446
|
});
|
|
449
|
-
|
|
447
|
+
j?.(r(A, `providers/${t?.id || ""}`));
|
|
450
448
|
}
|
|
451
449
|
} catch (e) {
|
|
452
|
-
|
|
450
|
+
W(e instanceof Error ? e.message : M("integrations.providerEditor.errors.saveFailed", "Failed to save provider"));
|
|
453
451
|
}
|
|
454
452
|
},
|
|
455
|
-
disabled:
|
|
456
|
-
children: [
|
|
453
|
+
disabled: B || H,
|
|
454
|
+
children: [B || H ? /* @__PURE__ */ g(d, {
|
|
457
455
|
size: 16,
|
|
458
456
|
className: "animate-spin"
|
|
459
|
-
}) : /* @__PURE__ */
|
|
457
|
+
}) : /* @__PURE__ */ g(f, { size: 16 }), k ? M("integrations.common.save", "Save Provider") : M("integrations.common.create", "Create Provider")]
|
|
460
458
|
})
|
|
461
459
|
})
|
|
462
460
|
]
|
|
463
|
-
}) : /* @__PURE__ */
|
|
461
|
+
}) : /* @__PURE__ */ _("div", {
|
|
464
462
|
className: "flex flex-col items-center justify-center py-20 text-center p-6",
|
|
465
463
|
children: [
|
|
466
|
-
/* @__PURE__ */
|
|
464
|
+
/* @__PURE__ */ g(p, {
|
|
467
465
|
size: 48,
|
|
468
466
|
className: "text-text-secondary mb-4"
|
|
469
467
|
}),
|
|
470
|
-
/* @__PURE__ */
|
|
468
|
+
/* @__PURE__ */ g("h2", {
|
|
471
469
|
className: "text-xl font-bold text-text-primary mb-2",
|
|
472
|
-
children:
|
|
470
|
+
children: M("integrations.providerEditor.accessDenied.title", "Access Denied")
|
|
473
471
|
}),
|
|
474
|
-
/* @__PURE__ */
|
|
472
|
+
/* @__PURE__ */ g("p", {
|
|
475
473
|
className: "text-sm text-text-secondary max-w-md",
|
|
476
|
-
children:
|
|
474
|
+
children: M("integrations.providerEditor.accessDenied.description", "You do not have permission to manage providers.")
|
|
477
475
|
})
|
|
478
476
|
]
|
|
479
477
|
});
|
|
480
478
|
}
|
|
481
|
-
|
|
482
|
-
export { k as ProviderEditorPage };
|
|
479
|
+
export { O as ProviderEditorPage };
|
|
483
480
|
|
|
484
481
|
//# sourceMappingURL=ProviderEditorPage.js.map
|