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