@burdenoff/microfe-devportal 2026.623.9 → 2026.624.2
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/devportal/pages/ApplicationDetailPage.js +314 -125
- package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
- package/dist/devportal/pages/CreateApplicationPage.js +419 -311
- package/dist/devportal/pages/CreateApplicationPage.js.map +1 -1
- package/dist/devportal/types/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,399 +1,507 @@
|
|
|
1
1
|
import { useDevportal as e } from "../providers/DevportalProvider.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { cn as t } from "../utils/cn.js";
|
|
3
|
+
import { useDevportalEventBus as n } from "../events/index.js";
|
|
4
|
+
import { useCreateApplicationMutation as r, useGetMyOrganizationsQuery as i } from "../../generated/global-operations.js";
|
|
4
5
|
import { PageLayout as a, PageSection as o } from "../components/PageLayout.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { PermissionGuard as p } from "../components/PermissionGuard.js";
|
|
6
|
+
import { InputField as s, SelectField as c, TextareaField as l } from "../components/FormField.js";
|
|
7
|
+
import { PermissionGuard as u } from "../components/PermissionGuard.js";
|
|
8
8
|
import "../components/index.js";
|
|
9
|
-
import { DEVPORTAL_PERMISSIONS as
|
|
10
|
-
import "
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
9
|
+
import { DEVPORTAL_PERMISSIONS as d } from "../constants/permissions.js";
|
|
10
|
+
import { useState as f } from "react";
|
|
11
|
+
import { useI18n as p } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
12
|
+
import { ArrowLeft as m, Box as h, Check as g, ChevronRight as _, GitFork as v, Info as y, Loader2 as b, Puzzle as x, Save as ee, X as S } from "lucide-react";
|
|
13
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
15
14
|
//#region src/devportal/pages/CreateApplicationPage.tsx
|
|
16
|
-
var
|
|
17
|
-
value: e,
|
|
18
|
-
label: t
|
|
19
|
-
})), w = [
|
|
15
|
+
var E = [
|
|
20
16
|
{
|
|
21
|
-
|
|
22
|
-
label: "
|
|
17
|
+
id: "auth",
|
|
18
|
+
label: "Authentication",
|
|
19
|
+
description: "User identity and session management"
|
|
23
20
|
},
|
|
24
21
|
{
|
|
25
|
-
|
|
26
|
-
label: "
|
|
22
|
+
id: "billing",
|
|
23
|
+
label: "Billing",
|
|
24
|
+
description: "Billing accounts and subscriptions"
|
|
27
25
|
},
|
|
28
26
|
{
|
|
29
|
-
|
|
30
|
-
label: "
|
|
27
|
+
id: "files",
|
|
28
|
+
label: "Files",
|
|
29
|
+
description: "File storage and management"
|
|
31
30
|
},
|
|
32
31
|
{
|
|
33
|
-
|
|
34
|
-
label: "
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
id: "tags",
|
|
33
|
+
label: "Tags",
|
|
34
|
+
description: "Tags and labels on resources"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: "calendar",
|
|
38
|
+
label: "Calendar",
|
|
39
|
+
description: "Events and scheduling"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: "workflows",
|
|
43
|
+
label: "Workflows",
|
|
44
|
+
description: "Automation workflows"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: "channels",
|
|
48
|
+
label: "Channels",
|
|
49
|
+
description: "Messaging channels"
|
|
50
|
+
},
|
|
37
51
|
{
|
|
38
|
-
|
|
39
|
-
label: "
|
|
52
|
+
id: "notifications",
|
|
53
|
+
label: "Notifications",
|
|
54
|
+
description: "Platform notifications"
|
|
40
55
|
},
|
|
41
56
|
{
|
|
42
|
-
|
|
43
|
-
label: "
|
|
57
|
+
id: "users",
|
|
58
|
+
label: "Users & Members",
|
|
59
|
+
description: "Workspace members and profiles"
|
|
44
60
|
},
|
|
45
61
|
{
|
|
46
|
-
|
|
47
|
-
label: "
|
|
62
|
+
id: "workspaces",
|
|
63
|
+
label: "Workspaces",
|
|
64
|
+
description: "Workspace settings and metadata"
|
|
48
65
|
},
|
|
49
66
|
{
|
|
50
|
-
|
|
51
|
-
label: "
|
|
67
|
+
id: "content",
|
|
68
|
+
label: "Content",
|
|
69
|
+
description: "Pages, documents, and content"
|
|
52
70
|
},
|
|
53
71
|
{
|
|
54
|
-
|
|
55
|
-
label: "
|
|
72
|
+
id: "analytics",
|
|
73
|
+
label: "Analytics",
|
|
74
|
+
description: "Usage analytics and reporting"
|
|
56
75
|
},
|
|
57
76
|
{
|
|
58
|
-
|
|
59
|
-
label: "
|
|
77
|
+
id: "webhooks",
|
|
78
|
+
label: "Webhooks",
|
|
79
|
+
description: "Webhook subscriptions"
|
|
60
80
|
},
|
|
61
81
|
{
|
|
62
|
-
|
|
63
|
-
label: "
|
|
82
|
+
id: "rbac",
|
|
83
|
+
label: "Roles & Permissions",
|
|
84
|
+
description: "Access control configuration"
|
|
64
85
|
}
|
|
65
|
-
]
|
|
66
|
-
|
|
67
|
-
|
|
86
|
+
];
|
|
87
|
+
function D() {
|
|
88
|
+
return Object.fromEntries(E.map((e) => [e.id, "none"]));
|
|
89
|
+
}
|
|
90
|
+
function O(e) {
|
|
91
|
+
return Object.entries(e).filter(([, e]) => e !== "none").map(([e, t]) => ({
|
|
92
|
+
resource: e,
|
|
93
|
+
level: t
|
|
94
|
+
}));
|
|
95
|
+
}
|
|
96
|
+
var k = [
|
|
97
|
+
{
|
|
98
|
+
value: "PUBLIC",
|
|
99
|
+
label: "Public — visible to everyone"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
value: "PRIVATE",
|
|
103
|
+
label: "Private — only visible to you"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
value: "UNLISTED",
|
|
107
|
+
label: "Unlisted — accessible via direct link"
|
|
108
|
+
}
|
|
109
|
+
], A = ({ icon: e, title: n, description: r, bullets: i, selected: a, onClick: o }) => /* @__PURE__ */ T("button", {
|
|
110
|
+
type: "button",
|
|
111
|
+
onClick: o,
|
|
112
|
+
className: t("relative flex flex-col gap-3 rounded-xl border-2 p-6 text-left transition-all hover:border-primary/50 hover:shadow-sm", a ? "border-primary bg-primary/5 shadow-sm" : "border-border bg-card"),
|
|
113
|
+
children: [
|
|
114
|
+
a && /* @__PURE__ */ w("span", {
|
|
115
|
+
className: "absolute top-4 right-4 flex h-5 w-5 items-center justify-center rounded-full bg-primary text-primary-foreground",
|
|
116
|
+
children: /* @__PURE__ */ w(g, { size: 12 })
|
|
117
|
+
}),
|
|
118
|
+
/* @__PURE__ */ w("div", {
|
|
119
|
+
className: "flex h-10 w-10 items-center justify-center rounded-lg bg-muted",
|
|
120
|
+
children: /* @__PURE__ */ w(e, {
|
|
121
|
+
size: 22,
|
|
122
|
+
className: "text-foreground"
|
|
123
|
+
})
|
|
124
|
+
}),
|
|
125
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
126
|
+
className: "font-semibold text-foreground",
|
|
127
|
+
children: n
|
|
128
|
+
}), /* @__PURE__ */ w("p", {
|
|
129
|
+
className: "mt-1 text-sm text-muted-foreground",
|
|
130
|
+
children: r
|
|
131
|
+
})] }),
|
|
132
|
+
/* @__PURE__ */ w("ul", {
|
|
133
|
+
className: "mt-1 space-y-1",
|
|
134
|
+
children: i.map((e) => /* @__PURE__ */ T("li", {
|
|
135
|
+
className: "flex items-center gap-2 text-xs text-muted-foreground",
|
|
136
|
+
children: [/* @__PURE__ */ w(_, {
|
|
137
|
+
size: 12,
|
|
138
|
+
className: "flex-shrink-0 text-primary"
|
|
139
|
+
}), e]
|
|
140
|
+
}, e))
|
|
141
|
+
})
|
|
142
|
+
]
|
|
143
|
+
}), j = ({ permissions: e, onChange: t }) => {
|
|
144
|
+
let n = [
|
|
145
|
+
"none",
|
|
146
|
+
"read",
|
|
147
|
+
"write"
|
|
148
|
+
], r = {
|
|
149
|
+
none: "No access",
|
|
150
|
+
read: "Read",
|
|
151
|
+
write: "Read & Write"
|
|
152
|
+
};
|
|
153
|
+
return /* @__PURE__ */ w("div", {
|
|
154
|
+
className: "overflow-x-auto rounded-lg border border-border",
|
|
155
|
+
children: /* @__PURE__ */ T("table", {
|
|
156
|
+
className: "w-full text-sm",
|
|
157
|
+
children: [/* @__PURE__ */ w("thead", { children: /* @__PURE__ */ T("tr", {
|
|
158
|
+
className: "border-b border-border bg-muted/50",
|
|
159
|
+
children: [/* @__PURE__ */ w("th", {
|
|
160
|
+
className: "px-4 py-3 text-left font-medium text-muted-foreground w-1/2",
|
|
161
|
+
children: "Resource"
|
|
162
|
+
}), n.map((e) => /* @__PURE__ */ w("th", {
|
|
163
|
+
className: "px-4 py-3 text-center font-medium text-muted-foreground",
|
|
164
|
+
children: r[e]
|
|
165
|
+
}, e))]
|
|
166
|
+
}) }), /* @__PURE__ */ w("tbody", {
|
|
167
|
+
className: "divide-y divide-border",
|
|
168
|
+
children: E.map((r) => /* @__PURE__ */ T("tr", {
|
|
169
|
+
className: "hover:bg-muted/30 transition-colors",
|
|
170
|
+
children: [/* @__PURE__ */ T("td", {
|
|
171
|
+
className: "px-4 py-3",
|
|
172
|
+
children: [/* @__PURE__ */ w("p", {
|
|
173
|
+
className: "font-medium text-foreground",
|
|
174
|
+
children: r.label
|
|
175
|
+
}), /* @__PURE__ */ w("p", {
|
|
176
|
+
className: "text-xs text-muted-foreground",
|
|
177
|
+
children: r.description
|
|
178
|
+
})]
|
|
179
|
+
}), n.map((n) => /* @__PURE__ */ w("td", {
|
|
180
|
+
className: "px-4 py-3 text-center",
|
|
181
|
+
children: /* @__PURE__ */ w("input", {
|
|
182
|
+
type: "radio",
|
|
183
|
+
name: `permission-${r.id}`,
|
|
184
|
+
value: n,
|
|
185
|
+
checked: e[r.id] === n,
|
|
186
|
+
onChange: () => t(r.id, n),
|
|
187
|
+
className: "h-4 w-4 accent-primary cursor-pointer"
|
|
188
|
+
})
|
|
189
|
+
}, n))]
|
|
190
|
+
}, r.id))
|
|
191
|
+
})]
|
|
192
|
+
})
|
|
193
|
+
});
|
|
194
|
+
}, M = () => {
|
|
195
|
+
let { navigate: t, basePath: g, activeOrgId: _ } = e(), { t: E } = p(), M = (e, t) => {
|
|
196
|
+
let n = E(e);
|
|
68
197
|
return n === e ? t : n;
|
|
69
|
-
},
|
|
70
|
-
value: "",
|
|
71
|
-
label: "No organization (publish under personal account)"
|
|
72
|
-
}, ...(P?.myDeveloperOrganizations ?? []).map((e) => ({
|
|
73
|
-
value: e.id,
|
|
74
|
-
label: e.name
|
|
75
|
-
}))], R = [{
|
|
76
|
-
value: "",
|
|
77
|
-
label: O("devportal.noLinkedAuthApp", "Link later")
|
|
78
|
-
}, ...(F?.currentUserApps?.apps ?? []).map((e) => ({
|
|
79
|
-
value: e.id,
|
|
80
|
-
label: `${e.name} · ${e.type} · ${e.clientId}`
|
|
81
|
-
})) ?? []], [z, B] = h({
|
|
198
|
+
}, N = n(), [P, F] = f(null), [I, L] = f(D()), [R, z] = f({
|
|
82
199
|
name: "",
|
|
83
200
|
slug: "",
|
|
84
201
|
shortDescription: "",
|
|
85
202
|
description: "",
|
|
86
|
-
appType: "",
|
|
87
203
|
visibility: "PRIVATE",
|
|
88
|
-
|
|
89
|
-
tags: [],
|
|
90
|
-
keywords: [],
|
|
204
|
+
developerOrganizationId: _ ?? "",
|
|
91
205
|
websiteUrl: "",
|
|
92
|
-
documentationUrl: "",
|
|
93
|
-
supportUrl: "",
|
|
94
|
-
privacyPolicyUrl: "",
|
|
95
|
-
termsOfServiceUrl: "",
|
|
96
206
|
githubUrl: "",
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
},
|
|
207
|
+
documentationUrl: "",
|
|
208
|
+
supportUrl: ""
|
|
209
|
+
}), [B, V] = f({}), [H, { loading: U }] = r(), { data: W } = i({ fetchPolicy: "cache-and-network" }), G = [{
|
|
210
|
+
value: "",
|
|
211
|
+
label: "No organization (personal)"
|
|
212
|
+
}, ...(W?.myDeveloperOrganizations ?? []).map((e) => ({
|
|
213
|
+
value: e.id,
|
|
214
|
+
label: e.name
|
|
215
|
+
}))], K = (e) => t?.(`${g}${e}`), q = (e) => e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, ""), J = (e) => {
|
|
103
216
|
let t = e.target.value;
|
|
104
|
-
|
|
217
|
+
z((e) => ({
|
|
105
218
|
...e,
|
|
106
219
|
name: t,
|
|
107
|
-
slug: e.slug ||
|
|
108
|
-
})),
|
|
220
|
+
slug: e.slug || q(t)
|
|
221
|
+
})), B.name && V((e) => ({
|
|
109
222
|
...e,
|
|
110
223
|
name: void 0
|
|
111
224
|
}));
|
|
112
|
-
},
|
|
113
|
-
|
|
225
|
+
}, Y = (e, t) => {
|
|
226
|
+
z((n) => ({
|
|
114
227
|
...n,
|
|
115
228
|
[e]: t
|
|
116
|
-
})),
|
|
229
|
+
})), B[e] && V((t) => ({
|
|
117
230
|
...t,
|
|
118
231
|
[e]: void 0
|
|
119
232
|
}));
|
|
120
|
-
},
|
|
233
|
+
}, X = (e, t) => {
|
|
234
|
+
L((n) => ({
|
|
235
|
+
...n,
|
|
236
|
+
[e]: t
|
|
237
|
+
}));
|
|
238
|
+
}, Z = () => {
|
|
121
239
|
let e = {};
|
|
122
|
-
return
|
|
240
|
+
return R.name.trim() ? R.name.length < 3 ? e.name = "Name must be at least 3 characters" : R.name.length > 100 && (e.name = "Name must be less than 100 characters") : e.name = "Name is required", R.slug.trim() ? /^[a-z0-9-]+$/.test(R.slug) || (e.slug = "Slug can only contain lowercase letters, numbers, and hyphens") : e.slug = "Slug is required", R.shortDescription.trim() ? R.shortDescription.length > 200 && (e.shortDescription = "Short description must be less than 200 characters") : e.shortDescription = "Short description is required", V(e), Object.keys(e).length === 0;
|
|
241
|
+
}, Q = () => P === "node" ? "NODE" : P === "workflow" ? "WORKFLOW" : "API_INTEGRATION", te = async (e) => {
|
|
242
|
+
if (e.preventDefault(), !Z() || !P) return;
|
|
243
|
+
let t = P === "app" ? { permissions: O(I) } : null;
|
|
244
|
+
try {
|
|
245
|
+
let e = await H({ variables: { input: {
|
|
246
|
+
name: R.name,
|
|
247
|
+
slug: R.slug || void 0,
|
|
248
|
+
shortDescription: R.shortDescription || void 0,
|
|
249
|
+
description: R.description || void 0,
|
|
250
|
+
appType: Q(),
|
|
251
|
+
visibility: R.visibility,
|
|
252
|
+
developerOrganizationId: R.developerOrganizationId || void 0,
|
|
253
|
+
websiteUrl: R.websiteUrl || void 0,
|
|
254
|
+
githubUrl: R.githubUrl || void 0,
|
|
255
|
+
documentationUrl: R.documentationUrl || void 0,
|
|
256
|
+
supportUrl: R.supportUrl || void 0,
|
|
257
|
+
manifest: t ?? void 0
|
|
258
|
+
} } });
|
|
259
|
+
e.data?.createApplication?.id && (N.emit("devportal.app.created", {
|
|
260
|
+
appId: e.data.createApplication.id,
|
|
261
|
+
name: R.name,
|
|
262
|
+
appType: Q(),
|
|
263
|
+
organizationId: R.developerOrganizationId || null
|
|
264
|
+
}), K(`/apps/${e.data.createApplication.id}`));
|
|
265
|
+
} catch (e) {
|
|
266
|
+
let t = e instanceof Error ? e.message : String(e);
|
|
267
|
+
(t.includes("slug") || t.includes("already exists") || t.includes("slugConflict")) && V((e) => ({
|
|
268
|
+
...e,
|
|
269
|
+
slug: "This slug is already in use — try a different name"
|
|
270
|
+
}));
|
|
271
|
+
}
|
|
123
272
|
};
|
|
124
|
-
return /* @__PURE__ */
|
|
125
|
-
permission:
|
|
126
|
-
children: /* @__PURE__ */
|
|
127
|
-
title:
|
|
128
|
-
description:
|
|
129
|
-
backLink: `${
|
|
130
|
-
backLabel:
|
|
131
|
-
children: /* @__PURE__ */
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
273
|
+
if (!P) return /* @__PURE__ */ w(u, {
|
|
274
|
+
permission: d.APP_CREATE,
|
|
275
|
+
children: /* @__PURE__ */ w(a, {
|
|
276
|
+
title: "What do you want to build?",
|
|
277
|
+
description: "Choose a builder type to get started",
|
|
278
|
+
backLink: `${g}/apps`,
|
|
279
|
+
backLabel: "Back to Applications",
|
|
280
|
+
children: /* @__PURE__ */ T("div", {
|
|
281
|
+
className: "max-w-3xl space-y-6",
|
|
282
|
+
children: [/* @__PURE__ */ T("div", {
|
|
283
|
+
className: "grid gap-4 sm:grid-cols-3",
|
|
284
|
+
children: [
|
|
285
|
+
/* @__PURE__ */ w(A, {
|
|
286
|
+
icon: h,
|
|
287
|
+
title: "App",
|
|
288
|
+
description: "Build integrations that connect your service to the platform using OAuth tokens.",
|
|
289
|
+
bullets: [
|
|
290
|
+
"GitHub-style permissions",
|
|
291
|
+
"OAuth token flow",
|
|
292
|
+
"Webhook events",
|
|
293
|
+
"Publish to app store"
|
|
294
|
+
],
|
|
295
|
+
selected: P === "app",
|
|
296
|
+
onClick: () => F("app")
|
|
297
|
+
}),
|
|
298
|
+
/* @__PURE__ */ w(A, {
|
|
299
|
+
icon: x,
|
|
300
|
+
title: "Node",
|
|
301
|
+
description: "Build custom FluidGrids nodes that users can drag into their visual workflows.",
|
|
302
|
+
bullets: [
|
|
303
|
+
"ZIP bundle + manifest",
|
|
304
|
+
"Custom inputs/outputs",
|
|
305
|
+
"Versioned releases",
|
|
306
|
+
"Publish to node store"
|
|
307
|
+
],
|
|
308
|
+
selected: P === "node",
|
|
309
|
+
onClick: () => F("node")
|
|
310
|
+
}),
|
|
311
|
+
/* @__PURE__ */ w(A, {
|
|
312
|
+
icon: v,
|
|
313
|
+
title: "Workflow",
|
|
314
|
+
description: "Build reusable automation workflows that users can import and customize.",
|
|
315
|
+
bullets: [
|
|
316
|
+
"Manifest + workflow JSON",
|
|
317
|
+
"Trigger definitions",
|
|
318
|
+
"Versioned releases",
|
|
319
|
+
"Publish to workflow store"
|
|
320
|
+
],
|
|
321
|
+
selected: P === "workflow",
|
|
322
|
+
onClick: () => F("workflow")
|
|
323
|
+
})
|
|
324
|
+
]
|
|
325
|
+
}), /* @__PURE__ */ T("div", {
|
|
326
|
+
className: "rounded-lg border border-border-subtle bg-muted/30 p-4 flex gap-3 text-sm text-muted-foreground",
|
|
327
|
+
children: [/* @__PURE__ */ w(y, {
|
|
328
|
+
size: 16,
|
|
329
|
+
className: "flex-shrink-0 mt-0.5"
|
|
330
|
+
}), /* @__PURE__ */ w("p", { children: "Apps use OAuth to interact with platform data. Nodes and Workflows are packaged files you upload after creation." })]
|
|
331
|
+
})]
|
|
332
|
+
})
|
|
333
|
+
})
|
|
334
|
+
});
|
|
335
|
+
let $ = P === "app" ? "App" : P === "node" ? "Node" : "Workflow", ne = w(P === "app" ? h : P === "node" ? x : v, { size: 16 });
|
|
336
|
+
return /* @__PURE__ */ w(u, {
|
|
337
|
+
permission: d.APP_CREATE,
|
|
338
|
+
children: /* @__PURE__ */ w(a, {
|
|
339
|
+
title: `Create ${$}`,
|
|
340
|
+
description: P === "app" ? "Register a new app integration with OAuth permissions" : P === "node" ? "Register a new FluidGrids node package" : "Register a new reusable automation workflow",
|
|
341
|
+
backLink: `${g}/apps`,
|
|
342
|
+
backLabel: "Back to Applications",
|
|
343
|
+
children: /* @__PURE__ */ T("form", {
|
|
344
|
+
onSubmit: te,
|
|
169
345
|
className: "space-y-8 max-w-3xl",
|
|
170
346
|
children: [
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
347
|
+
/* @__PURE__ */ T("div", {
|
|
348
|
+
className: "flex items-center gap-3",
|
|
349
|
+
children: [/* @__PURE__ */ T("button", {
|
|
350
|
+
type: "button",
|
|
351
|
+
onClick: () => F(null),
|
|
352
|
+
className: "flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground transition-colors",
|
|
353
|
+
children: [/* @__PURE__ */ w(m, { size: 14 }), "Change type"]
|
|
354
|
+
}), /* @__PURE__ */ T("span", {
|
|
355
|
+
className: "flex items-center gap-1.5 rounded-full border border-border bg-muted px-3 py-1 text-xs font-medium",
|
|
356
|
+
children: [ne, $]
|
|
357
|
+
})]
|
|
358
|
+
}),
|
|
359
|
+
/* @__PURE__ */ w(o, {
|
|
360
|
+
title: "Basic Information",
|
|
361
|
+
description: "Core details about your application",
|
|
362
|
+
children: /* @__PURE__ */ T("div", {
|
|
175
363
|
className: "space-y-4",
|
|
176
364
|
children: [
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
label:
|
|
179
|
-
value:
|
|
180
|
-
onChange:
|
|
181
|
-
placeholder:
|
|
365
|
+
/* @__PURE__ */ w(s, {
|
|
366
|
+
label: "Name",
|
|
367
|
+
value: R.name,
|
|
368
|
+
onChange: J,
|
|
369
|
+
placeholder: P === "app" ? "My Integration" : P === "node" ? "HTTP Request" : "Onboarding Flow",
|
|
182
370
|
required: !0,
|
|
183
|
-
error:
|
|
184
|
-
hint: O("devportal.applicationNameHint", "Choose a memorable name for your application")
|
|
371
|
+
error: B.name
|
|
185
372
|
}),
|
|
186
|
-
/* @__PURE__ */
|
|
187
|
-
label:
|
|
188
|
-
value:
|
|
189
|
-
onChange: (e) =>
|
|
190
|
-
placeholder:
|
|
373
|
+
/* @__PURE__ */ w(s, {
|
|
374
|
+
label: "Slug",
|
|
375
|
+
value: R.slug,
|
|
376
|
+
onChange: (e) => Y("slug", e.target.value.toLowerCase()),
|
|
377
|
+
placeholder: "my-integration",
|
|
191
378
|
required: !0,
|
|
192
|
-
error:
|
|
193
|
-
hint:
|
|
379
|
+
error: B.slug,
|
|
380
|
+
hint: "URL-friendly identifier (auto-generated from name)"
|
|
194
381
|
}),
|
|
195
|
-
/* @__PURE__ */
|
|
196
|
-
label:
|
|
197
|
-
value:
|
|
198
|
-
onChange: (e) =>
|
|
199
|
-
placeholder:
|
|
382
|
+
/* @__PURE__ */ w(l, {
|
|
383
|
+
label: "Short Description",
|
|
384
|
+
value: R.shortDescription,
|
|
385
|
+
onChange: (e) => Y("shortDescription", e.target.value),
|
|
386
|
+
placeholder: "Briefly describe what this does",
|
|
200
387
|
required: !0,
|
|
201
|
-
error:
|
|
202
|
-
hint: `${
|
|
388
|
+
error: B.shortDescription,
|
|
389
|
+
hint: `${R.shortDescription.length}/200 characters`,
|
|
203
390
|
rows: 2
|
|
204
391
|
}),
|
|
205
|
-
/* @__PURE__ */
|
|
206
|
-
label:
|
|
207
|
-
value:
|
|
208
|
-
onChange: (e) =>
|
|
209
|
-
placeholder:
|
|
210
|
-
rows:
|
|
211
|
-
hint:
|
|
392
|
+
/* @__PURE__ */ w(l, {
|
|
393
|
+
label: "Full Description",
|
|
394
|
+
value: R.description,
|
|
395
|
+
onChange: (e) => Y("description", e.target.value),
|
|
396
|
+
placeholder: "Detailed description, features, and use cases...",
|
|
397
|
+
rows: 5,
|
|
398
|
+
hint: "Markdown supported"
|
|
212
399
|
})
|
|
213
400
|
]
|
|
214
401
|
})
|
|
215
402
|
}),
|
|
216
|
-
/* @__PURE__ */
|
|
217
|
-
title:
|
|
218
|
-
description:
|
|
219
|
-
children:
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
}),
|
|
232
|
-
/* @__PURE__ */ x(u, {
|
|
233
|
-
label: O("devportal.category", "Category"),
|
|
234
|
-
value: z.category,
|
|
235
|
-
onChange: (e) => W("category", e.target.value),
|
|
236
|
-
options: T,
|
|
237
|
-
required: !0,
|
|
238
|
-
error: k.category,
|
|
239
|
-
placeholder: O("devportal.selectCategory", "Select category")
|
|
240
|
-
}),
|
|
241
|
-
/* @__PURE__ */ x(u, {
|
|
242
|
-
label: O("devportal.visibility", "Visibility"),
|
|
243
|
-
value: z.visibility,
|
|
244
|
-
onChange: (e) => W("visibility", e.target.value),
|
|
245
|
-
options: w,
|
|
246
|
-
hint: O("devportal.visibilityHint", "Controls who can see this app once published. Public apps still require admin review and approval before appearing in the store.")
|
|
247
|
-
}),
|
|
248
|
-
/* @__PURE__ */ x(u, {
|
|
249
|
-
label: O("devportal.developerOrganization", "Developer Organization"),
|
|
250
|
-
value: z.developerOrganizationId,
|
|
251
|
-
onChange: (e) => W("developerOrganizationId", e.target.value),
|
|
252
|
-
options: L,
|
|
253
|
-
hint: O("devportal.developerOrganizationHint", "Optional: Associate with an organization")
|
|
254
|
-
})
|
|
255
|
-
]
|
|
256
|
-
}),
|
|
257
|
-
/* @__PURE__ */ x(d, {
|
|
258
|
-
label: O("devportal.tags", "Tags"),
|
|
259
|
-
value: z.tags,
|
|
260
|
-
onChange: (e) => W("tags", e),
|
|
261
|
-
placeholder: O("devportal.addTagsPlaceholder", "Add tags (press Enter)"),
|
|
262
|
-
hint: O("devportal.tagsHint", "Help users discover your app")
|
|
263
|
-
}),
|
|
264
|
-
/* @__PURE__ */ x(d, {
|
|
265
|
-
label: O("devportal.keywords", "Keywords"),
|
|
266
|
-
value: z.keywords,
|
|
267
|
-
onChange: (e) => W("keywords", e),
|
|
268
|
-
placeholder: O("devportal.addKeywordsPlaceholder", "Add keywords (press Enter)"),
|
|
269
|
-
hint: O("devportal.keywordsHint", "Improve search visibility")
|
|
270
|
-
})
|
|
271
|
-
]
|
|
272
|
-
}),
|
|
273
|
-
/* @__PURE__ */ x(o, {
|
|
274
|
-
title: O("devportal.authenticationAndAuthorization", "Authentication & Authorization"),
|
|
275
|
-
description: O("devportal.authenticationAndAuthorizationDescription", "Link this marketplace app to an auth app for OAuth, client credentials, API keys, delegation, and device flows."),
|
|
276
|
-
children: /* @__PURE__ */ S("div", {
|
|
277
|
-
className: "space-y-4",
|
|
278
|
-
children: [/* @__PURE__ */ x(u, {
|
|
279
|
-
label: O("devportal.linkedAuthApp", "Linked Auth App"),
|
|
280
|
-
value: z.appId,
|
|
281
|
-
onChange: (e) => W("appId", e.target.value),
|
|
282
|
-
options: R,
|
|
283
|
-
hint: O("devportal.linkedAuthAppHint", "Select an existing auth app or create one first. You can still configure scopes, client credentials, app-as-user delegation, and device code in the OAuth Clients area."),
|
|
284
|
-
placeholder: I ? O("devportal.loadingAuthApps", "Loading auth apps...") : O("devportal.selectAuthApp", "Select auth app")
|
|
285
|
-
}), /* @__PURE__ */ S("button", {
|
|
286
|
-
type: "button",
|
|
287
|
-
onClick: () => V("/oauth/new"),
|
|
288
|
-
className: "inline-flex items-center gap-2 rounded-md border px-3 py-2 text-sm font-medium hover:bg-muted transition-colors",
|
|
289
|
-
children: [/* @__PURE__ */ x(v, { size: 14 }), O("devportal.createAuthAppFirst", "Create Auth App")]
|
|
403
|
+
/* @__PURE__ */ w(o, {
|
|
404
|
+
title: "Publish Settings",
|
|
405
|
+
description: "Control who can see this and which organization it belongs to",
|
|
406
|
+
children: /* @__PURE__ */ T("div", {
|
|
407
|
+
className: "grid gap-4 sm:grid-cols-2",
|
|
408
|
+
children: [/* @__PURE__ */ w(c, {
|
|
409
|
+
label: "Visibility",
|
|
410
|
+
value: R.visibility,
|
|
411
|
+
onChange: (e) => Y("visibility", e.target.value),
|
|
412
|
+
options: k
|
|
413
|
+
}), /* @__PURE__ */ w(c, {
|
|
414
|
+
label: "Developer Organization",
|
|
415
|
+
value: R.developerOrganizationId,
|
|
416
|
+
onChange: (e) => Y("developerOrganizationId", e.target.value),
|
|
417
|
+
options: G
|
|
290
418
|
})]
|
|
291
419
|
})
|
|
292
420
|
}),
|
|
293
|
-
/* @__PURE__ */
|
|
294
|
-
title:
|
|
295
|
-
description:
|
|
296
|
-
children: /* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ w(o, {
|
|
422
|
+
title: "Links",
|
|
423
|
+
description: "External resources",
|
|
424
|
+
children: /* @__PURE__ */ T("div", {
|
|
297
425
|
className: "grid gap-4 sm:grid-cols-2",
|
|
298
426
|
children: [
|
|
299
|
-
/* @__PURE__ */
|
|
300
|
-
label:
|
|
427
|
+
/* @__PURE__ */ w(s, {
|
|
428
|
+
label: "Website URL",
|
|
301
429
|
type: "url",
|
|
302
|
-
value:
|
|
303
|
-
onChange: (e) =>
|
|
430
|
+
value: R.websiteUrl,
|
|
431
|
+
onChange: (e) => Y("websiteUrl", e.target.value),
|
|
304
432
|
placeholder: "https://example.com"
|
|
305
433
|
}),
|
|
306
|
-
/* @__PURE__ */
|
|
307
|
-
label:
|
|
434
|
+
/* @__PURE__ */ w(s, {
|
|
435
|
+
label: "GitHub URL",
|
|
308
436
|
type: "url",
|
|
309
|
-
value:
|
|
310
|
-
onChange: (e) =>
|
|
311
|
-
placeholder: "https://docs.example.com"
|
|
312
|
-
}),
|
|
313
|
-
/* @__PURE__ */ x(l, {
|
|
314
|
-
label: O("devportal.supportUrl", "Support URL"),
|
|
315
|
-
type: "url",
|
|
316
|
-
value: z.supportUrl,
|
|
317
|
-
onChange: (e) => W("supportUrl", e.target.value),
|
|
318
|
-
placeholder: "https://support.example.com"
|
|
319
|
-
}),
|
|
320
|
-
/* @__PURE__ */ x(l, {
|
|
321
|
-
label: O("devportal.githubUrl", "GitHub URL"),
|
|
322
|
-
type: "url",
|
|
323
|
-
value: z.githubUrl,
|
|
324
|
-
onChange: (e) => W("githubUrl", e.target.value),
|
|
437
|
+
value: R.githubUrl,
|
|
438
|
+
onChange: (e) => Y("githubUrl", e.target.value),
|
|
325
439
|
placeholder: "https://github.com/org/repo"
|
|
326
440
|
}),
|
|
327
|
-
/* @__PURE__ */
|
|
328
|
-
label:
|
|
441
|
+
/* @__PURE__ */ w(s, {
|
|
442
|
+
label: "Documentation URL",
|
|
329
443
|
type: "url",
|
|
330
|
-
value:
|
|
331
|
-
onChange: (e) =>
|
|
332
|
-
placeholder: "https://example.com
|
|
444
|
+
value: R.documentationUrl,
|
|
445
|
+
onChange: (e) => Y("documentationUrl", e.target.value),
|
|
446
|
+
placeholder: "https://docs.example.com"
|
|
333
447
|
}),
|
|
334
|
-
/* @__PURE__ */
|
|
335
|
-
label:
|
|
448
|
+
/* @__PURE__ */ w(s, {
|
|
449
|
+
label: "Support URL",
|
|
336
450
|
type: "url",
|
|
337
|
-
value:
|
|
338
|
-
onChange: (e) =>
|
|
339
|
-
placeholder: "https://example.com
|
|
451
|
+
value: R.supportUrl,
|
|
452
|
+
onChange: (e) => Y("supportUrl", e.target.value),
|
|
453
|
+
placeholder: "https://support.example.com"
|
|
340
454
|
})
|
|
341
455
|
]
|
|
342
456
|
})
|
|
343
457
|
}),
|
|
344
|
-
/* @__PURE__ */
|
|
345
|
-
title:
|
|
346
|
-
description:
|
|
347
|
-
children: [/* @__PURE__ */
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
className: "rounded-lg border border-border-subtle bg-status-info-bg-subtle p-4 flex gap-3",
|
|
357
|
-
children: [/* @__PURE__ */ x(_, {
|
|
358
|
-
size: 20,
|
|
359
|
-
className: "text-accent-blue flex-shrink-0 mt-0.5"
|
|
360
|
-
}), /* @__PURE__ */ S("div", {
|
|
361
|
-
className: "text-sm text-status-info-text",
|
|
362
|
-
children: [/* @__PURE__ */ x("p", {
|
|
363
|
-
className: "font-medium",
|
|
364
|
-
children: O("devportal.whatHappensNext", "What happens next?")
|
|
365
|
-
}), /* @__PURE__ */ S("ul", {
|
|
366
|
-
className: "mt-1 space-y-1 text-status-info-text",
|
|
367
|
-
children: [
|
|
368
|
-
/* @__PURE__ */ S("li", { children: [
|
|
369
|
-
O("devportal.appCreatedInDraft", "Your app will be created in"),
|
|
370
|
-
" ",
|
|
371
|
-
/* @__PURE__ */ x("strong", { children: O("devportal.draft", "Draft") }),
|
|
372
|
-
" ",
|
|
373
|
-
O("devportal.status", "status")
|
|
374
|
-
] }),
|
|
375
|
-
/* @__PURE__ */ x("li", { children: O("devportal.canConfigureOAuthAndWebhooks", "You can configure OAuth clients, API keys, and webhooks") }),
|
|
376
|
-
/* @__PURE__ */ x("li", { children: O("devportal.submitForReviewWhenReady", "Submit for review when ready to publish to the marketplace") })
|
|
377
|
-
]
|
|
378
|
-
})]
|
|
379
|
-
})]
|
|
458
|
+
P === "app" && /* @__PURE__ */ T(o, {
|
|
459
|
+
title: "Permissions",
|
|
460
|
+
description: "Choose what data your app can access. Users will see these permissions when authorizing your app — like GitHub Apps.",
|
|
461
|
+
children: [/* @__PURE__ */ w(j, {
|
|
462
|
+
permissions: I,
|
|
463
|
+
onChange: X
|
|
464
|
+
}), /* @__PURE__ */ T("div", {
|
|
465
|
+
className: "mt-3 flex gap-2 rounded-lg border border-border-subtle bg-muted/30 p-3 text-xs text-muted-foreground",
|
|
466
|
+
children: [/* @__PURE__ */ w(y, {
|
|
467
|
+
size: 14,
|
|
468
|
+
className: "flex-shrink-0 mt-0.5"
|
|
469
|
+
}), /* @__PURE__ */ T("span", { children: [/* @__PURE__ */ w("strong", { children: "Read & Write" }), " implies Read. Select only what your app genuinely needs — fewer permissions build more user trust."] })]
|
|
380
470
|
})]
|
|
381
471
|
}),
|
|
382
|
-
/* @__PURE__ */
|
|
472
|
+
P !== "app" && /* @__PURE__ */ T("div", {
|
|
473
|
+
className: "rounded-lg border border-border-subtle bg-muted/30 p-4 flex gap-3 text-sm text-muted-foreground",
|
|
474
|
+
children: [/* @__PURE__ */ w(y, {
|
|
475
|
+
size: 16,
|
|
476
|
+
className: "flex-shrink-0 mt-0.5"
|
|
477
|
+
}), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
478
|
+
className: "font-medium text-foreground",
|
|
479
|
+
children: "File uploads"
|
|
480
|
+
}), /* @__PURE__ */ w("p", {
|
|
481
|
+
className: "mt-1",
|
|
482
|
+
children: P === "node" ? "After creating your Node, go to the Versions tab to upload your ZIP bundle and manifest.json." : "After creating your Workflow, go to the Versions tab to upload your manifest and workflow JSON definition."
|
|
483
|
+
})] })]
|
|
484
|
+
}),
|
|
485
|
+
/* @__PURE__ */ T("div", {
|
|
383
486
|
className: "flex items-center justify-end gap-3 border-t pt-6",
|
|
384
|
-
children: [/* @__PURE__ */
|
|
487
|
+
children: [/* @__PURE__ */ T("button", {
|
|
385
488
|
type: "button",
|
|
386
|
-
onClick: () =>
|
|
387
|
-
|
|
388
|
-
},
|
|
389
|
-
disabled: M,
|
|
489
|
+
onClick: () => K("/apps"),
|
|
490
|
+
disabled: U,
|
|
390
491
|
className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors disabled:opacity-50",
|
|
391
|
-
children: [/* @__PURE__ */
|
|
392
|
-
}), /* @__PURE__ */
|
|
492
|
+
children: [/* @__PURE__ */ w(S, { size: 16 }), M("devportal.cancel", "Cancel")]
|
|
493
|
+
}), /* @__PURE__ */ w("button", {
|
|
393
494
|
type: "submit",
|
|
394
|
-
disabled:
|
|
495
|
+
disabled: U,
|
|
395
496
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
|
|
396
|
-
children:
|
|
497
|
+
children: U ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(b, {
|
|
498
|
+
size: 16,
|
|
499
|
+
className: "animate-spin"
|
|
500
|
+
}), "Creating…"] }) : /* @__PURE__ */ T(C, { children: [
|
|
501
|
+
/* @__PURE__ */ w(ee, { size: 16 }),
|
|
502
|
+
"Create ",
|
|
503
|
+
$
|
|
504
|
+
] })
|
|
397
505
|
})]
|
|
398
506
|
})
|
|
399
507
|
]
|
|
@@ -402,6 +510,6 @@ var C = Object.entries(s).map(([e, t]) => ({
|
|
|
402
510
|
});
|
|
403
511
|
};
|
|
404
512
|
//#endregion
|
|
405
|
-
export {
|
|
513
|
+
export { M as CreateApplicationPage };
|
|
406
514
|
|
|
407
515
|
//# sourceMappingURL=CreateApplicationPage.js.map
|