@burdenoff/microfe-devportal 2026.724.1 → 2026.728.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/hooks/usePackageUpload.d.ts.map +1 -1
- package/dist/devportal/hooks/usePackageUpload.js.map +1 -1
- package/dist/devportal/pages/ApplicationDetailPage.d.ts.map +1 -1
- package/dist/devportal/pages/ApplicationDetailPage.js +8 -2
- package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationVersionsPage.d.ts.map +1 -1
- package/dist/devportal/pages/ApplicationVersionsPage.js +276 -271
- package/dist/devportal/pages/ApplicationVersionsPage.js.map +1 -1
- package/dist/devportal/pages/CreateApplicationPage.d.ts.map +1 -1
- package/dist/devportal/pages/CreateApplicationPage.js +288 -220
- package/dist/devportal/pages/CreateApplicationPage.js.map +1 -1
- package/dist/devportal/pages/EditApplicationPage.d.ts.map +1 -1
- package/dist/devportal/pages/EditApplicationPage.js.map +1 -1
- package/dist/devportal/pages/PublishPage.d.ts.map +1 -1
- package/dist/devportal/pages/PublishPage.js.map +1 -1
- package/dist/devportal/pages/SellerDashboardPage.d.ts.map +1 -1
- package/dist/devportal/pages/SellerDashboardPage.js.map +1 -1
- package/dist/devportal/pages/SellerItemsPage.d.ts.map +1 -1
- package/dist/devportal/pages/SellerItemsPage.js.map +1 -1
- package/dist/devportal/types/index.d.ts.map +1 -1
- package/dist/devportal/types/index.js.map +1 -1
- package/dist/devportal/utils/constants.d.ts.map +1 -1
- package/dist/devportal/utils/constants.js +3 -1
- package/dist/devportal/utils/constants.js.map +1 -1
- package/package.json +1 -1
|
@@ -8,11 +8,102 @@ import { PermissionGuard as l } from "../components/PermissionGuard.js";
|
|
|
8
8
|
import { MarkdownEditor as u } from "../components/MarkdownEditor.js";
|
|
9
9
|
import "../components/index.js";
|
|
10
10
|
import { useRef as ee, useState as d } from "react";
|
|
11
|
-
import { useI18n as
|
|
12
|
-
import { ArrowLeft as
|
|
13
|
-
import { Fragment as
|
|
11
|
+
import { useI18n as f } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
12
|
+
import { ArrowLeft as p, Box as m, Check as h, ChevronRight as g, FileCode2 as _, GitFork as v, Info as y, LayoutDashboard as b, LayoutGrid as x, Loader2 as te, Puzzle as S, Save as ne, X as re } from "lucide-react";
|
|
13
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
14
14
|
//#region src/devportal/pages/CreateApplicationPage.tsx
|
|
15
|
-
var
|
|
15
|
+
var E = {
|
|
16
|
+
app: {
|
|
17
|
+
appType: "API_INTEGRATION",
|
|
18
|
+
icon: m,
|
|
19
|
+
label: "App",
|
|
20
|
+
pageDescription: "Register a new app integration with OAuth permissions",
|
|
21
|
+
purpose: "Give your integration a name, description, and the permissions it will request. Once created you will get credentials and can configure webhooks, then publish it to the marketplace when it is ready for users.",
|
|
22
|
+
namePlaceholder: "My Integration",
|
|
23
|
+
cardDescription: "Build integrations that connect your service to the platform using OAuth tokens.",
|
|
24
|
+
cardBullets: [
|
|
25
|
+
"GitHub-style permissions",
|
|
26
|
+
"OAuth token flow",
|
|
27
|
+
"Webhook events",
|
|
28
|
+
"Publish to app store"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
node: {
|
|
32
|
+
appType: "NODE",
|
|
33
|
+
icon: S,
|
|
34
|
+
label: "Node",
|
|
35
|
+
pageDescription: "Register a new FluidGrids node package",
|
|
36
|
+
purpose: "Give your node a name and description. Once created you can upload your ZIP bundle and manifest in the Versions tab, then publish it to the node store when it is ready for users.",
|
|
37
|
+
namePlaceholder: "HTTP Request",
|
|
38
|
+
cardDescription: "Build custom FluidGrids nodes that users can drag into their visual workflows.",
|
|
39
|
+
cardBullets: [
|
|
40
|
+
"ZIP bundle + manifest",
|
|
41
|
+
"Custom inputs/outputs",
|
|
42
|
+
"Versioned releases",
|
|
43
|
+
"Publish to node store"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
workflow: {
|
|
47
|
+
appType: "WORKFLOW",
|
|
48
|
+
icon: v,
|
|
49
|
+
label: "Workflow",
|
|
50
|
+
pageDescription: "Register a new reusable automation workflow",
|
|
51
|
+
purpose: "Give your workflow a name and description. Once created you can upload your workflow definition in the Versions tab, then publish it to the store or generate a shareable public link.",
|
|
52
|
+
namePlaceholder: "Onboarding Flow",
|
|
53
|
+
cardDescription: "Build reusable automation workflows that users can import and customize.",
|
|
54
|
+
cardBullets: [
|
|
55
|
+
"Manifest + workflow JSON",
|
|
56
|
+
"Trigger definitions",
|
|
57
|
+
"Versioned releases",
|
|
58
|
+
"Publish to workflow store"
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
parser: {
|
|
62
|
+
appType: "PARSER",
|
|
63
|
+
icon: _,
|
|
64
|
+
label: "Parser",
|
|
65
|
+
pageDescription: "Register a new data parser",
|
|
66
|
+
purpose: "Give your parser a name and description. Once created you can upload its manifest in the Versions tab, then publish it to the store when it is ready for users.",
|
|
67
|
+
namePlaceholder: "CSV Parser",
|
|
68
|
+
cardDescription: "Build parsers that extract structured data from files or feeds for use across the platform.",
|
|
69
|
+
cardBullets: [
|
|
70
|
+
"Manifest JSON only",
|
|
71
|
+
"No ZIP bundle needed",
|
|
72
|
+
"Versioned releases",
|
|
73
|
+
"Publish to store"
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
widget: {
|
|
77
|
+
appType: "WIDGET",
|
|
78
|
+
icon: x,
|
|
79
|
+
label: "Widget",
|
|
80
|
+
pageDescription: "Register a new embeddable widget",
|
|
81
|
+
purpose: "Give your widget a name and description. Once created you can upload its manifest in the Versions tab, then publish it to the store when it is ready for users.",
|
|
82
|
+
namePlaceholder: "Revenue Chart Widget",
|
|
83
|
+
cardDescription: "Build embeddable UI widgets users can add to dashboards and pages.",
|
|
84
|
+
cardBullets: [
|
|
85
|
+
"Manifest JSON only",
|
|
86
|
+
"Embeddable UI component",
|
|
87
|
+
"Versioned releases",
|
|
88
|
+
"Publish to store"
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
dashboard: {
|
|
92
|
+
appType: "DASHBOARD",
|
|
93
|
+
icon: b,
|
|
94
|
+
label: "Dashboard Template",
|
|
95
|
+
pageDescription: "Register a new dashboard template",
|
|
96
|
+
purpose: "Give your dashboard template a name and description. Once created you can upload its manifest in the Versions tab, then publish it to the store when it is ready for users.",
|
|
97
|
+
namePlaceholder: "Sales Overview Dashboard",
|
|
98
|
+
cardDescription: "Build prebuilt dashboard layouts users can install and customize.",
|
|
99
|
+
cardBullets: [
|
|
100
|
+
"Manifest JSON only",
|
|
101
|
+
"Prebuilt layout",
|
|
102
|
+
"Versioned releases",
|
|
103
|
+
"Publish to store"
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
}, D = [
|
|
16
107
|
{
|
|
17
108
|
id: "auth",
|
|
18
109
|
label: "Authentication",
|
|
@@ -84,16 +175,16 @@ var T = [
|
|
|
84
175
|
description: "Access control configuration"
|
|
85
176
|
}
|
|
86
177
|
];
|
|
87
|
-
function
|
|
88
|
-
return Object.fromEntries(
|
|
178
|
+
function O() {
|
|
179
|
+
return Object.fromEntries(D.map((e) => [e.id, "none"]));
|
|
89
180
|
}
|
|
90
|
-
function
|
|
181
|
+
function k(e) {
|
|
91
182
|
return Object.entries(e).filter(([, e]) => e !== "none").map(([e, t]) => ({
|
|
92
183
|
resource: e,
|
|
93
184
|
level: t
|
|
94
185
|
}));
|
|
95
186
|
}
|
|
96
|
-
var
|
|
187
|
+
var A = [
|
|
97
188
|
{
|
|
98
189
|
value: "PUBLIC",
|
|
99
190
|
label: "Public — listed in the marketplace after review"
|
|
@@ -106,10 +197,10 @@ var O = [
|
|
|
106
197
|
value: "INTERNAL",
|
|
107
198
|
label: "Internal — visible to your entire dev org"
|
|
108
199
|
}
|
|
109
|
-
],
|
|
200
|
+
], j = [...A, {
|
|
110
201
|
value: "UNLISTED",
|
|
111
202
|
label: "Unlisted — shareable via link, not listed in store"
|
|
112
|
-
}],
|
|
203
|
+
}], M = [
|
|
113
204
|
{
|
|
114
205
|
value: "ai",
|
|
115
206
|
label: "AI & Automation"
|
|
@@ -138,41 +229,41 @@ var O = [
|
|
|
138
229
|
value: "trigger",
|
|
139
230
|
label: "Triggers"
|
|
140
231
|
}
|
|
141
|
-
],
|
|
232
|
+
], N = ({ icon: e, title: n, description: r, bullets: i, selected: a, onClick: o }) => /* @__PURE__ */ T("button", {
|
|
142
233
|
type: "button",
|
|
143
234
|
onClick: o,
|
|
144
235
|
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-action-primary-bg/5 shadow-sm" : "border-border-subtle bg-bg-surface"),
|
|
145
236
|
children: [
|
|
146
|
-
a && /* @__PURE__ */
|
|
237
|
+
a && /* @__PURE__ */ w("span", {
|
|
147
238
|
className: "absolute top-4 right-4 flex h-5 w-5 items-center justify-center rounded-full bg-action-primary-bg text-action-primary-text",
|
|
148
|
-
children: /* @__PURE__ */
|
|
239
|
+
children: /* @__PURE__ */ w(h, { size: 12 })
|
|
149
240
|
}),
|
|
150
|
-
/* @__PURE__ */
|
|
241
|
+
/* @__PURE__ */ w("div", {
|
|
151
242
|
className: "flex h-10 w-10 items-center justify-center rounded-lg bg-bg-sunken",
|
|
152
|
-
children: /* @__PURE__ */
|
|
243
|
+
children: /* @__PURE__ */ w(e, {
|
|
153
244
|
size: 22,
|
|
154
245
|
className: "text-text-primary"
|
|
155
246
|
})
|
|
156
247
|
}),
|
|
157
|
-
/* @__PURE__ */
|
|
248
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
158
249
|
className: "font-semibold text-text-primary",
|
|
159
250
|
children: n
|
|
160
|
-
}), /* @__PURE__ */
|
|
251
|
+
}), /* @__PURE__ */ w("p", {
|
|
161
252
|
className: "mt-1 text-sm text-text-secondary",
|
|
162
253
|
children: r
|
|
163
254
|
})] }),
|
|
164
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ w("ul", {
|
|
165
256
|
className: "mt-1 space-y-1",
|
|
166
|
-
children: i.map((e) => /* @__PURE__ */
|
|
257
|
+
children: i.map((e) => /* @__PURE__ */ T("li", {
|
|
167
258
|
className: "flex items-center gap-2 text-xs text-text-secondary",
|
|
168
|
-
children: [/* @__PURE__ */
|
|
259
|
+
children: [/* @__PURE__ */ w(g, {
|
|
169
260
|
size: 12,
|
|
170
261
|
className: "flex-shrink-0 text-primary"
|
|
171
262
|
}), e]
|
|
172
263
|
}, e))
|
|
173
264
|
})
|
|
174
265
|
]
|
|
175
|
-
}),
|
|
266
|
+
}), P = ({ permissions: e, onChange: t }) => {
|
|
176
267
|
let n = [
|
|
177
268
|
"none",
|
|
178
269
|
"read",
|
|
@@ -182,35 +273,35 @@ var O = [
|
|
|
182
273
|
read: "Read",
|
|
183
274
|
write: "Read & Write"
|
|
184
275
|
};
|
|
185
|
-
return /* @__PURE__ */
|
|
276
|
+
return /* @__PURE__ */ w("div", {
|
|
186
277
|
className: "overflow-x-auto rounded-lg border border-border-subtle",
|
|
187
|
-
children: /* @__PURE__ */
|
|
278
|
+
children: /* @__PURE__ */ T("table", {
|
|
188
279
|
className: "w-full text-sm",
|
|
189
|
-
children: [/* @__PURE__ */
|
|
280
|
+
children: [/* @__PURE__ */ w("thead", { children: /* @__PURE__ */ T("tr", {
|
|
190
281
|
className: "border-b border-border-subtle bg-bg-sunken/50",
|
|
191
|
-
children: [/* @__PURE__ */
|
|
282
|
+
children: [/* @__PURE__ */ w("th", {
|
|
192
283
|
className: "px-4 py-3 text-left font-medium text-text-secondary w-1/2",
|
|
193
284
|
children: "Resource"
|
|
194
|
-
}), n.map((e) => /* @__PURE__ */
|
|
285
|
+
}), n.map((e) => /* @__PURE__ */ w("th", {
|
|
195
286
|
className: "px-4 py-3 text-center font-medium text-text-secondary",
|
|
196
287
|
children: r[e]
|
|
197
288
|
}, e))]
|
|
198
|
-
}) }), /* @__PURE__ */
|
|
289
|
+
}) }), /* @__PURE__ */ w("tbody", {
|
|
199
290
|
className: "divide-y divide-border",
|
|
200
|
-
children:
|
|
291
|
+
children: D.map((r) => /* @__PURE__ */ T("tr", {
|
|
201
292
|
className: "hover:bg-bg-sunken/30 transition-colors",
|
|
202
|
-
children: [/* @__PURE__ */
|
|
293
|
+
children: [/* @__PURE__ */ T("td", {
|
|
203
294
|
className: "px-4 py-3",
|
|
204
|
-
children: [/* @__PURE__ */
|
|
295
|
+
children: [/* @__PURE__ */ w("p", {
|
|
205
296
|
className: "font-medium text-text-primary",
|
|
206
297
|
children: r.label
|
|
207
|
-
}), /* @__PURE__ */
|
|
298
|
+
}), /* @__PURE__ */ w("p", {
|
|
208
299
|
className: "text-xs text-text-secondary",
|
|
209
300
|
children: r.description
|
|
210
301
|
})]
|
|
211
|
-
}), n.map((n) => /* @__PURE__ */
|
|
302
|
+
}), n.map((n) => /* @__PURE__ */ w("td", {
|
|
212
303
|
className: "px-4 py-3 text-center",
|
|
213
|
-
children: /* @__PURE__ */
|
|
304
|
+
children: /* @__PURE__ */ w("input", {
|
|
214
305
|
type: "radio",
|
|
215
306
|
name: `permission-${r.id}`,
|
|
216
307
|
value: n,
|
|
@@ -223,7 +314,7 @@ var O = [
|
|
|
223
314
|
})]
|
|
224
315
|
})
|
|
225
316
|
});
|
|
226
|
-
},
|
|
317
|
+
}, F = [
|
|
227
318
|
{
|
|
228
319
|
value: "fluidgrids",
|
|
229
320
|
label: "FluidGrids"
|
|
@@ -240,18 +331,18 @@ var O = [
|
|
|
240
331
|
value: "botlit",
|
|
241
332
|
label: "Botlit"
|
|
242
333
|
}
|
|
243
|
-
],
|
|
244
|
-
let { navigate:
|
|
245
|
-
let n =
|
|
334
|
+
], I = () => {
|
|
335
|
+
let { navigate: m, basePath: g, activeOrgId: _ } = e(), { t: v } = f(), b = (e, t) => {
|
|
336
|
+
let n = v(e);
|
|
246
337
|
return n === e ? t : n;
|
|
247
|
-
},
|
|
338
|
+
}, x = n(), [S, D] = d(null), [I, ie] = d([]), [L, R] = d(O()), z = ee(!1), [B, V] = d({
|
|
248
339
|
name: "",
|
|
249
340
|
slug: "",
|
|
250
341
|
shortDescription: "",
|
|
251
342
|
description: "",
|
|
252
343
|
category: "",
|
|
253
344
|
visibility: "PUBLIC",
|
|
254
|
-
developerOrganizationId:
|
|
345
|
+
developerOrganizationId: _ ?? "",
|
|
255
346
|
websiteUrl: "",
|
|
256
347
|
githubUrl: "",
|
|
257
348
|
documentationUrl: "",
|
|
@@ -259,274 +350,251 @@ var O = [
|
|
|
259
350
|
oauthAuthUrl: "",
|
|
260
351
|
oauthTokenUrl: "",
|
|
261
352
|
oauthRevokeUrl: ""
|
|
262
|
-
}), [
|
|
353
|
+
}), [H, U] = d({}), [W, { loading: G }] = r(), { data: K } = i({ fetchPolicy: "cache-and-network" }), q = [{
|
|
263
354
|
value: "",
|
|
264
355
|
label: "No organization (personal)"
|
|
265
|
-
}, ...(
|
|
356
|
+
}, ...(K?.myDeveloperOrganizations ?? []).map((e) => ({
|
|
266
357
|
value: e.id,
|
|
267
358
|
label: e.name
|
|
268
|
-
}))],
|
|
359
|
+
}))], J = (e) => m?.(`${g}${e}`), ae = (e) => e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, ""), Y = (e) => {
|
|
269
360
|
let t = e.target.value;
|
|
270
|
-
|
|
361
|
+
V((e) => ({
|
|
271
362
|
...e,
|
|
272
363
|
name: t,
|
|
273
|
-
slug:
|
|
274
|
-
})),
|
|
364
|
+
slug: z.current ? e.slug : ae(t)
|
|
365
|
+
})), H.name && U((e) => ({
|
|
275
366
|
...e,
|
|
276
367
|
name: void 0
|
|
277
368
|
}));
|
|
278
|
-
},
|
|
279
|
-
|
|
369
|
+
}, oe = (e) => {
|
|
370
|
+
z.current = !0;
|
|
280
371
|
let t = e.target.value.toLowerCase().replace(/[^a-z0-9-]/g, "");
|
|
281
|
-
|
|
372
|
+
V((e) => ({
|
|
282
373
|
...e,
|
|
283
374
|
slug: t
|
|
284
|
-
})),
|
|
375
|
+
})), H.slug && U((e) => ({
|
|
285
376
|
...e,
|
|
286
377
|
slug: void 0
|
|
287
378
|
}));
|
|
288
379
|
}, X = (e, t) => {
|
|
289
|
-
|
|
380
|
+
V((n) => ({
|
|
290
381
|
...n,
|
|
291
382
|
[e]: t
|
|
292
|
-
})), (
|
|
383
|
+
})), (H[e] || H._submit) && U((t) => ({
|
|
293
384
|
...t,
|
|
294
385
|
[e]: void 0,
|
|
295
386
|
_submit: void 0
|
|
296
387
|
}));
|
|
297
|
-
},
|
|
298
|
-
|
|
388
|
+
}, se = (e, t) => {
|
|
389
|
+
R((n) => ({
|
|
299
390
|
...n,
|
|
300
391
|
[e]: t
|
|
301
392
|
}));
|
|
302
|
-
},
|
|
393
|
+
}, ce = () => {
|
|
303
394
|
let e = {};
|
|
304
|
-
return
|
|
305
|
-
},
|
|
306
|
-
if (e.preventDefault(), !
|
|
307
|
-
let t =
|
|
395
|
+
return B.name.trim() ? B.name.length < 3 ? e.name = "Name must be at least 3 characters" : B.name.length > 100 && (e.name = "Name must be less than 100 characters") : e.name = "Name is required", B.slug.trim() ? /^[a-z0-9-]+$/.test(B.slug) || (e.slug = "Slug can only contain lowercase letters, numbers, and hyphens") : e.slug = "Slug is required", B.shortDescription.trim() ? B.shortDescription.length > 200 && (e.shortDescription = "Short description must be less than 200 characters") : e.shortDescription = "Short description is required", B.category || (e.category = "Category is required"), S !== "app" && I.length === 0 && (e.compatibleProducts = "Select at least one compatible product so users can find this in the right store"), U(e), Object.keys(e).length === 0;
|
|
396
|
+
}, Z = () => E[S ?? "app"].appType, le = async (e) => {
|
|
397
|
+
if (e.preventDefault(), !ce() || !S) return;
|
|
398
|
+
let t = S === "app" ? { permissions: k(L) } : null;
|
|
308
399
|
try {
|
|
309
|
-
let e = await
|
|
310
|
-
name:
|
|
311
|
-
slug:
|
|
312
|
-
shortDescription:
|
|
313
|
-
description:
|
|
314
|
-
category:
|
|
315
|
-
appType:
|
|
316
|
-
visibility:
|
|
317
|
-
developerOrganizationId:
|
|
318
|
-
websiteUrl:
|
|
319
|
-
githubUrl:
|
|
320
|
-
documentationUrl:
|
|
321
|
-
supportUrl:
|
|
400
|
+
let e = await W({ variables: { input: {
|
|
401
|
+
name: B.name,
|
|
402
|
+
slug: B.slug || void 0,
|
|
403
|
+
shortDescription: B.shortDescription || void 0,
|
|
404
|
+
description: B.description || void 0,
|
|
405
|
+
category: B.category || void 0,
|
|
406
|
+
appType: Z(),
|
|
407
|
+
visibility: B.visibility,
|
|
408
|
+
developerOrganizationId: B.developerOrganizationId || void 0,
|
|
409
|
+
websiteUrl: B.websiteUrl || void 0,
|
|
410
|
+
githubUrl: B.githubUrl || void 0,
|
|
411
|
+
documentationUrl: B.documentationUrl || void 0,
|
|
412
|
+
supportUrl: B.supportUrl || void 0,
|
|
322
413
|
manifest: t ?? void 0,
|
|
323
414
|
compatibleProducts: I.length > 0 ? I : void 0,
|
|
324
|
-
...
|
|
325
|
-
oauthAuthUrl:
|
|
326
|
-
oauthTokenUrl:
|
|
327
|
-
oauthRevokeUrl:
|
|
415
|
+
...S === "app" && {
|
|
416
|
+
oauthAuthUrl: B.oauthAuthUrl || void 0,
|
|
417
|
+
oauthTokenUrl: B.oauthTokenUrl || void 0,
|
|
418
|
+
oauthRevokeUrl: B.oauthRevokeUrl || void 0
|
|
328
419
|
}
|
|
329
420
|
} } });
|
|
330
|
-
e.data?.createApplication?.id && (
|
|
421
|
+
e.data?.createApplication?.id && (x.emit("devportal.app.created", {
|
|
331
422
|
appId: e.data.createApplication.id,
|
|
332
|
-
name:
|
|
333
|
-
appType:
|
|
334
|
-
organizationId:
|
|
335
|
-
}),
|
|
423
|
+
name: B.name,
|
|
424
|
+
appType: Z(),
|
|
425
|
+
organizationId: B.developerOrganizationId || null
|
|
426
|
+
}), J(`/apps/${e.data.createApplication.id}`));
|
|
336
427
|
} catch (e) {
|
|
337
428
|
let t = [];
|
|
338
429
|
e && typeof e == "object" && "graphQLErrors" in e && Array.isArray(e.graphQLErrors) && e.graphQLErrors.forEach((e) => t.push(e.message)), e instanceof Error && t.push(e.message);
|
|
339
430
|
let n = t.join(" ").toLowerCase();
|
|
340
|
-
n.includes("slug") || n.includes("already exist") || n.includes("unique") || n.includes("conflict") || n.includes("duplicate") ?
|
|
431
|
+
n.includes("slug") || n.includes("already exist") || n.includes("unique") || n.includes("conflict") || n.includes("duplicate") ? U((e) => ({
|
|
341
432
|
...e,
|
|
342
433
|
slug: "This slug is already taken — choose a different one"
|
|
343
|
-
})) :
|
|
434
|
+
})) : U((e) => ({
|
|
344
435
|
...e,
|
|
345
436
|
_submit: t[0] ?? "Something went wrong. Please try again."
|
|
346
437
|
}));
|
|
347
438
|
}
|
|
348
439
|
};
|
|
349
|
-
if (!
|
|
440
|
+
if (!S) return /* @__PURE__ */ w(l, {
|
|
350
441
|
authOnly: !0,
|
|
351
|
-
children: /* @__PURE__ */
|
|
442
|
+
children: /* @__PURE__ */ w(a, {
|
|
352
443
|
title: "What do you want to build?",
|
|
353
444
|
description: "Choose a builder type to get started",
|
|
354
445
|
purpose: "Pick the kind of integration you are creating — a standard app, a Node package, or a workflow. Your choice sets up the right defaults (credentials, permissions, and where it can be installed) so you only fill in what that type actually needs.",
|
|
355
|
-
backLink: `${
|
|
446
|
+
backLink: `${g}/apps`,
|
|
356
447
|
backLabel: "Back to Applications",
|
|
357
|
-
children: /* @__PURE__ */
|
|
448
|
+
children: /* @__PURE__ */ T("div", {
|
|
358
449
|
className: "max-w-3xl space-y-6",
|
|
359
450
|
children: [/* @__PURE__ */ w("div", {
|
|
360
451
|
className: "grid gap-4 sm:grid-cols-3",
|
|
361
452
|
children: [
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
"ZIP bundle + manifest",
|
|
381
|
-
"Custom inputs/outputs",
|
|
382
|
-
"Versioned releases",
|
|
383
|
-
"Publish to node store"
|
|
384
|
-
],
|
|
385
|
-
selected: P === "node",
|
|
386
|
-
onClick: () => F("node")
|
|
387
|
-
}),
|
|
388
|
-
/* @__PURE__ */ C(j, {
|
|
389
|
-
icon: g,
|
|
390
|
-
title: "Workflow",
|
|
391
|
-
description: "Build reusable automation workflows that users can import and customize.",
|
|
392
|
-
bullets: [
|
|
393
|
-
"Manifest + workflow JSON",
|
|
394
|
-
"Trigger definitions",
|
|
395
|
-
"Versioned releases",
|
|
396
|
-
"Publish to workflow store"
|
|
397
|
-
],
|
|
398
|
-
selected: P === "workflow",
|
|
399
|
-
onClick: () => F("workflow")
|
|
400
|
-
})
|
|
401
|
-
]
|
|
402
|
-
}), /* @__PURE__ */ w("div", {
|
|
453
|
+
"app",
|
|
454
|
+
"node",
|
|
455
|
+
"workflow",
|
|
456
|
+
"parser",
|
|
457
|
+
"widget",
|
|
458
|
+
"dashboard"
|
|
459
|
+
].map((e) => {
|
|
460
|
+
let t = E[e];
|
|
461
|
+
return /* @__PURE__ */ w(N, {
|
|
462
|
+
icon: t.icon,
|
|
463
|
+
title: t.label,
|
|
464
|
+
description: t.cardDescription,
|
|
465
|
+
bullets: t.cardBullets,
|
|
466
|
+
selected: S === e,
|
|
467
|
+
onClick: () => D(e)
|
|
468
|
+
}, e);
|
|
469
|
+
})
|
|
470
|
+
}), /* @__PURE__ */ T("div", {
|
|
403
471
|
className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-4 flex gap-3 text-sm text-text-secondary",
|
|
404
|
-
children: [/* @__PURE__ */
|
|
472
|
+
children: [/* @__PURE__ */ w(y, {
|
|
405
473
|
size: 16,
|
|
406
474
|
className: "flex-shrink-0 mt-0.5"
|
|
407
|
-
}), /* @__PURE__ */
|
|
475
|
+
}), /* @__PURE__ */ w("p", { children: "Apps use OAuth to interact with platform data. Nodes and Workflows are packaged files you upload after creation." })]
|
|
408
476
|
})]
|
|
409
477
|
})
|
|
410
478
|
})
|
|
411
479
|
});
|
|
412
|
-
let
|
|
413
|
-
return /* @__PURE__ */
|
|
480
|
+
let Q = E[S ?? "app"], $ = Q.label, ue = Q.icon, de = /* @__PURE__ */ w(ue, { size: 16 });
|
|
481
|
+
return /* @__PURE__ */ w(l, {
|
|
414
482
|
authOnly: !0,
|
|
415
|
-
children: /* @__PURE__ */
|
|
483
|
+
children: /* @__PURE__ */ w(a, {
|
|
416
484
|
title: `Create ${$}`,
|
|
417
|
-
description:
|
|
418
|
-
purpose:
|
|
419
|
-
backLink: `${
|
|
485
|
+
description: Q.pageDescription,
|
|
486
|
+
purpose: Q.purpose,
|
|
487
|
+
backLink: `${g}/apps`,
|
|
420
488
|
backLabel: "Back to Applications",
|
|
421
|
-
children: /* @__PURE__ */
|
|
422
|
-
onSubmit:
|
|
489
|
+
children: /* @__PURE__ */ T("form", {
|
|
490
|
+
onSubmit: le,
|
|
423
491
|
className: "space-y-8 max-w-3xl",
|
|
424
492
|
children: [
|
|
425
|
-
/* @__PURE__ */
|
|
493
|
+
/* @__PURE__ */ T("div", {
|
|
426
494
|
className: "flex items-center gap-3",
|
|
427
|
-
children: [/* @__PURE__ */
|
|
495
|
+
children: [/* @__PURE__ */ T("button", {
|
|
428
496
|
type: "button",
|
|
429
|
-
onClick: () =>
|
|
497
|
+
onClick: () => D(null),
|
|
430
498
|
className: "flex items-center gap-1.5 text-sm text-text-secondary hover:text-text-primary transition-colors",
|
|
431
|
-
children: [/* @__PURE__ */
|
|
432
|
-
}), /* @__PURE__ */
|
|
499
|
+
children: [/* @__PURE__ */ w(p, { size: 14 }), "Change type"]
|
|
500
|
+
}), /* @__PURE__ */ T("span", {
|
|
433
501
|
className: "flex items-center gap-1.5 rounded-full border border-border-subtle bg-bg-sunken px-3 py-1 text-xs font-medium",
|
|
434
502
|
children: [de, $]
|
|
435
503
|
})]
|
|
436
504
|
}),
|
|
437
|
-
/* @__PURE__ */
|
|
505
|
+
/* @__PURE__ */ w(o, {
|
|
438
506
|
title: "Basic Information",
|
|
439
507
|
description: "Core details about your application",
|
|
440
|
-
children: /* @__PURE__ */
|
|
508
|
+
children: /* @__PURE__ */ T("div", {
|
|
441
509
|
className: "space-y-4",
|
|
442
510
|
children: [
|
|
443
|
-
/* @__PURE__ */
|
|
511
|
+
/* @__PURE__ */ w(s, {
|
|
444
512
|
label: "Name",
|
|
445
|
-
value:
|
|
446
|
-
onChange:
|
|
447
|
-
placeholder:
|
|
513
|
+
value: B.name,
|
|
514
|
+
onChange: Y,
|
|
515
|
+
placeholder: Q.namePlaceholder,
|
|
448
516
|
required: !0,
|
|
449
|
-
error:
|
|
517
|
+
error: H.name
|
|
450
518
|
}),
|
|
451
|
-
/* @__PURE__ */
|
|
519
|
+
/* @__PURE__ */ w(s, {
|
|
452
520
|
label: "Slug",
|
|
453
|
-
value:
|
|
454
|
-
onChange:
|
|
521
|
+
value: B.slug,
|
|
522
|
+
onChange: oe,
|
|
455
523
|
placeholder: "my-integration",
|
|
456
524
|
required: !0,
|
|
457
|
-
error:
|
|
458
|
-
hint:
|
|
525
|
+
error: H.slug,
|
|
526
|
+
hint: z.current ? "Only lowercase letters, numbers, and hyphens" : "Auto-generated from name — edit to customise"
|
|
459
527
|
}),
|
|
460
|
-
/* @__PURE__ */
|
|
528
|
+
/* @__PURE__ */ w(u, {
|
|
461
529
|
label: "Short Description",
|
|
462
|
-
value:
|
|
530
|
+
value: B.shortDescription,
|
|
463
531
|
onChange: (e) => X("shortDescription", e),
|
|
464
532
|
placeholder: "Briefly describe what this does",
|
|
465
533
|
required: !0,
|
|
466
|
-
error:
|
|
467
|
-
hint: `${
|
|
534
|
+
error: H.shortDescription,
|
|
535
|
+
hint: `${B.shortDescription.length}/200 characters`,
|
|
468
536
|
rows: 2,
|
|
469
537
|
maxLength: 200
|
|
470
538
|
}),
|
|
471
|
-
/* @__PURE__ */
|
|
539
|
+
/* @__PURE__ */ T("div", {
|
|
472
540
|
className: "grid gap-4 sm:grid-cols-2",
|
|
473
|
-
children: [/* @__PURE__ */
|
|
541
|
+
children: [/* @__PURE__ */ w(c, {
|
|
474
542
|
label: "Category",
|
|
475
|
-
value:
|
|
543
|
+
value: B.category,
|
|
476
544
|
onChange: (e) => X("category", e.target.value),
|
|
477
|
-
options:
|
|
545
|
+
options: M,
|
|
478
546
|
placeholder: "Select a category…",
|
|
479
547
|
required: !0,
|
|
480
|
-
error:
|
|
548
|
+
error: H.category,
|
|
481
549
|
hint: "Helps users discover your item in the store"
|
|
482
|
-
}), /* @__PURE__ */
|
|
550
|
+
}), /* @__PURE__ */ w(c, {
|
|
483
551
|
label: "Visibility",
|
|
484
|
-
value:
|
|
552
|
+
value: B.visibility,
|
|
485
553
|
onChange: (e) => X("visibility", e.target.value),
|
|
486
|
-
options:
|
|
554
|
+
options: S === "workflow" ? j : A,
|
|
487
555
|
required: !0,
|
|
488
|
-
hint:
|
|
556
|
+
hint: B.visibility === "PUBLIC" ? "Listed in the marketplace after review approval — anyone can discover and install it" : B.visibility === "UNLISTED" ? "Not in the store, but share with anyone via a direct link. You can still submit for marketplace review later" : B.visibility === "INTERNAL" ? "Visible to all members of your developer organization — no one outside can access it" : "Only you (the creator) can see this — other org members cannot access it"
|
|
489
557
|
})]
|
|
490
558
|
}),
|
|
491
|
-
|
|
559
|
+
S !== "app" && /* @__PURE__ */ T("div", {
|
|
492
560
|
className: "space-y-2",
|
|
493
561
|
children: [
|
|
494
|
-
/* @__PURE__ */
|
|
562
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("label", {
|
|
495
563
|
className: "block text-sm font-medium text-text-primary",
|
|
496
|
-
children: ["Compatible Products", /* @__PURE__ */
|
|
564
|
+
children: ["Compatible Products", /* @__PURE__ */ w("span", {
|
|
497
565
|
className: "text-status-error-text ml-1",
|
|
498
566
|
children: "*"
|
|
499
567
|
})]
|
|
500
|
-
}), /* @__PURE__ */
|
|
568
|
+
}), /* @__PURE__ */ T("p", {
|
|
501
569
|
className: "text-xs text-text-secondary mt-0.5",
|
|
502
570
|
children: [
|
|
503
571
|
"Select which products this ",
|
|
504
|
-
|
|
572
|
+
S,
|
|
505
573
|
" works with. Users will see it in those products' node stores."
|
|
506
574
|
]
|
|
507
575
|
})] }),
|
|
508
|
-
/* @__PURE__ */
|
|
576
|
+
/* @__PURE__ */ w("div", {
|
|
509
577
|
className: "flex flex-wrap gap-3",
|
|
510
|
-
children:
|
|
578
|
+
children: F.map((e) => {
|
|
511
579
|
let n = I.includes(e.value);
|
|
512
|
-
return /* @__PURE__ */
|
|
513
|
-
className: t("flex items-center gap-2 cursor-pointer rounded-md border px-3 py-2 text-sm transition-colors", n ? "border-primary bg-primary/10 text-text-primary" : "border-border-subtle hover:border-border text-text-secondary hover:text-text-primary",
|
|
580
|
+
return /* @__PURE__ */ T("label", {
|
|
581
|
+
className: t("flex items-center gap-2 cursor-pointer rounded-md border px-3 py-2 text-sm transition-colors", n ? "border-primary bg-primary/10 text-text-primary" : "border-border-subtle hover:border-border text-text-secondary hover:text-text-primary", H.compatibleProducts && !n && "border-status-error-bg/50"),
|
|
514
582
|
children: [
|
|
515
|
-
/* @__PURE__ */
|
|
583
|
+
/* @__PURE__ */ w("input", {
|
|
516
584
|
type: "checkbox",
|
|
517
585
|
className: "sr-only",
|
|
518
586
|
checked: n,
|
|
519
587
|
onChange: () => {
|
|
520
|
-
|
|
588
|
+
ie((t) => {
|
|
521
589
|
let r = n ? t.filter((t) => t !== e.value) : [...t, e.value];
|
|
522
|
-
return r.length > 0 &&
|
|
590
|
+
return r.length > 0 && U((e) => ({
|
|
523
591
|
...e,
|
|
524
592
|
compatibleProducts: void 0
|
|
525
593
|
})), r;
|
|
526
594
|
});
|
|
527
595
|
}
|
|
528
596
|
}),
|
|
529
|
-
n && /* @__PURE__ */
|
|
597
|
+
n && /* @__PURE__ */ w(h, {
|
|
530
598
|
size: 14,
|
|
531
599
|
className: "text-primary flex-shrink-0"
|
|
532
600
|
}),
|
|
@@ -535,15 +603,15 @@ var O = [
|
|
|
535
603
|
}, e.value);
|
|
536
604
|
})
|
|
537
605
|
}),
|
|
538
|
-
|
|
606
|
+
H.compatibleProducts && /* @__PURE__ */ w("p", {
|
|
539
607
|
className: "text-xs text-status-error-text",
|
|
540
|
-
children:
|
|
608
|
+
children: H.compatibleProducts
|
|
541
609
|
})
|
|
542
610
|
]
|
|
543
611
|
}),
|
|
544
|
-
/* @__PURE__ */
|
|
612
|
+
/* @__PURE__ */ w(u, {
|
|
545
613
|
label: "Full Description",
|
|
546
|
-
value:
|
|
614
|
+
value: B.description,
|
|
547
615
|
onChange: (e) => X("description", e),
|
|
548
616
|
placeholder: "Detailed description, features, and use cases...",
|
|
549
617
|
rows: 5,
|
|
@@ -552,89 +620,89 @@ var O = [
|
|
|
552
620
|
]
|
|
553
621
|
})
|
|
554
622
|
}),
|
|
555
|
-
|
|
623
|
+
q.length > 2 && /* @__PURE__ */ w(o, {
|
|
556
624
|
title: "Organization",
|
|
557
625
|
description: "Which developer organization owns this?",
|
|
558
|
-
children: /* @__PURE__ */
|
|
626
|
+
children: /* @__PURE__ */ w(c, {
|
|
559
627
|
label: "Developer Organization",
|
|
560
|
-
value:
|
|
628
|
+
value: B.developerOrganizationId,
|
|
561
629
|
onChange: (e) => X("developerOrganizationId", e.target.value),
|
|
562
|
-
options:
|
|
630
|
+
options: q
|
|
563
631
|
})
|
|
564
632
|
}),
|
|
565
|
-
|
|
633
|
+
S === "app" && /* @__PURE__ */ T(o, {
|
|
566
634
|
title: "Permissions",
|
|
567
635
|
description: "Choose what data your app can access. Users will see these permissions when authorizing your app — like GitHub Apps.",
|
|
568
|
-
children: [/* @__PURE__ */
|
|
569
|
-
permissions:
|
|
570
|
-
onChange:
|
|
571
|
-
}), /* @__PURE__ */
|
|
636
|
+
children: [/* @__PURE__ */ w(P, {
|
|
637
|
+
permissions: L,
|
|
638
|
+
onChange: se
|
|
639
|
+
}), /* @__PURE__ */ T("div", {
|
|
572
640
|
className: "mt-3 flex gap-2 rounded-lg border border-border-subtle bg-bg-sunken/30 p-3 text-xs text-text-secondary",
|
|
573
|
-
children: [/* @__PURE__ */
|
|
641
|
+
children: [/* @__PURE__ */ w(y, {
|
|
574
642
|
size: 14,
|
|
575
643
|
className: "flex-shrink-0 mt-0.5"
|
|
576
|
-
}), /* @__PURE__ */
|
|
644
|
+
}), /* @__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."] })]
|
|
577
645
|
})]
|
|
578
646
|
}),
|
|
579
|
-
|
|
647
|
+
S === "app" && /* @__PURE__ */ w(o, {
|
|
580
648
|
title: "Integration Setup",
|
|
581
649
|
description: "Configure the endpoints for your integration. After a user installs, we redirect them to your callback URL so your server can complete the connection.",
|
|
582
|
-
children: /* @__PURE__ */
|
|
650
|
+
children: /* @__PURE__ */ T("div", {
|
|
583
651
|
className: "space-y-4",
|
|
584
|
-
children: [/* @__PURE__ */
|
|
652
|
+
children: [/* @__PURE__ */ w(s, {
|
|
585
653
|
label: "Post-install Callback URL",
|
|
586
654
|
type: "url",
|
|
587
|
-
value:
|
|
655
|
+
value: B.oauthAuthUrl,
|
|
588
656
|
onChange: (e) => X("oauthAuthUrl", e.target.value),
|
|
589
657
|
placeholder: "https://yourapp.com/callback",
|
|
590
658
|
hint: "Users land here after install with ?installation_id=xxx appended"
|
|
591
|
-
}), /* @__PURE__ */
|
|
659
|
+
}), /* @__PURE__ */ w(s, {
|
|
592
660
|
label: "Revoke URL",
|
|
593
661
|
type: "url",
|
|
594
|
-
value:
|
|
662
|
+
value: B.oauthRevokeUrl,
|
|
595
663
|
onChange: (e) => X("oauthRevokeUrl", e.target.value),
|
|
596
664
|
placeholder: "https://yourapp.com/oauth/revoke",
|
|
597
665
|
hint: "We POST to this URL when a user uninstalls your integration"
|
|
598
666
|
})]
|
|
599
667
|
})
|
|
600
668
|
}),
|
|
601
|
-
|
|
669
|
+
S !== "app" && /* @__PURE__ */ T("div", {
|
|
602
670
|
className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-4 flex gap-3 text-sm text-text-secondary",
|
|
603
|
-
children: [/* @__PURE__ */
|
|
671
|
+
children: [/* @__PURE__ */ w(y, {
|
|
604
672
|
size: 16,
|
|
605
673
|
className: "flex-shrink-0 mt-0.5"
|
|
606
|
-
}), /* @__PURE__ */
|
|
674
|
+
}), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
607
675
|
className: "font-medium text-text-primary",
|
|
608
676
|
children: "File uploads"
|
|
609
|
-
}), /* @__PURE__ */
|
|
677
|
+
}), /* @__PURE__ */ w("p", {
|
|
610
678
|
className: "mt-1",
|
|
611
|
-
children:
|
|
679
|
+
children: S === "node" ? "After creating your Node, go to the Versions tab to upload your ZIP bundle and manifest.json." : `After creating your ${$}, go to the Versions tab to upload its manifest JSON.`
|
|
612
680
|
})] })]
|
|
613
681
|
}),
|
|
614
|
-
|
|
682
|
+
H._submit && /* @__PURE__ */ T("div", {
|
|
615
683
|
className: "flex items-start gap-3 rounded-lg border border-status-error-bg bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
|
|
616
|
-
children: [/* @__PURE__ */
|
|
684
|
+
children: [/* @__PURE__ */ w(y, {
|
|
617
685
|
size: 16,
|
|
618
686
|
className: "flex-shrink-0 mt-0.5"
|
|
619
|
-
}), /* @__PURE__ */
|
|
687
|
+
}), /* @__PURE__ */ w("span", { children: H._submit })]
|
|
620
688
|
}),
|
|
621
|
-
/* @__PURE__ */
|
|
689
|
+
/* @__PURE__ */ T("div", {
|
|
622
690
|
className: "flex items-center justify-end gap-3 border-t pt-6",
|
|
623
|
-
children: [/* @__PURE__ */
|
|
691
|
+
children: [/* @__PURE__ */ T("button", {
|
|
624
692
|
type: "button",
|
|
625
|
-
onClick: () =>
|
|
626
|
-
disabled:
|
|
693
|
+
onClick: () => J("/apps"),
|
|
694
|
+
disabled: G,
|
|
627
695
|
className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-bg-sunken transition-colors disabled:opacity-50",
|
|
628
|
-
children: [/* @__PURE__ */
|
|
629
|
-
}), /* @__PURE__ */
|
|
696
|
+
children: [/* @__PURE__ */ w(re, { size: 16 }), b("devportal.cancel", "Cancel")]
|
|
697
|
+
}), /* @__PURE__ */ w("button", {
|
|
630
698
|
type: "submit",
|
|
631
|
-
disabled:
|
|
699
|
+
disabled: G,
|
|
632
700
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
|
|
633
|
-
children:
|
|
701
|
+
children: G ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(te, {
|
|
634
702
|
size: 16,
|
|
635
703
|
className: "animate-spin"
|
|
636
|
-
}), "Creating…"] }) : /* @__PURE__ */
|
|
637
|
-
/* @__PURE__ */
|
|
704
|
+
}), "Creating…"] }) : /* @__PURE__ */ T(C, { children: [
|
|
705
|
+
/* @__PURE__ */ w(ne, { size: 16 }),
|
|
638
706
|
"Create ",
|
|
639
707
|
$
|
|
640
708
|
] })
|
|
@@ -646,6 +714,6 @@ var O = [
|
|
|
646
714
|
});
|
|
647
715
|
};
|
|
648
716
|
//#endregion
|
|
649
|
-
export {
|
|
717
|
+
export { I as CreateApplicationPage };
|
|
650
718
|
|
|
651
719
|
//# sourceMappingURL=CreateApplicationPage.js.map
|