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