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