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