@burdenoff/microfe-integrations 2026.624.4 → 2026.625.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/integrations/components/ConnectionCard.js +27 -26
- package/dist/integrations/components/ConnectionCard.js.map +1 -1
- package/dist/integrations/components/ProviderCard.js +67 -66
- package/dist/integrations/components/ProviderCard.js.map +1 -1
- package/dist/integrations/pages/AddConnectionWizard.js +268 -283
- package/dist/integrations/pages/AddConnectionWizard.js.map +1 -1
- package/dist/integrations/pages/ConnectionDetail.js +241 -245
- package/dist/integrations/pages/ConnectionDetail.js.map +1 -1
- package/dist/integrations/pages/ConnectionLogs.js +118 -119
- package/dist/integrations/pages/ConnectionLogs.js.map +1 -1
- package/dist/integrations/pages/ConnectionsList.js +68 -70
- package/dist/integrations/pages/ConnectionsList.js.map +1 -1
- package/dist/integrations/pages/IntegrationsOverview.js +67 -67
- package/dist/integrations/pages/IntegrationsOverview.js.map +1 -1
- package/dist/integrations/pages/IntegrationsSettings.js +71 -71
- package/dist/integrations/pages/IntegrationsSettings.js.map +1 -1
- package/dist/integrations/pages/ProviderCatalog.js +46 -46
- package/dist/integrations/pages/ProviderCatalog.js.map +1 -1
- package/dist/integrations/pages/ProviderDetail.js +214 -215
- package/dist/integrations/pages/ProviderDetail.js.map +1 -1
- package/dist/integrations/pages/ProviderEditorPage.js +152 -154
- package/dist/integrations/pages/ProviderEditorPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -7,9 +7,9 @@ import { ArrowLeft as l, Loader2 as u, Save as d, Shield as f } from "lucide-rea
|
|
|
7
7
|
import { useParams as p } from "react-router-dom";
|
|
8
8
|
import { usePermissions as m } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
9
9
|
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
10
|
-
import {
|
|
10
|
+
import { Button as _, GlassCard as v, OptionalFields as y } from "@burdenoff/fe-libs/ui";
|
|
11
11
|
//#region src/integrations/pages/ProviderEditorPage.tsx
|
|
12
|
-
var
|
|
12
|
+
var b = [
|
|
13
13
|
"COMMUNICATION",
|
|
14
14
|
"PRODUCTIVITY",
|
|
15
15
|
"CLOUD_STORAGE",
|
|
@@ -21,7 +21,7 @@ var v = [
|
|
|
21
21
|
"PAYMENT",
|
|
22
22
|
"ANALYTICS",
|
|
23
23
|
"CUSTOM"
|
|
24
|
-
],
|
|
24
|
+
], x = [
|
|
25
25
|
"OAUTH2",
|
|
26
26
|
"API_KEY",
|
|
27
27
|
"BASIC_AUTH",
|
|
@@ -29,7 +29,7 @@ var v = [
|
|
|
29
29
|
"SERVICE_ACCOUNT",
|
|
30
30
|
"CUSTOM"
|
|
31
31
|
];
|
|
32
|
-
function
|
|
32
|
+
function S(e, t) {
|
|
33
33
|
let n = e.trim();
|
|
34
34
|
if (n) try {
|
|
35
35
|
return JSON.parse(n);
|
|
@@ -37,7 +37,7 @@ function b(e, t) {
|
|
|
37
37
|
throw Error(`${t} must be valid JSON`);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function C(e) {
|
|
41
41
|
return {
|
|
42
42
|
communication: "COMMUNICATION",
|
|
43
43
|
productivity: "PRODUCTIVITY",
|
|
@@ -52,7 +52,7 @@ function x(e) {
|
|
|
52
52
|
other: "CUSTOM"
|
|
53
53
|
}[e || ""] || "CUSTOM";
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function w(e) {
|
|
56
56
|
return {
|
|
57
57
|
oauth2: "OAUTH2",
|
|
58
58
|
api_key: "API_KEY",
|
|
@@ -61,8 +61,8 @@ function S(e) {
|
|
|
61
61
|
service_account: "SERVICE_ACCOUNT"
|
|
62
62
|
}[e || ""] || "CUSTOM";
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
let { providerId:
|
|
64
|
+
function T() {
|
|
65
|
+
let { providerId: T } = p(), E = !!T, { basePath: D = "/", navigate: O } = e(), { hasPermission: k, isLoading: A } = m(), j = k(t.PROVIDER_CREATE), M = k(t.PROVIDER_UPDATE), { provider: N, loading: P } = i(T ?? ""), { installPlugin: F, loading: I } = r(), { updatePlugin: L, loading: R } = a(), [z, B] = c(""), [V, H] = c({
|
|
66
66
|
key: "",
|
|
67
67
|
name: "",
|
|
68
68
|
description: "",
|
|
@@ -87,137 +87,137 @@ function C() {
|
|
|
87
87
|
isEnabled: !0
|
|
88
88
|
});
|
|
89
89
|
o(() => {
|
|
90
|
-
!
|
|
91
|
-
key:
|
|
92
|
-
name:
|
|
93
|
-
description:
|
|
94
|
-
category:
|
|
95
|
-
authType:
|
|
96
|
-
icon:
|
|
97
|
-
color:
|
|
98
|
-
website:
|
|
99
|
-
docsUrl:
|
|
100
|
-
baseUrl:
|
|
101
|
-
apiVersion:
|
|
102
|
-
pluginVersion:
|
|
103
|
-
pluginAuthor:
|
|
104
|
-
pluginRepository:
|
|
105
|
-
displayOrder: String(
|
|
106
|
-
defaultScopes: (
|
|
107
|
-
supportedFeatures: (
|
|
108
|
-
oauthConfig:
|
|
109
|
-
availableScopes:
|
|
110
|
-
rateLimitConfig:
|
|
111
|
-
configSchema:
|
|
112
|
-
isEnabled:
|
|
90
|
+
!N || !E || H({
|
|
91
|
+
key: N.key,
|
|
92
|
+
name: N.name,
|
|
93
|
+
description: N.description || "",
|
|
94
|
+
category: C(N.category),
|
|
95
|
+
authType: w(N.authType),
|
|
96
|
+
icon: N.icon || "",
|
|
97
|
+
color: N.color || "",
|
|
98
|
+
website: N.website || "",
|
|
99
|
+
docsUrl: N.docsUrl || "",
|
|
100
|
+
baseUrl: N.baseUrl || "",
|
|
101
|
+
apiVersion: N.apiVersion || "",
|
|
102
|
+
pluginVersion: N.pluginVersion || "1.0.0",
|
|
103
|
+
pluginAuthor: N.pluginAuthor || "",
|
|
104
|
+
pluginRepository: N.pluginRepository || "",
|
|
105
|
+
displayOrder: String(N.displayOrder || 0),
|
|
106
|
+
defaultScopes: (N.defaultScopes || []).join(", "),
|
|
107
|
+
supportedFeatures: (N.supportedFeatures || []).join(", "),
|
|
108
|
+
oauthConfig: N.oauthConfig ? JSON.stringify(N.oauthConfig, null, 2) : "",
|
|
109
|
+
availableScopes: N.availableScopes ? JSON.stringify(N.availableScopes, null, 2) : "",
|
|
110
|
+
rateLimitConfig: N.rateLimitConfig ? JSON.stringify(N.rateLimitConfig, null, 2) : "",
|
|
111
|
+
configSchema: N.configSchema ? JSON.stringify(N.configSchema, null, 2) : "",
|
|
112
|
+
isEnabled: N.isEnabled
|
|
113
113
|
});
|
|
114
|
-
}, [
|
|
115
|
-
let
|
|
116
|
-
|
|
114
|
+
}, [E, N]);
|
|
115
|
+
let U = E ? M : j, W = s(), G = (e) => `${W}-${e}`, K = (e, t) => {
|
|
116
|
+
H((n) => ({
|
|
117
117
|
...n,
|
|
118
118
|
[e]: t
|
|
119
119
|
}));
|
|
120
120
|
};
|
|
121
|
-
return
|
|
121
|
+
return A || E && P ? /* @__PURE__ */ h("div", {
|
|
122
122
|
className: "flex items-center justify-center py-20",
|
|
123
123
|
children: /* @__PURE__ */ h(u, {
|
|
124
124
|
size: 44,
|
|
125
125
|
className: "animate-spin text-primary"
|
|
126
126
|
})
|
|
127
|
-
}) :
|
|
127
|
+
}) : U ? /* @__PURE__ */ g("div", {
|
|
128
128
|
className: "space-y-6 p-6 max-w-5xl mx-auto",
|
|
129
129
|
children: [
|
|
130
130
|
/* @__PURE__ */ g("div", {
|
|
131
|
-
className: "flex items-center gap-4",
|
|
132
|
-
children: [/* @__PURE__ */ h(
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
131
|
+
className: "rounded-xl border border-border-seam bg-accent-wash p-6 flex items-center gap-4",
|
|
132
|
+
children: [/* @__PURE__ */ h(_, {
|
|
133
|
+
variant: "ghost",
|
|
134
|
+
size: "icon",
|
|
135
|
+
onClick: () => O?.(n(D, "providers")),
|
|
136
136
|
"aria-label": "Back to providers",
|
|
137
137
|
children: /* @__PURE__ */ h(l, { size: 20 })
|
|
138
138
|
}), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h1", {
|
|
139
139
|
className: "text-2xl font-bold text-text-primary",
|
|
140
|
-
children:
|
|
140
|
+
children: E ? "Edit Provider" : "Add Provider"
|
|
141
141
|
}), /* @__PURE__ */ h("p", {
|
|
142
142
|
className: "text-sm text-text-secondary mt-1",
|
|
143
143
|
children: "Configure catalog metadata, auth configuration, and runtime settings."
|
|
144
144
|
})] })]
|
|
145
145
|
}),
|
|
146
|
-
|
|
147
|
-
className: "rounded-xl border border-border-
|
|
148
|
-
children:
|
|
146
|
+
z && /* @__PURE__ */ h("div", {
|
|
147
|
+
className: "rounded-xl border border-border-seam bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
|
|
148
|
+
children: z
|
|
149
149
|
}),
|
|
150
150
|
/* @__PURE__ */ g("div", {
|
|
151
151
|
className: "grid grid-cols-1 lg:grid-cols-2 gap-4",
|
|
152
|
-
children: [/* @__PURE__ */ g(
|
|
153
|
-
className: "
|
|
152
|
+
children: [/* @__PURE__ */ g(v, {
|
|
153
|
+
className: "border-border-seam p-5 space-y-4",
|
|
154
154
|
children: [
|
|
155
155
|
/* @__PURE__ */ h("h2", {
|
|
156
156
|
className: "font-semibold text-text-primary",
|
|
157
157
|
children: "Core details"
|
|
158
158
|
}),
|
|
159
|
-
!
|
|
160
|
-
htmlFor:
|
|
159
|
+
!E && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
160
|
+
htmlFor: G("key"),
|
|
161
161
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
162
162
|
children: "Key"
|
|
163
163
|
}), /* @__PURE__ */ h("input", {
|
|
164
|
-
id:
|
|
164
|
+
id: G("key"),
|
|
165
165
|
"aria-label": "Key",
|
|
166
|
-
value:
|
|
167
|
-
onChange: (e) =>
|
|
166
|
+
value: V.key,
|
|
167
|
+
onChange: (e) => K("key", e.target.value),
|
|
168
168
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm",
|
|
169
169
|
placeholder: "e.g. slack-user"
|
|
170
170
|
})] }),
|
|
171
171
|
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
172
|
-
htmlFor:
|
|
172
|
+
htmlFor: G("name"),
|
|
173
173
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
174
174
|
children: "Name"
|
|
175
175
|
}), /* @__PURE__ */ h("input", {
|
|
176
|
-
id:
|
|
176
|
+
id: G("name"),
|
|
177
177
|
"aria-label": "Name",
|
|
178
|
-
value:
|
|
179
|
-
onChange: (e) =>
|
|
178
|
+
value: V.name,
|
|
179
|
+
onChange: (e) => K("name", e.target.value),
|
|
180
180
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
|
|
181
181
|
})] }),
|
|
182
182
|
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
183
|
-
htmlFor:
|
|
183
|
+
htmlFor: G("description"),
|
|
184
184
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
185
185
|
children: "Description"
|
|
186
186
|
}), /* @__PURE__ */ h("textarea", {
|
|
187
|
-
id:
|
|
187
|
+
id: G("description"),
|
|
188
188
|
"aria-label": "Description",
|
|
189
|
-
value:
|
|
190
|
-
onChange: (e) =>
|
|
189
|
+
value: V.description,
|
|
190
|
+
onChange: (e) => K("description", e.target.value),
|
|
191
191
|
rows: 4,
|
|
192
192
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
|
|
193
193
|
})] }),
|
|
194
194
|
/* @__PURE__ */ g("div", {
|
|
195
195
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
196
196
|
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
197
|
-
htmlFor:
|
|
197
|
+
htmlFor: G("category"),
|
|
198
198
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
199
199
|
children: "Category"
|
|
200
200
|
}), /* @__PURE__ */ h("select", {
|
|
201
|
-
id:
|
|
201
|
+
id: G("category"),
|
|
202
202
|
"aria-label": "Category",
|
|
203
|
-
value:
|
|
204
|
-
onChange: (e) =>
|
|
203
|
+
value: V.category,
|
|
204
|
+
onChange: (e) => K("category", e.target.value),
|
|
205
205
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm",
|
|
206
|
-
children:
|
|
206
|
+
children: b.map((e) => /* @__PURE__ */ h("option", {
|
|
207
207
|
value: e,
|
|
208
208
|
children: e
|
|
209
209
|
}, e))
|
|
210
210
|
})] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
211
|
-
htmlFor:
|
|
211
|
+
htmlFor: G("authType"),
|
|
212
212
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
213
213
|
children: "Auth Type"
|
|
214
214
|
}), /* @__PURE__ */ h("select", {
|
|
215
|
-
id:
|
|
215
|
+
id: G("authType"),
|
|
216
216
|
"aria-label": "Auth Type",
|
|
217
|
-
value:
|
|
218
|
-
onChange: (e) =>
|
|
217
|
+
value: V.authType,
|
|
218
|
+
onChange: (e) => K("authType", e.target.value),
|
|
219
219
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm",
|
|
220
|
-
children:
|
|
220
|
+
children: x.map((e) => /* @__PURE__ */ h("option", {
|
|
221
221
|
value: e,
|
|
222
222
|
children: e
|
|
223
223
|
}, e))
|
|
@@ -226,131 +226,131 @@ function C() {
|
|
|
226
226
|
/* @__PURE__ */ g("div", {
|
|
227
227
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
228
228
|
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
229
|
-
htmlFor:
|
|
229
|
+
htmlFor: G("website"),
|
|
230
230
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
231
231
|
children: "Website"
|
|
232
232
|
}), /* @__PURE__ */ h("input", {
|
|
233
|
-
id:
|
|
233
|
+
id: G("website"),
|
|
234
234
|
"aria-label": "Website",
|
|
235
|
-
value:
|
|
236
|
-
onChange: (e) =>
|
|
235
|
+
value: V.website,
|
|
236
|
+
onChange: (e) => K("website", e.target.value),
|
|
237
237
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
|
|
238
238
|
})] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
239
|
-
htmlFor:
|
|
239
|
+
htmlFor: G("docsUrl"),
|
|
240
240
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
241
241
|
children: "Docs URL"
|
|
242
242
|
}), /* @__PURE__ */ h("input", {
|
|
243
|
-
id:
|
|
243
|
+
id: G("docsUrl"),
|
|
244
244
|
"aria-label": "Docs URL",
|
|
245
|
-
value:
|
|
246
|
-
onChange: (e) =>
|
|
245
|
+
value: V.docsUrl,
|
|
246
|
+
onChange: (e) => K("docsUrl", e.target.value),
|
|
247
247
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
|
|
248
248
|
})] })]
|
|
249
249
|
}),
|
|
250
250
|
/* @__PURE__ */ g("div", {
|
|
251
251
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
252
252
|
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
253
|
-
htmlFor:
|
|
253
|
+
htmlFor: G("pluginVersion"),
|
|
254
254
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
255
255
|
children: "Plugin version"
|
|
256
256
|
}), /* @__PURE__ */ h("input", {
|
|
257
|
-
id:
|
|
257
|
+
id: G("pluginVersion"),
|
|
258
258
|
"aria-label": "Plugin version",
|
|
259
|
-
value:
|
|
260
|
-
onChange: (e) =>
|
|
259
|
+
value: V.pluginVersion,
|
|
260
|
+
onChange: (e) => K("pluginVersion", e.target.value),
|
|
261
261
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
|
|
262
262
|
})] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
263
|
-
htmlFor:
|
|
263
|
+
htmlFor: G("displayOrder"),
|
|
264
264
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
265
265
|
children: "Display order"
|
|
266
266
|
}), /* @__PURE__ */ h("input", {
|
|
267
|
-
id:
|
|
267
|
+
id: G("displayOrder"),
|
|
268
268
|
"aria-label": "Display order",
|
|
269
269
|
type: "number",
|
|
270
|
-
value:
|
|
271
|
-
onChange: (e) =>
|
|
270
|
+
value: V.displayOrder,
|
|
271
|
+
onChange: (e) => K("displayOrder", e.target.value),
|
|
272
272
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
|
|
273
273
|
})] })]
|
|
274
274
|
}),
|
|
275
275
|
/* @__PURE__ */ g("div", {
|
|
276
276
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
277
277
|
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
278
|
-
htmlFor:
|
|
278
|
+
htmlFor: G("pluginAuthor"),
|
|
279
279
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
280
280
|
children: "Plugin author"
|
|
281
281
|
}), /* @__PURE__ */ h("input", {
|
|
282
|
-
id:
|
|
282
|
+
id: G("pluginAuthor"),
|
|
283
283
|
"aria-label": "Plugin author",
|
|
284
|
-
value:
|
|
285
|
-
onChange: (e) =>
|
|
284
|
+
value: V.pluginAuthor,
|
|
285
|
+
onChange: (e) => K("pluginAuthor", e.target.value),
|
|
286
286
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
|
|
287
287
|
})] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
288
|
-
htmlFor:
|
|
288
|
+
htmlFor: G("pluginRepository"),
|
|
289
289
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
290
290
|
children: "Repository"
|
|
291
291
|
}), /* @__PURE__ */ h("input", {
|
|
292
|
-
id:
|
|
292
|
+
id: G("pluginRepository"),
|
|
293
293
|
"aria-label": "Repository",
|
|
294
|
-
value:
|
|
295
|
-
onChange: (e) =>
|
|
294
|
+
value: V.pluginRepository,
|
|
295
|
+
onChange: (e) => K("pluginRepository", e.target.value),
|
|
296
296
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
|
|
297
297
|
})] })]
|
|
298
298
|
})
|
|
299
299
|
]
|
|
300
|
-
}), /* @__PURE__ */ g(
|
|
301
|
-
className: "
|
|
300
|
+
}), /* @__PURE__ */ g(v, {
|
|
301
|
+
className: "border-border-seam p-5 space-y-4",
|
|
302
302
|
children: [
|
|
303
303
|
/* @__PURE__ */ h("h2", {
|
|
304
304
|
className: "font-semibold text-text-primary",
|
|
305
305
|
children: "Runtime config"
|
|
306
306
|
}),
|
|
307
307
|
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
308
|
-
htmlFor:
|
|
308
|
+
htmlFor: G("baseUrl"),
|
|
309
309
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
310
310
|
children: "Base URL"
|
|
311
311
|
}), /* @__PURE__ */ h("input", {
|
|
312
|
-
id:
|
|
312
|
+
id: G("baseUrl"),
|
|
313
313
|
"aria-label": "Base URL",
|
|
314
|
-
value:
|
|
315
|
-
onChange: (e) =>
|
|
314
|
+
value: V.baseUrl,
|
|
315
|
+
onChange: (e) => K("baseUrl", e.target.value),
|
|
316
316
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
|
|
317
317
|
})] }),
|
|
318
318
|
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
319
|
-
htmlFor:
|
|
319
|
+
htmlFor: G("apiVersion"),
|
|
320
320
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
321
321
|
children: "API version"
|
|
322
322
|
}), /* @__PURE__ */ h("input", {
|
|
323
|
-
id:
|
|
323
|
+
id: G("apiVersion"),
|
|
324
324
|
"aria-label": "API version",
|
|
325
|
-
value:
|
|
326
|
-
onChange: (e) =>
|
|
325
|
+
value: V.apiVersion,
|
|
326
|
+
onChange: (e) => K("apiVersion", e.target.value),
|
|
327
327
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
|
|
328
328
|
})] }),
|
|
329
329
|
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
330
|
-
htmlFor:
|
|
330
|
+
htmlFor: G("defaultScopes"),
|
|
331
331
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
332
332
|
children: "Default scopes"
|
|
333
333
|
}), /* @__PURE__ */ h("input", {
|
|
334
|
-
id:
|
|
334
|
+
id: G("defaultScopes"),
|
|
335
335
|
"aria-label": "Default scopes",
|
|
336
|
-
value:
|
|
337
|
-
onChange: (e) =>
|
|
336
|
+
value: V.defaultScopes,
|
|
337
|
+
onChange: (e) => K("defaultScopes", e.target.value),
|
|
338
338
|
placeholder: "openid, profile, email",
|
|
339
339
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
|
|
340
340
|
})] }),
|
|
341
341
|
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
342
|
-
htmlFor:
|
|
342
|
+
htmlFor: G("supportedFeatures"),
|
|
343
343
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
344
344
|
children: "Supported features"
|
|
345
345
|
}), /* @__PURE__ */ h("input", {
|
|
346
|
-
id:
|
|
346
|
+
id: G("supportedFeatures"),
|
|
347
347
|
"aria-label": "Supported features",
|
|
348
|
-
value:
|
|
349
|
-
onChange: (e) =>
|
|
348
|
+
value: V.supportedFeatures,
|
|
349
|
+
onChange: (e) => K("supportedFeatures", e.target.value),
|
|
350
350
|
placeholder: "messages, files, events",
|
|
351
351
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm"
|
|
352
352
|
})] }),
|
|
353
|
-
/* @__PURE__ */ h(
|
|
353
|
+
/* @__PURE__ */ h(y, {
|
|
354
354
|
title: "Advanced provider config",
|
|
355
355
|
description: "Raw JSON for OAuth, scopes, rate limiting, and config schema. Most providers leave these blank.",
|
|
356
356
|
children: /* @__PURE__ */ h("div", {
|
|
@@ -361,25 +361,25 @@ function C() {
|
|
|
361
361
|
["rateLimitConfig", "Rate limit config JSON"],
|
|
362
362
|
["configSchema", "Config schema JSON"]
|
|
363
363
|
].map(([e, t]) => /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
364
|
-
htmlFor:
|
|
364
|
+
htmlFor: G(e),
|
|
365
365
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
366
366
|
children: t
|
|
367
367
|
}), /* @__PURE__ */ h("textarea", {
|
|
368
|
-
id:
|
|
368
|
+
id: G(e),
|
|
369
369
|
"aria-label": t,
|
|
370
|
-
value:
|
|
371
|
-
onChange: (t) =>
|
|
370
|
+
value: V[e],
|
|
371
|
+
onChange: (t) => K(e, t.target.value),
|
|
372
372
|
rows: 4,
|
|
373
373
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm font-mono"
|
|
374
374
|
})] }, e))
|
|
375
375
|
})
|
|
376
376
|
}),
|
|
377
377
|
/* @__PURE__ */ g("label", {
|
|
378
|
-
className: "flex items-center gap-3 rounded-lg border border-border-
|
|
378
|
+
className: "flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface px-3 py-2.5",
|
|
379
379
|
children: [/* @__PURE__ */ h("input", {
|
|
380
380
|
type: "checkbox",
|
|
381
|
-
checked:
|
|
382
|
-
onChange: (e) =>
|
|
381
|
+
checked: V.isEnabled,
|
|
382
|
+
onChange: (e) => K("isEnabled", e.target.checked),
|
|
383
383
|
"aria-label": "Provider enabled"
|
|
384
384
|
}), /* @__PURE__ */ h("span", {
|
|
385
385
|
className: "text-sm text-text-primary",
|
|
@@ -391,58 +391,56 @@ function C() {
|
|
|
391
391
|
}),
|
|
392
392
|
/* @__PURE__ */ h("div", {
|
|
393
393
|
className: "flex justify-end",
|
|
394
|
-
children: /* @__PURE__ */ g(
|
|
395
|
-
type: "button",
|
|
394
|
+
children: /* @__PURE__ */ g(_, {
|
|
396
395
|
onClick: async () => {
|
|
397
396
|
try {
|
|
398
|
-
|
|
397
|
+
B("");
|
|
399
398
|
let e = {
|
|
400
|
-
name:
|
|
401
|
-
description:
|
|
402
|
-
icon:
|
|
403
|
-
color:
|
|
404
|
-
website:
|
|
405
|
-
docsUrl:
|
|
406
|
-
baseUrl:
|
|
407
|
-
apiVersion:
|
|
408
|
-
pluginVersion:
|
|
409
|
-
pluginAuthor:
|
|
410
|
-
pluginRepository:
|
|
411
|
-
displayOrder: Number(
|
|
412
|
-
defaultScopes:
|
|
399
|
+
name: V.name.trim(),
|
|
400
|
+
description: V.description.trim() || void 0,
|
|
401
|
+
icon: V.icon.trim() || void 0,
|
|
402
|
+
color: V.color.trim() || void 0,
|
|
403
|
+
website: V.website.trim() || void 0,
|
|
404
|
+
docsUrl: V.docsUrl.trim() || void 0,
|
|
405
|
+
baseUrl: V.baseUrl.trim() || void 0,
|
|
406
|
+
apiVersion: V.apiVersion.trim() || void 0,
|
|
407
|
+
pluginVersion: V.pluginVersion.trim() || void 0,
|
|
408
|
+
pluginAuthor: V.pluginAuthor.trim() || void 0,
|
|
409
|
+
pluginRepository: V.pluginRepository.trim() || void 0,
|
|
410
|
+
displayOrder: Number(V.displayOrder || "0"),
|
|
411
|
+
defaultScopes: V.defaultScopes.split(",").flatMap((e) => {
|
|
413
412
|
let t = e.trim();
|
|
414
413
|
return t ? [t] : [];
|
|
415
414
|
}),
|
|
416
|
-
supportedFeatures:
|
|
415
|
+
supportedFeatures: V.supportedFeatures.split(",").flatMap((e) => {
|
|
417
416
|
let t = e.trim();
|
|
418
417
|
return t ? [t] : [];
|
|
419
418
|
}),
|
|
420
|
-
oauthConfig:
|
|
421
|
-
availableScopes:
|
|
422
|
-
rateLimitConfig:
|
|
423
|
-
configSchema:
|
|
424
|
-
isEnabled:
|
|
419
|
+
oauthConfig: S(V.oauthConfig, "OAuth config"),
|
|
420
|
+
availableScopes: S(V.availableScopes, "Available scopes"),
|
|
421
|
+
rateLimitConfig: S(V.rateLimitConfig, "Rate limit config"),
|
|
422
|
+
configSchema: S(V.configSchema, "Config schema"),
|
|
423
|
+
isEnabled: V.isEnabled
|
|
425
424
|
};
|
|
426
|
-
if (
|
|
425
|
+
if (E && T) await L(T, e), O?.(n(D, `providers/${T}`));
|
|
427
426
|
else {
|
|
428
|
-
let t = await
|
|
429
|
-
key:
|
|
430
|
-
category:
|
|
431
|
-
authType:
|
|
427
|
+
let t = await F({
|
|
428
|
+
key: V.key.trim(),
|
|
429
|
+
category: V.category,
|
|
430
|
+
authType: V.authType,
|
|
432
431
|
...e
|
|
433
432
|
});
|
|
434
|
-
|
|
433
|
+
O?.(n(D, `providers/${t?.id || ""}`));
|
|
435
434
|
}
|
|
436
435
|
} catch (e) {
|
|
437
|
-
|
|
436
|
+
B(e instanceof Error ? e.message : "Failed to save provider");
|
|
438
437
|
}
|
|
439
438
|
},
|
|
440
|
-
disabled:
|
|
441
|
-
|
|
442
|
-
children: [P || I ? /* @__PURE__ */ h(u, {
|
|
439
|
+
disabled: I || R,
|
|
440
|
+
children: [I || R ? /* @__PURE__ */ h(u, {
|
|
443
441
|
size: 16,
|
|
444
442
|
className: "animate-spin"
|
|
445
|
-
}) : /* @__PURE__ */ h(d, { size: 16 }),
|
|
443
|
+
}) : /* @__PURE__ */ h(d, { size: 16 }), E ? "Save Provider" : "Create Provider"]
|
|
446
444
|
})
|
|
447
445
|
})
|
|
448
446
|
]
|
|
@@ -465,6 +463,6 @@ function C() {
|
|
|
465
463
|
});
|
|
466
464
|
}
|
|
467
465
|
//#endregion
|
|
468
|
-
export {
|
|
466
|
+
export { T as ProviderEditorPage };
|
|
469
467
|
|
|
470
468
|
//# sourceMappingURL=ProviderEditorPage.js.map
|