@burdenoff/microfe-devportal 2026.703.6 → 2026.705.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 +404 -311
- package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
- package/dist/devportal/pages/CreateApplicationPage.js +17 -28
- package/dist/devportal/pages/CreateApplicationPage.js.map +1 -1
- package/dist/devportal/pages/EditApplicationPage.js +445 -321
- package/dist/devportal/pages/EditApplicationPage.js.map +1 -1
- package/dist/devportal/types/index.js.map +1 -1
- package/dist/generated/global-operations.js +200 -185
- package/dist/generated/global-operations.js.map +1 -1
- package/package.json +1 -1
|
@@ -10,20 +10,20 @@ import { SelectionCheckbox as w } from "../components/SelectionCheckbox.js";
|
|
|
10
10
|
import { nativeNotify as T } from "../../utils/nativeBridge.js";
|
|
11
11
|
import { NewSecretAlert as ee } from "../components/SecretDisplay.js";
|
|
12
12
|
import { DataTable as E, DetailList as D } from "../components/DataTable.js";
|
|
13
|
-
import { InputField as O, SelectField as
|
|
14
|
-
import { ConfirmDialog as
|
|
15
|
-
import { GrantDelegationModal as
|
|
16
|
-
import { DEVPORTAL_PERMISSIONS as
|
|
17
|
-
import { useDevportalPermission as
|
|
18
|
-
import { usePackageUpload as
|
|
19
|
-
import { useCallback as
|
|
20
|
-
import { useI18n as
|
|
21
|
-
import { AlertCircle as
|
|
22
|
-
import { useParams as
|
|
13
|
+
import { InputField as O, SelectField as te, TextareaField as ne } from "../components/FormField.js";
|
|
14
|
+
import { ConfirmDialog as re } from "../components/ConfirmDialog.js";
|
|
15
|
+
import { GrantDelegationModal as ie } from "../components/GrantDelegationModal.js";
|
|
16
|
+
import { DEVPORTAL_PERMISSIONS as ae } from "../constants/permissions.js";
|
|
17
|
+
import { useDevportalPermission as oe } from "../hooks/usePermission.js";
|
|
18
|
+
import { usePackageUpload as k } from "../hooks/usePackageUpload.js";
|
|
19
|
+
import { useCallback as A, useEffect as se, useMemo as j, useRef as M, useState as N } from "react";
|
|
20
|
+
import { useI18n as P } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
21
|
+
import { AlertCircle as ce, AppWindow as le, BarChart3 as F, Check as I, CheckCircle as ue, ChevronRight as de, CircleDollarSign as L, Clock as fe, Edit as pe, ExternalLink as R, FlaskConical as me, Gift as he, Info as ge, Key as z, Loader2 as B, Lock as _e, MoreHorizontal as ve, Package as ye, Plus as V, Power as be, RefreshCw as xe, SendHorizontal as Se, Shield as H, Store as Ce, TrendingUp as we, Upload as U, Users as Te, Wallet as Ee, Webhook as De, X as Oe, XCircle as ke } from "lucide-react";
|
|
22
|
+
import { useParams as Ae } from "react-router-dom";
|
|
23
23
|
import { Fragment as W, jsx as G, jsxs as K } from "react/jsx-runtime";
|
|
24
|
-
import { CTAOverflowMenu as
|
|
24
|
+
import { CTAOverflowMenu as je, EmphasisPanel as Me, GlassCard as Ne } from "@burdenoff/fe-libs/ui";
|
|
25
25
|
//#region src/devportal/pages/ApplicationDetailPage.tsx
|
|
26
|
-
function
|
|
26
|
+
function Pe(e) {
|
|
27
27
|
return e ? {
|
|
28
28
|
id: e.id,
|
|
29
29
|
name: e.name,
|
|
@@ -76,7 +76,7 @@ function Ne(e) {
|
|
|
76
76
|
updatedAt: e.updatedAt
|
|
77
77
|
} : null;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function q(e) {
|
|
80
80
|
return {
|
|
81
81
|
id: e.id,
|
|
82
82
|
applicationId: e.applicationId,
|
|
@@ -100,7 +100,7 @@ function Pe(e) {
|
|
|
100
100
|
updatedAt: e.updatedAt
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function Fe(e) {
|
|
104
104
|
return {
|
|
105
105
|
id: e.id,
|
|
106
106
|
applicationId: e.applicationId,
|
|
@@ -116,7 +116,7 @@ function q(e) {
|
|
|
116
116
|
createdAt: e.createdAt
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function Ie(e) {
|
|
120
120
|
return {
|
|
121
121
|
id: e.id,
|
|
122
122
|
appId: e.appId,
|
|
@@ -138,152 +138,162 @@ function Fe(e) {
|
|
|
138
138
|
revokedBy: e.revokedBy || void 0
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
|
-
var
|
|
141
|
+
var Le = [
|
|
142
142
|
{
|
|
143
143
|
id: "overview",
|
|
144
144
|
label: "Overview",
|
|
145
|
-
icon:
|
|
145
|
+
icon: le
|
|
146
146
|
},
|
|
147
147
|
{
|
|
148
148
|
id: "analytics",
|
|
149
149
|
label: "Analytics",
|
|
150
|
-
icon:
|
|
150
|
+
icon: F
|
|
151
151
|
},
|
|
152
152
|
{
|
|
153
153
|
id: "store-listing",
|
|
154
154
|
label: "Store Listing",
|
|
155
|
-
icon:
|
|
155
|
+
icon: Ce
|
|
156
156
|
},
|
|
157
157
|
{
|
|
158
158
|
id: "versions",
|
|
159
159
|
label: "Versions",
|
|
160
|
-
icon:
|
|
160
|
+
icon: ye
|
|
161
161
|
},
|
|
162
162
|
{
|
|
163
163
|
id: "pricing",
|
|
164
164
|
label: "Pricing",
|
|
165
|
-
icon:
|
|
165
|
+
icon: L
|
|
166
166
|
},
|
|
167
167
|
{
|
|
168
168
|
id: "permissions",
|
|
169
169
|
label: "Permissions",
|
|
170
|
-
icon:
|
|
170
|
+
icon: H
|
|
171
171
|
},
|
|
172
172
|
{
|
|
173
173
|
id: "webhooks",
|
|
174
174
|
label: "Webhooks",
|
|
175
|
-
icon:
|
|
175
|
+
icon: De
|
|
176
176
|
},
|
|
177
177
|
{
|
|
178
178
|
id: "delegations",
|
|
179
179
|
label: "Delegations",
|
|
180
|
-
icon:
|
|
180
|
+
icon: Te
|
|
181
181
|
},
|
|
182
182
|
{
|
|
183
183
|
id: "playground",
|
|
184
184
|
label: "API Playground",
|
|
185
|
+
icon: R
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
id: "oauth",
|
|
189
|
+
label: "OAuth",
|
|
190
|
+
icon: _e
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
id: "api-keys",
|
|
194
|
+
label: "API Keys",
|
|
185
195
|
icon: z
|
|
186
196
|
}
|
|
187
|
-
],
|
|
197
|
+
], Re = {
|
|
188
198
|
ACTIVE: "bg-status-success-bg-subtle text-status-success-text",
|
|
189
199
|
REVOKED: "bg-status-error-bg-subtle text-status-error-text",
|
|
190
200
|
EXPIRED: "bg-bg-sunken text-text-secondary"
|
|
191
|
-
},
|
|
201
|
+
}, ze = ({ message: e = "Loading..." }) => /* @__PURE__ */ K("div", {
|
|
192
202
|
className: "flex items-center justify-center gap-3 py-12",
|
|
193
|
-
children: [/* @__PURE__ */ G(
|
|
203
|
+
children: [/* @__PURE__ */ G(B, {
|
|
194
204
|
size: 20,
|
|
195
205
|
className: "animate-spin text-text-secondary"
|
|
196
206
|
}), /* @__PURE__ */ G("p", {
|
|
197
207
|
className: "text-sm text-text-secondary",
|
|
198
208
|
children: e
|
|
199
209
|
})]
|
|
200
|
-
}),
|
|
210
|
+
}), Be = ({ message: e }) => /* @__PURE__ */ K("div", {
|
|
201
211
|
className: "flex flex-col items-center justify-center gap-2 py-12 text-center",
|
|
202
|
-
children: [/* @__PURE__ */ G(
|
|
212
|
+
children: [/* @__PURE__ */ G(ce, {
|
|
203
213
|
size: 32,
|
|
204
214
|
className: "text-status-error-text"
|
|
205
215
|
}), /* @__PURE__ */ G("p", {
|
|
206
216
|
className: "text-sm text-text-secondary",
|
|
207
217
|
children: e
|
|
208
218
|
})]
|
|
209
|
-
}),
|
|
210
|
-
let { navigate: i, basePath: o, workspaceId: c } = e(), { t: u } =
|
|
219
|
+
}), J = () => {
|
|
220
|
+
let { navigate: i, basePath: o, workspaceId: c } = e(), { t: u } = P(), p = (e, t) => {
|
|
211
221
|
let n = u(e);
|
|
212
222
|
return n === e ? t : n;
|
|
213
|
-
}, { allowed: _ } = ae
|
|
223
|
+
}, { allowed: _ } = oe(ae.APP_UPDATE), { allowed: y } = oe(ae.APP_DELETE), { appId: w } = Ae(), [E, D] = N("overview"), [O, te] = N(!1), [ne, k] = N(!1), [se, j] = N(null), [M, F] = N(!1), { data: L, loading: R, error: he, refetch: ge } = s({
|
|
214
224
|
variables: { id: w },
|
|
215
225
|
skip: !w
|
|
216
|
-
}), [
|
|
226
|
+
}), [z, { loading: _e }] = m(), [ve, { loading: ye }] = a(), [V, { loading: H }] = h(), [we, { loading: U }] = f(), [Te, { loading: Ee }] = g(), { data: De, refetch: Oe } = d({
|
|
217
227
|
variables: {
|
|
218
228
|
applicationId: w,
|
|
219
229
|
workspaceId: c ?? void 0
|
|
220
230
|
},
|
|
221
231
|
skip: !c || !w,
|
|
222
232
|
fetchPolicy: "cache-and-network"
|
|
223
|
-
}), Me = De?.appInstallations?.edges?.[0]?.node ?? null, { data:
|
|
224
|
-
variables: { id:
|
|
225
|
-
skip: !
|
|
233
|
+
}), Me = De?.appInstallations?.edges?.[0]?.node ?? null, { data: Ne } = l({
|
|
234
|
+
variables: { id: L?.application?.developerOrganizationId ?? "" },
|
|
235
|
+
skip: !L?.application?.developerOrganizationId,
|
|
226
236
|
fetchPolicy: "cache-first"
|
|
227
|
-
}), q =
|
|
237
|
+
}), q = A((e) => {
|
|
228
238
|
i?.(`${o}${e}`);
|
|
229
|
-
}, [i, o]), Fe =
|
|
230
|
-
let e =
|
|
239
|
+
}, [i, o]), Fe = A(async () => {
|
|
240
|
+
let e = L?.application?.appId;
|
|
231
241
|
if (e) try {
|
|
232
|
-
let t = (await
|
|
233
|
-
t &&
|
|
242
|
+
let t = (await z({ variables: { id: e } })).data?.rotateAppSecret.clientSecret;
|
|
243
|
+
t && j(t), te(!1);
|
|
234
244
|
} catch {}
|
|
235
|
-
}, [
|
|
245
|
+
}, [L?.application?.appId, z]), Ie = A(async () => {
|
|
236
246
|
if (w) try {
|
|
237
|
-
await
|
|
247
|
+
await ve({ variables: { id: w } }), k(!1), q("/apps");
|
|
238
248
|
} catch {}
|
|
239
249
|
}, [
|
|
240
250
|
w,
|
|
241
|
-
|
|
251
|
+
ve,
|
|
242
252
|
q
|
|
243
|
-
]), Re =
|
|
253
|
+
]), Re = A(async () => {
|
|
244
254
|
if (!(!w || !c)) try {
|
|
245
|
-
await
|
|
255
|
+
await we({ variables: { input: {
|
|
246
256
|
applicationId: w,
|
|
247
257
|
scope: "WORKSPACE",
|
|
248
258
|
workspaceId: c,
|
|
249
259
|
autoUpdate: !1
|
|
250
|
-
} } }),
|
|
260
|
+
} } }), Oe(), T("success");
|
|
251
261
|
} catch (e) {
|
|
252
262
|
console.error("[DevPortal] Test in Workspace failed:", e), T("error");
|
|
253
263
|
}
|
|
254
264
|
}, [
|
|
255
265
|
w,
|
|
256
266
|
c,
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
]), ze =
|
|
267
|
+
we,
|
|
268
|
+
Oe
|
|
269
|
+
]), ze = A(async (e) => {
|
|
260
270
|
try {
|
|
261
|
-
await Te({ variables: { id: e } }),
|
|
271
|
+
await Te({ variables: { id: e } }), Oe(), T("success");
|
|
262
272
|
} catch {
|
|
263
273
|
T("error");
|
|
264
274
|
}
|
|
265
|
-
}, [Te,
|
|
275
|
+
}, [Te, Oe]), Be = A(async () => {
|
|
266
276
|
if (w) try {
|
|
267
|
-
await
|
|
277
|
+
await V({ variables: { id: w } }), T("success");
|
|
268
278
|
} catch (e) {
|
|
269
279
|
console.error("[DevPortal] Submit failed:", e), T("error");
|
|
270
280
|
} finally {
|
|
271
|
-
|
|
281
|
+
ge();
|
|
272
282
|
}
|
|
273
283
|
}, [
|
|
274
284
|
w,
|
|
275
|
-
|
|
276
|
-
|
|
285
|
+
V,
|
|
286
|
+
ge
|
|
277
287
|
]);
|
|
278
|
-
if (
|
|
279
|
-
if (
|
|
288
|
+
if (R && !L) return /* @__PURE__ */ G(n, { message: p("devportal.loadingApplication", "Loading application...") });
|
|
289
|
+
if (he) return /* @__PURE__ */ G(v, {
|
|
280
290
|
title: p("devportal.error", "Error"),
|
|
281
291
|
backLink: `${o}/apps`,
|
|
282
292
|
backLabel: p("devportal.backToApplications", "Back to Applications"),
|
|
283
293
|
children: /* @__PURE__ */ K("div", {
|
|
284
294
|
className: "flex flex-col items-center justify-center py-12 text-center",
|
|
285
295
|
children: [
|
|
286
|
-
/* @__PURE__ */ G(
|
|
296
|
+
/* @__PURE__ */ G(ce, {
|
|
287
297
|
size: 48,
|
|
288
298
|
className: "text-status-error-text mb-4"
|
|
289
299
|
}),
|
|
@@ -293,47 +303,47 @@ var Ie = [
|
|
|
293
303
|
}),
|
|
294
304
|
/* @__PURE__ */ G("p", {
|
|
295
305
|
className: "text-sm text-text-secondary",
|
|
296
|
-
children:
|
|
306
|
+
children: he.message
|
|
297
307
|
})
|
|
298
308
|
]
|
|
299
309
|
})
|
|
300
310
|
});
|
|
301
|
-
let J =
|
|
311
|
+
let J = Pe(L?.application);
|
|
302
312
|
if (!J) return /* @__PURE__ */ G(v, {
|
|
303
313
|
title: p("devportal.notFound", "Not Found"),
|
|
304
314
|
backLink: `${o}/apps`,
|
|
305
315
|
backLabel: p("devportal.backToApplications", "Back to Applications"),
|
|
306
316
|
children: /* @__PURE__ */ G(r, {
|
|
307
317
|
illustration: "empty-generic",
|
|
308
|
-
icon: /* @__PURE__ */ G(
|
|
318
|
+
icon: /* @__PURE__ */ G(le, { size: 48 }),
|
|
309
319
|
title: p("devportal.applicationNotFound", "Application not found"),
|
|
310
320
|
description: p("devportal.applicationNotFoundDescription", "The application you're looking for doesn't exist or you don't have access to it.")
|
|
311
321
|
})
|
|
312
322
|
});
|
|
313
|
-
let Y = J.appType === "NODE" || J.appType === "WORKFLOW",
|
|
323
|
+
let Y = J.appType === "NODE" || J.appType === "WORKFLOW", X = J.appType === "API_INTEGRATION", Ue = L?.application?.versions?.totalCount ?? 0, Xe = J.pricingType === "PAID", Ze = Ne?.developerOrganization, Qe = Ze?.platformFeeRate ?? .3, $e = !!Ze?.billingAccountId, tt = J.pricingDetails ?? {}, Z = J.pricingType === "FREE" || J.pricingType === "PAID" && typeof tt.price == "number" && tt.price > 0, Q = !!J.description?.trim() && !!J.category && !!J.iconUrl && (J.visibility === "PUBLIC" || J.visibility === "UNLISTED") && (!Y && !X || Ue > 0) && (!Xe || $e) && Z, nt = Q && J.status !== "PUBLISHED" && J.status !== "SUBMITTED", rt = [
|
|
314
324
|
...Y ? [] : [{
|
|
315
325
|
label: p("devportal.rotateSecret", "Rotate Secret"),
|
|
316
|
-
icon: /* @__PURE__ */ G(
|
|
326
|
+
icon: /* @__PURE__ */ G(xe, { size: 16 }),
|
|
317
327
|
disabled: !J.appId,
|
|
318
|
-
onSelect: () =>
|
|
328
|
+
onSelect: () => te(!0)
|
|
319
329
|
}],
|
|
320
330
|
...Y ? [] : Me ? [{
|
|
321
331
|
label: p("devportal.uninstallFromWorkspace", "Uninstall from Workspace"),
|
|
322
|
-
icon: /* @__PURE__ */ G(
|
|
332
|
+
icon: /* @__PURE__ */ G(ke, { size: 16 }),
|
|
323
333
|
disabled: Ee || !c,
|
|
324
334
|
onSelect: () => void ze(Me.id)
|
|
325
335
|
}] : [{
|
|
326
336
|
label: p("devportal.testInWorkspace", "Test in Workspace"),
|
|
327
|
-
icon: /* @__PURE__ */ G(
|
|
328
|
-
disabled:
|
|
337
|
+
icon: /* @__PURE__ */ G(me, { size: 16 }),
|
|
338
|
+
disabled: U || !c,
|
|
329
339
|
onSelect: () => void Re()
|
|
330
340
|
}],
|
|
331
341
|
{
|
|
332
342
|
label: p("devportal.deactivate", "Deactivate"),
|
|
333
|
-
icon: /* @__PURE__ */ G(
|
|
343
|
+
icon: /* @__PURE__ */ G(be, { size: 16 }),
|
|
334
344
|
intent: "destructive",
|
|
335
345
|
disabled: !y,
|
|
336
|
-
onSelect: () =>
|
|
346
|
+
onSelect: () => k(!0)
|
|
337
347
|
}
|
|
338
348
|
];
|
|
339
349
|
return /* @__PURE__ */ K(v, {
|
|
@@ -346,41 +356,41 @@ var Ie = [
|
|
|
346
356
|
className: "flex items-center gap-2",
|
|
347
357
|
children: [J.status === "SUBMITTED" ? /* @__PURE__ */ K("div", {
|
|
348
358
|
className: "flex items-center gap-1.5 rounded-full border border-status-warning-bg bg-status-warning-bg-subtle px-3 py-1.5 text-xs font-medium text-status-warning-text",
|
|
349
|
-
children: [/* @__PURE__ */ G(
|
|
359
|
+
children: [/* @__PURE__ */ G(fe, { size: 13 }), p("devportal.underReview", "Under Review")]
|
|
350
360
|
}) : J.status === "PUBLISHED" ? null : /* @__PURE__ */ G("button", {
|
|
351
361
|
type: "button",
|
|
352
362
|
onClick: () => void Be(),
|
|
353
|
-
disabled: !
|
|
354
|
-
title:
|
|
363
|
+
disabled: !nt || H,
|
|
364
|
+
title: Q ? void 0 : [
|
|
355
365
|
!J.description?.trim() && "Add full description",
|
|
356
366
|
!J.category && "Select a category",
|
|
357
367
|
!J.iconUrl && "Upload an app icon",
|
|
358
368
|
J.visibility === "PRIVATE" && "Set visibility to Public/Unlisted",
|
|
359
|
-
Y &&
|
|
360
|
-
!
|
|
361
|
-
|
|
369
|
+
Y && Ue === 0 && "Upload at least one version",
|
|
370
|
+
!Z && "Set pricing (choose Free or Paid in the Pricing tab)",
|
|
371
|
+
Xe && !$e && "Link a billing account to receive payments"
|
|
362
372
|
].filter(Boolean).join(" · "),
|
|
363
|
-
className: t("inline-flex items-center gap-2 rounded-md px-5 py-2 text-sm font-medium whitespace-nowrap transition-colors",
|
|
364
|
-
children:
|
|
373
|
+
className: t("inline-flex items-center gap-2 rounded-md px-5 py-2 text-sm font-medium whitespace-nowrap transition-colors", nt && !H ? "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 cursor-pointer" : "cursor-not-allowed bg-bg-muted text-text-tertiary ring-1 ring-border-subtle"),
|
|
374
|
+
children: H ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(B, {
|
|
365
375
|
size: 15,
|
|
366
376
|
className: "animate-spin"
|
|
367
|
-
}), p("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
368
|
-
}), /* @__PURE__ */ G(
|
|
377
|
+
}), p("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(Se, { size: 15 }), p("devportal.submitForReview", "Submit for Review")] })
|
|
378
|
+
}), /* @__PURE__ */ G(je, {
|
|
369
379
|
primary: {
|
|
370
380
|
label: p("devportal.editApp", "Edit App"),
|
|
371
|
-
icon: /* @__PURE__ */ G(
|
|
381
|
+
icon: /* @__PURE__ */ G(pe, { size: 16 }),
|
|
372
382
|
disabled: !_,
|
|
373
383
|
onSelect: () => q(`/apps/${J.id}/edit`)
|
|
374
384
|
},
|
|
375
|
-
actions:
|
|
385
|
+
actions: rt
|
|
376
386
|
})]
|
|
377
387
|
}),
|
|
378
388
|
children: [
|
|
379
|
-
|
|
389
|
+
se && /* @__PURE__ */ G(ee, {
|
|
380
390
|
title: p("devportal.newAppSecretGenerated", "New App Secret Generated"),
|
|
381
|
-
secret:
|
|
391
|
+
secret: se,
|
|
382
392
|
description: p("devportal.appSecretRotatedDescription", "Your app secret has been rotated. The old secret is no longer valid."),
|
|
383
|
-
onDismiss: () =>
|
|
393
|
+
onDismiss: () => j(null)
|
|
384
394
|
}),
|
|
385
395
|
/* @__PURE__ */ K("div", {
|
|
386
396
|
className: "flex flex-wrap items-center gap-2",
|
|
@@ -403,7 +413,7 @@ var Ie = [
|
|
|
403
413
|
}),
|
|
404
414
|
J.status === "SUBMITTED" && /* @__PURE__ */ K("div", {
|
|
405
415
|
className: "flex items-start gap-3 rounded-lg border border-border-subtle bg-status-warning-bg-subtle p-4",
|
|
406
|
-
children: [/* @__PURE__ */ G(
|
|
416
|
+
children: [/* @__PURE__ */ G(fe, {
|
|
407
417
|
size: 18,
|
|
408
418
|
className: "text-status-warning-text mt-0.5 flex-shrink-0"
|
|
409
419
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -426,7 +436,7 @@ var Ie = [
|
|
|
426
436
|
}),
|
|
427
437
|
J.status === "REJECTED" && /* @__PURE__ */ K("div", {
|
|
428
438
|
className: "flex items-start gap-3 rounded-lg border border-status-error-bg bg-status-error-bg-subtle p-4",
|
|
429
|
-
children: [/* @__PURE__ */ G(
|
|
439
|
+
children: [/* @__PURE__ */ G(ke, {
|
|
430
440
|
size: 18,
|
|
431
441
|
className: "text-status-error-text mt-0.5 flex-shrink-0"
|
|
432
442
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -451,7 +461,7 @@ var Ie = [
|
|
|
451
461
|
}),
|
|
452
462
|
J.status === "PUBLISHED" && /* @__PURE__ */ K("div", {
|
|
453
463
|
className: "flex items-start gap-3 rounded-lg border border-status-success-bg bg-status-success-bg-subtle p-4",
|
|
454
|
-
children: [/* @__PURE__ */ G(
|
|
464
|
+
children: [/* @__PURE__ */ G(ue, {
|
|
455
465
|
size: 18,
|
|
456
466
|
className: "text-status-success-text mt-0.5 flex-shrink-0"
|
|
457
467
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -465,8 +475,8 @@ var Ie = [
|
|
|
465
475
|
})]
|
|
466
476
|
})]
|
|
467
477
|
}),
|
|
468
|
-
(J.status === "DRAFT" || J.status === "REJECTED") && !
|
|
469
|
-
let e = !!J.description?.trim() && !!J.category && !!J.iconUrl && (J.visibility === "PUBLIC" || J.visibility === "UNLISTED"), n = !Y ||
|
|
478
|
+
(J.status === "DRAFT" || J.status === "REJECTED") && !Q && (() => {
|
|
479
|
+
let e = !!J.description?.trim() && !!J.category && !!J.iconUrl && (J.visibility === "PUBLIC" || J.visibility === "UNLISTED"), n = !Y && !X || Ue > 0, r = [
|
|
470
480
|
!J.description?.trim() && "Add a full description",
|
|
471
481
|
!J.category && "Select a category",
|
|
472
482
|
!J.iconUrl && "Upload an app icon",
|
|
@@ -486,17 +496,30 @@ var Ie = [
|
|
|
486
496
|
done: n,
|
|
487
497
|
onClick: () => D("versions")
|
|
488
498
|
}] : [],
|
|
499
|
+
...X ? [{
|
|
500
|
+
id: "version",
|
|
501
|
+
label: p("devportal.setupIntegrationVersionStep", "Publish a Version"),
|
|
502
|
+
hint: n ? p("devportal.done", "Done") : p("devportal.integrationVersionHint", "Define required scopes and publish your first API version"),
|
|
503
|
+
done: n,
|
|
504
|
+
onClick: () => D("versions")
|
|
505
|
+
}, {
|
|
506
|
+
id: "webhooks",
|
|
507
|
+
label: p("devportal.setupWebhooksStep", "Configure Webhooks"),
|
|
508
|
+
hint: p("devportal.webhooksOptionalHint", "Set up endpoints to receive platform events (optional)"),
|
|
509
|
+
done: !1,
|
|
510
|
+
onClick: () => D("webhooks")
|
|
511
|
+
}] : [],
|
|
489
512
|
{
|
|
490
513
|
id: "pricing",
|
|
491
514
|
label: p("devportal.setupPricingStep", "Set Pricing"),
|
|
492
|
-
hint:
|
|
493
|
-
done:
|
|
515
|
+
hint: Z ? p("devportal.done", "Done") : p("devportal.pricingHint", "Choose Free or set a credit price in the Pricing tab"),
|
|
516
|
+
done: Z,
|
|
494
517
|
onClick: () => D("pricing")
|
|
495
518
|
},
|
|
496
519
|
{
|
|
497
520
|
id: "submit",
|
|
498
521
|
label: p("devportal.submitForReview", "Submit for Review"),
|
|
499
|
-
hint:
|
|
522
|
+
hint: Q ? p("devportal.readyToSubmit", "Ready — click Submit for Review above") : p("devportal.completeStepsFirst", "Complete the steps above first"),
|
|
500
523
|
done: !1,
|
|
501
524
|
onClick: void 0
|
|
502
525
|
}
|
|
@@ -509,7 +532,7 @@ var Ie = [
|
|
|
509
532
|
className: "flex items-center gap-3",
|
|
510
533
|
children: [/* @__PURE__ */ G("div", {
|
|
511
534
|
className: "flex h-8 w-8 items-center justify-center rounded-full bg-action-primary-bg/10",
|
|
512
|
-
children: /* @__PURE__ */ G(
|
|
535
|
+
children: /* @__PURE__ */ G(Ce, {
|
|
513
536
|
size: 16,
|
|
514
537
|
className: "text-primary"
|
|
515
538
|
})
|
|
@@ -538,7 +561,7 @@ var Ie = [
|
|
|
538
561
|
children: [
|
|
539
562
|
/* @__PURE__ */ G("div", {
|
|
540
563
|
className: t("flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-full text-xs font-bold", e.done ? "bg-status-success-bg text-status-success-text" : "border-2 border-border-subtle bg-bg-sunken text-text-secondary"),
|
|
541
|
-
children: e.done ? /* @__PURE__ */ G(
|
|
564
|
+
children: e.done ? /* @__PURE__ */ G(I, { size: 13 }) : n + 1
|
|
542
565
|
}),
|
|
543
566
|
/* @__PURE__ */ K("div", {
|
|
544
567
|
className: "flex-1 min-w-0",
|
|
@@ -550,7 +573,7 @@ var Ie = [
|
|
|
550
573
|
children: e.hint
|
|
551
574
|
})]
|
|
552
575
|
}),
|
|
553
|
-
e.onClick && !e.done && /* @__PURE__ */ G(
|
|
576
|
+
e.onClick && !e.done && /* @__PURE__ */ G(de, {
|
|
554
577
|
size: 16,
|
|
555
578
|
className: "flex-shrink-0 text-text-secondary"
|
|
556
579
|
})
|
|
@@ -565,7 +588,7 @@ var Ie = [
|
|
|
565
588
|
className: "-mb-px flex gap-4 overflow-x-auto",
|
|
566
589
|
role: "tablist",
|
|
567
590
|
"aria-label": p("devportal.applicationSections", "Application sections"),
|
|
568
|
-
children:
|
|
591
|
+
children: Le.filter((e) => !(Y && (e.id === "permissions" || e.id === "webhooks" || e.id === "delegations" || e.id === "playground" || e.id === "oauth" || e.id === "api-keys") || !Y && !X && e.id === "versions" || !X && (e.id === "oauth" || e.id === "api-keys"))).map((e) => {
|
|
569
592
|
let n = e.icon;
|
|
570
593
|
return /* @__PURE__ */ K("button", {
|
|
571
594
|
id: `application-tab-${e.id}`,
|
|
@@ -586,87 +609,146 @@ var Ie = [
|
|
|
586
609
|
"aria-labelledby": `application-tab-${E}`,
|
|
587
610
|
tabIndex: 0,
|
|
588
611
|
children: [
|
|
589
|
-
E === "overview" && /* @__PURE__ */ G(
|
|
590
|
-
E === "permissions" && /* @__PURE__ */ G(
|
|
591
|
-
|
|
612
|
+
E === "overview" && /* @__PURE__ */ G(Ye, { app: J }),
|
|
613
|
+
E === "permissions" && /* @__PURE__ */ G(ft, {
|
|
614
|
+
app: J,
|
|
615
|
+
versionScopes: L?.application?.versions?.edges?.[0]?.node?.requiredScopes ?? []
|
|
616
|
+
}),
|
|
617
|
+
E === "webhooks" && /* @__PURE__ */ G(Ke, {
|
|
592
618
|
appId: J.id,
|
|
593
619
|
onNavigate: q
|
|
594
620
|
}),
|
|
595
|
-
E === "delegations" && /* @__PURE__ */ G(
|
|
621
|
+
E === "delegations" && /* @__PURE__ */ G(qe, {
|
|
596
622
|
authAppId: J.appId || void 0,
|
|
597
623
|
appName: J.name,
|
|
598
|
-
onGrantDelegation: () =>
|
|
624
|
+
onGrantDelegation: () => F(!0),
|
|
625
|
+
onNavigate: q
|
|
626
|
+
}),
|
|
627
|
+
E === "analytics" && /* @__PURE__ */ G(Je, { appId: J.id }),
|
|
628
|
+
E === "playground" && /* @__PURE__ */ G(et, { app: J }),
|
|
629
|
+
E === "oauth" && /* @__PURE__ */ G(Ve, {
|
|
630
|
+
appId: J.id,
|
|
599
631
|
onNavigate: q
|
|
600
632
|
}),
|
|
601
|
-
E === "
|
|
602
|
-
|
|
603
|
-
|
|
633
|
+
E === "api-keys" && /* @__PURE__ */ G(He, {
|
|
634
|
+
appId: J.id,
|
|
635
|
+
onNavigate: q
|
|
636
|
+
}),
|
|
637
|
+
E === "store-listing" && /* @__PURE__ */ G(ot, {
|
|
604
638
|
app: J,
|
|
605
|
-
versionCount:
|
|
639
|
+
versionCount: L?.application?.versions?.totalCount ?? 0,
|
|
606
640
|
isPackageApp: Y,
|
|
607
|
-
pricingDone:
|
|
608
|
-
onNavigateToVersions: Y ? () => D("versions") : void 0,
|
|
641
|
+
pricingDone: Z,
|
|
642
|
+
onNavigateToVersions: Y || X ? () => D("versions") : void 0,
|
|
609
643
|
onNavigateToPricing: () => D("pricing"),
|
|
610
644
|
onNavigateToSubmission: () => q(`/apps/${J.id}/store-submission`)
|
|
611
645
|
}),
|
|
612
|
-
E === "pricing" && /* @__PURE__ */ G(
|
|
646
|
+
E === "pricing" && /* @__PURE__ */ G(We, {
|
|
613
647
|
app: J,
|
|
614
|
-
platformFeeRate:
|
|
615
|
-
billingAccountLinked:
|
|
648
|
+
platformFeeRate: Qe,
|
|
649
|
+
billingAccountLinked: $e,
|
|
616
650
|
onNavigateToRevenue: () => q("/revenue"),
|
|
617
|
-
isReadyToSubmit:
|
|
651
|
+
isReadyToSubmit: Q
|
|
618
652
|
}),
|
|
619
|
-
E === "versions" && /* @__PURE__ */ G(
|
|
653
|
+
E === "versions" && /* @__PURE__ */ G(Ge, {
|
|
620
654
|
appId: J.id,
|
|
621
655
|
onNavigate: q,
|
|
622
|
-
pricingDone:
|
|
656
|
+
pricingDone: Z,
|
|
623
657
|
onNavigateToPricing: () => D("pricing")
|
|
624
658
|
})
|
|
625
659
|
]
|
|
626
660
|
}),
|
|
627
|
-
/* @__PURE__ */ G(
|
|
661
|
+
/* @__PURE__ */ G(re, {
|
|
628
662
|
open: O,
|
|
629
|
-
onOpenChange:
|
|
663
|
+
onOpenChange: te,
|
|
630
664
|
onConfirm: Fe,
|
|
631
665
|
title: p("devportal.rotateAppSecret", "Rotate App Secret"),
|
|
632
666
|
description: p("devportal.rotateAppSecretDescription", "This will generate a new client secret and invalidate the current one. All existing integrations using the old secret will stop working immediately."),
|
|
633
667
|
confirmLabel: p("devportal.rotateSecret", "Rotate Secret"),
|
|
634
668
|
cancelLabel: p("devportal.cancel", "Cancel"),
|
|
635
669
|
variant: "warning",
|
|
636
|
-
loading:
|
|
670
|
+
loading: _e
|
|
637
671
|
}),
|
|
638
|
-
/* @__PURE__ */ G(
|
|
639
|
-
open:
|
|
640
|
-
onOpenChange:
|
|
641
|
-
onConfirm:
|
|
672
|
+
/* @__PURE__ */ G(re, {
|
|
673
|
+
open: ne,
|
|
674
|
+
onOpenChange: k,
|
|
675
|
+
onConfirm: Ie,
|
|
642
676
|
title: p("devportal.deactivateApplication", "Deactivate Application"),
|
|
643
677
|
description: p("devportal.deactivateApplicationDescription", "This will deactivate the application. All OAuth clients, API keys, and webhooks associated with this app will stop functioning. This action can be reversed by reactivating the app."),
|
|
644
678
|
confirmLabel: p("devportal.deactivate", "Deactivate"),
|
|
645
679
|
cancelLabel: p("devportal.cancel", "Cancel"),
|
|
646
680
|
variant: "destructive",
|
|
647
|
-
loading:
|
|
681
|
+
loading: ye
|
|
648
682
|
}),
|
|
649
|
-
/* @__PURE__ */ G(
|
|
650
|
-
open:
|
|
651
|
-
onOpenChange:
|
|
683
|
+
/* @__PURE__ */ G(ie, {
|
|
684
|
+
open: M,
|
|
685
|
+
onOpenChange: F,
|
|
652
686
|
appId: J.appId || "",
|
|
653
687
|
appName: J.name,
|
|
654
688
|
appScopes: J.scopes?.map((e) => e.scope) ?? [],
|
|
655
689
|
onSuccess: () => {
|
|
656
|
-
|
|
690
|
+
F(!1);
|
|
657
691
|
}
|
|
658
692
|
})
|
|
659
693
|
]
|
|
660
694
|
});
|
|
661
|
-
},
|
|
662
|
-
let { t
|
|
695
|
+
}, Ve = ({ onNavigate: e }) => {
|
|
696
|
+
let { t } = P(), n = (e, n) => {
|
|
697
|
+
let r = t(e);
|
|
698
|
+
return r === e ? n : r;
|
|
699
|
+
};
|
|
700
|
+
return /* @__PURE__ */ K("div", {
|
|
701
|
+
className: "space-y-4 py-4 text-center",
|
|
702
|
+
children: [
|
|
703
|
+
/* @__PURE__ */ G(H, { className: "mx-auto h-10 w-10 text-text-secondary" }),
|
|
704
|
+
/* @__PURE__ */ G("h3", {
|
|
705
|
+
className: "font-medium",
|
|
706
|
+
children: n("devportal.oauthApps", "OAuth Apps")
|
|
707
|
+
}),
|
|
708
|
+
/* @__PURE__ */ G("p", {
|
|
709
|
+
className: "text-sm text-text-secondary",
|
|
710
|
+
children: n("devportal.oauthAppsManagedCentrally", "OAuth apps are now managed centrally. Visit the OAuth Apps page to create and manage your apps.")
|
|
711
|
+
}),
|
|
712
|
+
/* @__PURE__ */ K("button", {
|
|
713
|
+
onClick: () => e("/oauth"),
|
|
714
|
+
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",
|
|
715
|
+
children: [/* @__PURE__ */ G(R, { size: 16 }), n("devportal.manageOAuthApps", "Manage OAuth Apps")]
|
|
716
|
+
})
|
|
717
|
+
]
|
|
718
|
+
});
|
|
719
|
+
}, He = ({ onNavigate: e }) => {
|
|
720
|
+
let { t } = P(), n = (e, n) => {
|
|
721
|
+
let r = t(e);
|
|
722
|
+
return r === e ? n : r;
|
|
723
|
+
};
|
|
724
|
+
return /* @__PURE__ */ K("div", {
|
|
725
|
+
className: "space-y-4 py-4 text-center",
|
|
726
|
+
children: [
|
|
727
|
+
/* @__PURE__ */ G(z, { className: "mx-auto h-10 w-10 text-text-secondary" }),
|
|
728
|
+
/* @__PURE__ */ G("h3", {
|
|
729
|
+
className: "font-medium",
|
|
730
|
+
children: n("devportal.apiKeys", "API Keys")
|
|
731
|
+
}),
|
|
732
|
+
/* @__PURE__ */ G("p", {
|
|
733
|
+
className: "text-sm text-text-secondary",
|
|
734
|
+
children: n("devportal.apiKeysManagedCentrally", "API keys are now managed centrally. Visit the API Keys page to generate and manage your keys.")
|
|
735
|
+
}),
|
|
736
|
+
/* @__PURE__ */ K("button", {
|
|
737
|
+
onClick: () => e("/api-keys"),
|
|
738
|
+
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",
|
|
739
|
+
children: [/* @__PURE__ */ G(R, { size: 16 }), n("devportal.manageApiKeys", "Manage API Keys")]
|
|
740
|
+
})
|
|
741
|
+
]
|
|
742
|
+
});
|
|
743
|
+
}, Y = .01, X = (e) => e * Y, Ue = (e) => Math.round(e / Y), We = ({ app: e, platformFeeRate: n, billingAccountLinked: r, onNavigateToRevenue: i, isReadyToSubmit: a = !1 }) => {
|
|
744
|
+
let { t: o } = P(), s = (e, t) => {
|
|
663
745
|
let n = o(e);
|
|
664
746
|
return n === e ? t : n;
|
|
665
|
-
}, c = e.pricingDetails ?? {}, [l, u] =
|
|
747
|
+
}, c = e.pricingDetails ?? {}, [l, u] = N({
|
|
666
748
|
pricingType: e.pricingType ?? "FREE",
|
|
667
749
|
price: typeof c.price == "number" ? String(c.price) : ""
|
|
668
|
-
}), [d, f] =
|
|
669
|
-
m.current = e,
|
|
750
|
+
}), [d, f] = N(!1), [p] = _(), m = M(e);
|
|
751
|
+
m.current = e, se(() => {
|
|
670
752
|
let e = m.current.pricingDetails ?? {};
|
|
671
753
|
u({
|
|
672
754
|
pricingType: m.current.pricingType ?? "FREE",
|
|
@@ -698,7 +780,7 @@ var Ie = [
|
|
|
698
780
|
} finally {
|
|
699
781
|
f(!1);
|
|
700
782
|
}
|
|
701
|
-
}, v = l.pricingType !== "FREE", y = parseInt(l.price, 10), b = v && !isNaN(y) && y > 0, x = b ?
|
|
783
|
+
}, v = l.pricingType !== "FREE", y = parseInt(l.price, 10), b = v && !isNaN(y) && y > 0, x = b ? X(y) : 0, S = b ? Math.round(y * n) : 0, C = X(S), w = b ? y - S : 0, ee = X(w), E = (e) => "$" + e.toLocaleString("en-US", {
|
|
702
784
|
minimumFractionDigits: 2,
|
|
703
785
|
maximumFractionDigits: 2
|
|
704
786
|
}), D = (e) => e.toLocaleString("en-US") + " cr";
|
|
@@ -707,7 +789,7 @@ var Ie = [
|
|
|
707
789
|
children: [
|
|
708
790
|
/* @__PURE__ */ K("div", {
|
|
709
791
|
className: "flex items-start gap-3 rounded-lg border border-border-subtle bg-bg-sunken px-4 py-3",
|
|
710
|
-
children: [/* @__PURE__ */ G(
|
|
792
|
+
children: [/* @__PURE__ */ G(L, {
|
|
711
793
|
size: 16,
|
|
712
794
|
className: "mt-0.5 shrink-0 text-primary"
|
|
713
795
|
}), /* @__PURE__ */ K("p", {
|
|
@@ -724,7 +806,7 @@ var Ie = [
|
|
|
724
806
|
className: "font-medium",
|
|
725
807
|
children: [
|
|
726
808
|
"1 credit = ",
|
|
727
|
-
E(
|
|
809
|
+
E(Y),
|
|
728
810
|
" USD."
|
|
729
811
|
]
|
|
730
812
|
}),
|
|
@@ -748,7 +830,7 @@ var Ie = [
|
|
|
748
830
|
className: "rounded-xl border border-border-subtle bg-bg-surface p-5 space-y-3",
|
|
749
831
|
children: [/* @__PURE__ */ G("div", {
|
|
750
832
|
className: "flex h-9 w-9 items-center justify-center rounded-lg bg-status-success-bg-subtle",
|
|
751
|
-
children: /* @__PURE__ */ G(
|
|
833
|
+
children: /* @__PURE__ */ G(we, {
|
|
752
834
|
size: 18,
|
|
753
835
|
className: "text-status-success-text"
|
|
754
836
|
})
|
|
@@ -780,7 +862,7 @@ var Ie = [
|
|
|
780
862
|
className: "rounded-xl border border-border-subtle bg-bg-surface p-5 space-y-3",
|
|
781
863
|
children: [/* @__PURE__ */ G("div", {
|
|
782
864
|
className: "flex h-9 w-9 items-center justify-center rounded-lg bg-action-primary-bg/10",
|
|
783
|
-
children: /* @__PURE__ */ G(
|
|
865
|
+
children: /* @__PURE__ */ G(Ee, {
|
|
784
866
|
size: 18,
|
|
785
867
|
className: "text-primary"
|
|
786
868
|
})
|
|
@@ -809,7 +891,7 @@ var Ie = [
|
|
|
809
891
|
className: "rounded-xl border border-border-subtle bg-bg-surface p-5 space-y-3",
|
|
810
892
|
children: [/* @__PURE__ */ G("div", {
|
|
811
893
|
className: "flex h-9 w-9 items-center justify-center rounded-lg bg-status-warning-bg-subtle",
|
|
812
|
-
children: /* @__PURE__ */ G(
|
|
894
|
+
children: /* @__PURE__ */ G(he, {
|
|
813
895
|
size: 18,
|
|
814
896
|
className: "text-status-warning-text"
|
|
815
897
|
})
|
|
@@ -843,7 +925,7 @@ var Ie = [
|
|
|
843
925
|
})] }),
|
|
844
926
|
/* @__PURE__ */ G("div", {
|
|
845
927
|
className: "flex flex-wrap gap-2",
|
|
846
|
-
children:
|
|
928
|
+
children: nt.map((e) => /* @__PURE__ */ G("button", {
|
|
847
929
|
type: "button",
|
|
848
930
|
onClick: () => h("pricingType", e.value),
|
|
849
931
|
className: t("rounded-md border px-4 py-2 text-sm font-medium transition-colors", l.pricingType === e.value ? "bg-action-primary-bg text-action-primary-text border-primary" : "hover:bg-bg-sunken border-border-subtle"),
|
|
@@ -889,7 +971,7 @@ var Ie = [
|
|
|
889
971
|
E(x),
|
|
890
972
|
" USD at the current credit rate (1 cr =",
|
|
891
973
|
" ",
|
|
892
|
-
E(
|
|
974
|
+
E(Y),
|
|
893
975
|
")"
|
|
894
976
|
]
|
|
895
977
|
}),
|
|
@@ -908,13 +990,13 @@ var Ie = [
|
|
|
908
990
|
50
|
|
909
991
|
].map((e) => /* @__PURE__ */ K("button", {
|
|
910
992
|
type: "button",
|
|
911
|
-
onClick: () => h("price", String(
|
|
993
|
+
onClick: () => h("price", String(Ue(e))),
|
|
912
994
|
className: "rounded border border-border-subtle px-2 py-0.5 hover:bg-bg-sunken transition-colors",
|
|
913
995
|
children: [
|
|
914
996
|
"$",
|
|
915
997
|
e,
|
|
916
998
|
" = ",
|
|
917
|
-
|
|
999
|
+
Ue(e).toLocaleString(),
|
|
918
1000
|
" cr"
|
|
919
1001
|
]
|
|
920
1002
|
}, e))]
|
|
@@ -1004,7 +1086,7 @@ var Ie = [
|
|
|
1004
1086
|
}),
|
|
1005
1087
|
!r && /* @__PURE__ */ K("div", {
|
|
1006
1088
|
className: "flex items-start gap-3 rounded-lg border border-status-warning-bg bg-status-warning-bg-subtle p-4",
|
|
1007
|
-
children: [/* @__PURE__ */ G(
|
|
1089
|
+
children: [/* @__PURE__ */ G(ce, {
|
|
1008
1090
|
size: 16,
|
|
1009
1091
|
className: "mt-0.5 shrink-0 text-status-warning-text"
|
|
1010
1092
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -1041,7 +1123,7 @@ var Ie = [
|
|
|
1041
1123
|
children: [
|
|
1042
1124
|
/* @__PURE__ */ K("li", {
|
|
1043
1125
|
className: "flex items-start gap-2",
|
|
1044
|
-
children: [/* @__PURE__ */ G(
|
|
1126
|
+
children: [/* @__PURE__ */ G(I, {
|
|
1045
1127
|
size: 14,
|
|
1046
1128
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1047
1129
|
}), /* @__PURE__ */ K("span", { children: [
|
|
@@ -1059,21 +1141,21 @@ var Ie = [
|
|
|
1059
1141
|
}),
|
|
1060
1142
|
/* @__PURE__ */ K("li", {
|
|
1061
1143
|
className: "flex items-start gap-2",
|
|
1062
|
-
children: [/* @__PURE__ */ G(
|
|
1144
|
+
children: [/* @__PURE__ */ G(I, {
|
|
1063
1145
|
size: 14,
|
|
1064
1146
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1065
1147
|
}), /* @__PURE__ */ G("span", { children: "All prices are in platform credits. The USD equivalent is indicative only and may vary with the current credit rate." })]
|
|
1066
1148
|
}),
|
|
1067
1149
|
/* @__PURE__ */ K("li", {
|
|
1068
1150
|
className: "flex items-start gap-2",
|
|
1069
|
-
children: [/* @__PURE__ */ G(
|
|
1151
|
+
children: [/* @__PURE__ */ G(I, {
|
|
1070
1152
|
size: 14,
|
|
1071
1153
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1072
1154
|
}), /* @__PURE__ */ G("span", { children: "Earnings are credited to your billing account per-sale. Cash withdrawals are subject to a minimum threshold and applicable taxes in your jurisdiction." })]
|
|
1073
1155
|
}),
|
|
1074
1156
|
/* @__PURE__ */ K("li", {
|
|
1075
1157
|
className: "flex items-start gap-2",
|
|
1076
|
-
children: [/* @__PURE__ */ G(
|
|
1158
|
+
children: [/* @__PURE__ */ G(I, {
|
|
1077
1159
|
size: 14,
|
|
1078
1160
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1079
1161
|
}), /* @__PURE__ */ K("span", { children: [
|
|
@@ -1100,13 +1182,13 @@ var Ie = [
|
|
|
1100
1182
|
onClick: () => void g(),
|
|
1101
1183
|
disabled: d,
|
|
1102
1184
|
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",
|
|
1103
|
-
children: d ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
1185
|
+
children: d ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(B, {
|
|
1104
1186
|
size: 16,
|
|
1105
1187
|
className: "animate-spin"
|
|
1106
|
-
}), s("devportal.saving", "Saving…")] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
1188
|
+
}), s("devportal.saving", "Saving…")] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(L, { size: 16 }), s("devportal.savePricing", "Save Pricing")] })
|
|
1107
1189
|
}), a && /* @__PURE__ */ K("div", {
|
|
1108
1190
|
className: "flex items-start gap-3 rounded-lg border border-status-success-bg bg-status-success-bg-subtle px-4 py-3",
|
|
1109
|
-
children: [/* @__PURE__ */ G(
|
|
1191
|
+
children: [/* @__PURE__ */ G(I, {
|
|
1110
1192
|
size: 16,
|
|
1111
1193
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1112
1194
|
}), /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("p", {
|
|
@@ -1120,16 +1202,16 @@ var Ie = [
|
|
|
1120
1202
|
})
|
|
1121
1203
|
]
|
|
1122
1204
|
});
|
|
1123
|
-
},
|
|
1124
|
-
let { t: o } =
|
|
1205
|
+
}, Ge = ({ appId: e, onNavigate: n, pricingDone: i = !1, onNavigateToPricing: a }) => {
|
|
1206
|
+
let { t: o } = P(), s = (e, t) => {
|
|
1125
1207
|
let n = o(e);
|
|
1126
1208
|
return n === e ? t : n;
|
|
1127
1209
|
}, { data: l, loading: u, error: d } = c({
|
|
1128
1210
|
variables: { applicationId: e },
|
|
1129
1211
|
fetchPolicy: "cache-and-network"
|
|
1130
1212
|
});
|
|
1131
|
-
if (u) return /* @__PURE__ */ G(
|
|
1132
|
-
if (d) return /* @__PURE__ */ G(
|
|
1213
|
+
if (u) return /* @__PURE__ */ G(ze, { message: s("devportal.loadingVersions", "Loading versions…") });
|
|
1214
|
+
if (d) return /* @__PURE__ */ G(Be, { message: d.message });
|
|
1133
1215
|
let f = (l?.application?.versions?.edges ?? []).map((e) => e.node);
|
|
1134
1216
|
return /* @__PURE__ */ K("div", {
|
|
1135
1217
|
className: "space-y-4",
|
|
@@ -1239,7 +1321,7 @@ var Ie = [
|
|
|
1239
1321
|
})
|
|
1240
1322
|
}) : /* @__PURE__ */ G(r, {
|
|
1241
1323
|
illustration: "empty-generic",
|
|
1242
|
-
icon: /* @__PURE__ */ G(
|
|
1324
|
+
icon: /* @__PURE__ */ G(ye, { size: 32 }),
|
|
1243
1325
|
title: s("devportal.noVersions", "No versions yet"),
|
|
1244
1326
|
description: s("devportal.noVersionsDescription", "Upload your first version to make this item available for review and distribution."),
|
|
1245
1327
|
action: /* @__PURE__ */ K("button", {
|
|
@@ -1251,7 +1333,7 @@ var Ie = [
|
|
|
1251
1333
|
f.length > 0 && !i && a && /* @__PURE__ */ K("div", {
|
|
1252
1334
|
className: "mt-4 flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-sunken px-4 py-3",
|
|
1253
1335
|
children: [
|
|
1254
|
-
/* @__PURE__ */ G(
|
|
1336
|
+
/* @__PURE__ */ G(L, {
|
|
1255
1337
|
size: 16,
|
|
1256
1338
|
className: "shrink-0 text-primary"
|
|
1257
1339
|
}),
|
|
@@ -1263,41 +1345,41 @@ var Ie = [
|
|
|
1263
1345
|
type: "button",
|
|
1264
1346
|
onClick: a,
|
|
1265
1347
|
className: "inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline underline-offset-2 whitespace-nowrap",
|
|
1266
|
-
children: [s("devportal.nextSetPricing", "Set Pricing"), /* @__PURE__ */ G(
|
|
1348
|
+
children: [s("devportal.nextSetPricing", "Set Pricing"), /* @__PURE__ */ G(de, { size: 15 })]
|
|
1267
1349
|
})
|
|
1268
1350
|
]
|
|
1269
1351
|
})
|
|
1270
1352
|
]
|
|
1271
1353
|
});
|
|
1272
|
-
},
|
|
1273
|
-
let { t: n } =
|
|
1354
|
+
}, Ke = ({ appId: e, onNavigate: t }) => {
|
|
1355
|
+
let { t: n } = P(), r = (e, t) => {
|
|
1274
1356
|
let r = n(e);
|
|
1275
1357
|
return r === e ? t : r;
|
|
1276
1358
|
}, { data: i, loading: a, error: o } = u({ variables: { applicationId: e } });
|
|
1277
|
-
return a ? /* @__PURE__ */ G(
|
|
1359
|
+
return a ? /* @__PURE__ */ G(ze, { message: r("devportal.loadingWebhooks", "Loading webhooks...") }) : o ? /* @__PURE__ */ G(Be, { message: o.message }) : /* @__PURE__ */ G(Xe, {
|
|
1278
1360
|
appId: e,
|
|
1279
|
-
webhooks: (i?.webhooks ?? []).map(
|
|
1361
|
+
webhooks: (i?.webhooks ?? []).map(q),
|
|
1280
1362
|
onNavigate: t
|
|
1281
1363
|
});
|
|
1282
|
-
},
|
|
1283
|
-
let { t: o } =
|
|
1364
|
+
}, qe = ({ authAppId: e, appName: t, onGrantDelegation: n, onNavigate: a }) => {
|
|
1365
|
+
let { t: o } = P(), s = (e, t) => {
|
|
1284
1366
|
let n = o(e);
|
|
1285
1367
|
return n === e ? t : n;
|
|
1286
|
-
}, { data: c, loading: l, error: u, refetch: d } = i(), [f] = p(), [m, h] =
|
|
1368
|
+
}, { data: c, loading: l, error: u, refetch: d } = i(), [f] = p(), [m, h] = N([]), [g, _] = N(!1), [v, y] = N(/* @__PURE__ */ new Set()), [b, x] = N(null), S = j(() => c?.currentUserDelegations?.delegations ? c.currentUserDelegations.delegations.filter((t) => t.appId === e).map(Ie) : [], [e, c]), C = j(() => S.filter((e) => e.status === "ACTIVE"), [S]), w = j(() => C.filter((e) => v.has(e.id)), [C, v]), T = C.length > 0 && C.every((e) => v.has(e.id)), ee = C.some((e) => v.has(e.id)) && !T, E = A((e, t) => {
|
|
1287
1369
|
y((n) => {
|
|
1288
1370
|
let r = new Set(n);
|
|
1289
1371
|
return t ? r.add(e) : r.delete(e), r;
|
|
1290
1372
|
});
|
|
1291
|
-
}, []), D =
|
|
1373
|
+
}, []), D = A((e) => {
|
|
1292
1374
|
y((t) => {
|
|
1293
1375
|
let n = new Set(t);
|
|
1294
1376
|
return C.forEach((t) => {
|
|
1295
1377
|
e ? n.add(t.id) : n.delete(t.id);
|
|
1296
1378
|
}), n;
|
|
1297
1379
|
});
|
|
1298
|
-
}, [C]), O =
|
|
1380
|
+
}, [C]), O = A(() => {
|
|
1299
1381
|
y(/* @__PURE__ */ new Set());
|
|
1300
|
-
}, []),
|
|
1382
|
+
}, []), te = A(async (e) => {
|
|
1301
1383
|
_(!0);
|
|
1302
1384
|
try {
|
|
1303
1385
|
let t = await Promise.allSettled(e.map((e) => f({ variables: { id: e } }))), n = t.filter((e) => e.status === "fulfilled").length, r = t.length - n;
|
|
@@ -1309,7 +1391,7 @@ var Ie = [
|
|
|
1309
1391
|
_(!1);
|
|
1310
1392
|
}
|
|
1311
1393
|
}, [f, d]);
|
|
1312
|
-
return e ? l ? /* @__PURE__ */ G(
|
|
1394
|
+
return e ? l ? /* @__PURE__ */ G(ze, { message: s("devportal.loadingDelegations", "Loading delegations...") }) : u ? /* @__PURE__ */ G(Be, { message: u.message }) : /* @__PURE__ */ K(W, { children: [
|
|
1313
1395
|
b && /* @__PURE__ */ G("div", {
|
|
1314
1396
|
className: "rounded-lg border border-border-subtle bg-status-success-bg-subtle p-3 text-sm text-status-success-text",
|
|
1315
1397
|
children: /* @__PURE__ */ K("div", {
|
|
@@ -1321,7 +1403,7 @@ var Ie = [
|
|
|
1321
1403
|
})]
|
|
1322
1404
|
})
|
|
1323
1405
|
}),
|
|
1324
|
-
/* @__PURE__ */ G(
|
|
1406
|
+
/* @__PURE__ */ G(Ze, {
|
|
1325
1407
|
appName: t,
|
|
1326
1408
|
delegations: S,
|
|
1327
1409
|
onGrantDelegation: n,
|
|
@@ -1334,13 +1416,13 @@ var Ie = [
|
|
|
1334
1416
|
allVisibleSelected: T,
|
|
1335
1417
|
partiallySelected: ee
|
|
1336
1418
|
}),
|
|
1337
|
-
/* @__PURE__ */ G(
|
|
1419
|
+
/* @__PURE__ */ G(re, {
|
|
1338
1420
|
open: m.length > 0,
|
|
1339
1421
|
onOpenChange: (e) => {
|
|
1340
1422
|
e || h([]);
|
|
1341
1423
|
},
|
|
1342
1424
|
onConfirm: () => {
|
|
1343
|
-
m.length > 0 &&
|
|
1425
|
+
m.length > 0 && te(m);
|
|
1344
1426
|
},
|
|
1345
1427
|
title: m.length > 1 ? s("devportal.revokeDelegations", "Revoke Delegations") : s("devportal.revokeDelegation", "Revoke Delegation"),
|
|
1346
1428
|
description: m.length > 1 ? s("devportal.revokeMultipleDelegationsDescription", `This will immediately revoke ${m.length} selected delegations.`) : s("devportal.revokeDelegationDescription", "This will immediately revoke the delegation. The app will no longer be able to act on your behalf with the selected permissions."),
|
|
@@ -1351,31 +1433,31 @@ var Ie = [
|
|
|
1351
1433
|
})
|
|
1352
1434
|
] }) : /* @__PURE__ */ G(r, {
|
|
1353
1435
|
illustration: "empty-generic",
|
|
1354
|
-
icon: /* @__PURE__ */ G(
|
|
1436
|
+
icon: /* @__PURE__ */ G(H, { size: 32 }),
|
|
1355
1437
|
title: s("devportal.linkAuthAppFirst", "Link an auth app first"),
|
|
1356
1438
|
description: s("devportal.linkAuthAppFirstDescription", "Delegations are managed through auth apps. Create or link an auth app before granting app-as-user access."),
|
|
1357
1439
|
action: /* @__PURE__ */ K("button", {
|
|
1358
1440
|
onClick: () => a("/oauth"),
|
|
1359
1441
|
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",
|
|
1360
|
-
children: [/* @__PURE__ */ G(
|
|
1442
|
+
children: [/* @__PURE__ */ G(R, { size: 16 }), s("devportal.manageOAuthApps", "Manage OAuth Apps")]
|
|
1361
1443
|
})
|
|
1362
1444
|
});
|
|
1363
|
-
},
|
|
1364
|
-
let { t } =
|
|
1445
|
+
}, Je = ({ appId: e }) => {
|
|
1446
|
+
let { t } = P(), n = (e, n) => {
|
|
1365
1447
|
let r = t(e);
|
|
1366
1448
|
return r === e ? n : r;
|
|
1367
|
-
}, r =
|
|
1449
|
+
}, r = j(() => /* @__PURE__ */ new Date(), []), { data: i, loading: a, error: s } = o({ variables: {
|
|
1368
1450
|
applicationId: e,
|
|
1369
1451
|
period: "daily",
|
|
1370
|
-
startDate:
|
|
1452
|
+
startDate: j(() => {
|
|
1371
1453
|
let e = new Date(r);
|
|
1372
1454
|
return e.setDate(e.getDate() - 30), e;
|
|
1373
1455
|
}, [r]).toISOString(),
|
|
1374
1456
|
endDate: r.toISOString()
|
|
1375
1457
|
} });
|
|
1376
|
-
return a ? /* @__PURE__ */ G(
|
|
1377
|
-
},
|
|
1378
|
-
let { t } =
|
|
1458
|
+
return a ? /* @__PURE__ */ G(ze, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : s ? /* @__PURE__ */ G(Be, { message: s.message }) : /* @__PURE__ */ G(Qe, { analytics: (i?.applicationAnalytics ?? []).map(Fe) });
|
|
1459
|
+
}, Ye = ({ app: e }) => {
|
|
1460
|
+
let { t } = P(), n = (e, n) => {
|
|
1379
1461
|
let r = t(e);
|
|
1380
1462
|
return r === e ? n : r;
|
|
1381
1463
|
};
|
|
@@ -1384,22 +1466,22 @@ var Ie = [
|
|
|
1384
1466
|
children: [/* @__PURE__ */ K("div", {
|
|
1385
1467
|
className: "lg:col-span-2 space-y-6",
|
|
1386
1468
|
children: [
|
|
1387
|
-
/* @__PURE__ */ G(
|
|
1469
|
+
/* @__PURE__ */ G(Me, { children: /* @__PURE__ */ K("div", {
|
|
1388
1470
|
className: "grid gap-4 sm:grid-cols-4",
|
|
1389
1471
|
children: [
|
|
1390
|
-
/* @__PURE__ */ G(
|
|
1472
|
+
/* @__PURE__ */ G($, {
|
|
1391
1473
|
label: n("devportal.totalInstalls", "Total Installs"),
|
|
1392
1474
|
value: e.installCount.toLocaleString()
|
|
1393
1475
|
}),
|
|
1394
|
-
/* @__PURE__ */ G(
|
|
1476
|
+
/* @__PURE__ */ G($, {
|
|
1395
1477
|
label: n("devportal.activeInstalls", "Active Installs"),
|
|
1396
1478
|
value: e.activeInstallCount.toLocaleString()
|
|
1397
1479
|
}),
|
|
1398
|
-
/* @__PURE__ */ G(
|
|
1480
|
+
/* @__PURE__ */ G($, {
|
|
1399
1481
|
label: n("devportal.averageRating", "Average Rating"),
|
|
1400
1482
|
value: e.averageRating ? `${e.averageRating.toFixed(1)} ★` : n("devportal.notAvailable", "N/A")
|
|
1401
1483
|
}),
|
|
1402
|
-
/* @__PURE__ */ G(
|
|
1484
|
+
/* @__PURE__ */ G($, {
|
|
1403
1485
|
label: n("devportal.reviews", "Reviews"),
|
|
1404
1486
|
value: e.reviewCount.toString()
|
|
1405
1487
|
})
|
|
@@ -1489,27 +1571,27 @@ var Ie = [
|
|
|
1489
1571
|
children: /* @__PURE__ */ K("div", {
|
|
1490
1572
|
className: "space-y-2",
|
|
1491
1573
|
children: [
|
|
1492
|
-
e.websiteUrl && /* @__PURE__ */ G(
|
|
1574
|
+
e.websiteUrl && /* @__PURE__ */ G(st, {
|
|
1493
1575
|
label: n("devportal.website", "Website"),
|
|
1494
1576
|
url: e.websiteUrl
|
|
1495
1577
|
}),
|
|
1496
|
-
e.documentationUrl && /* @__PURE__ */ G(
|
|
1578
|
+
e.documentationUrl && /* @__PURE__ */ G(st, {
|
|
1497
1579
|
label: n("devportal.documentation", "Documentation"),
|
|
1498
1580
|
url: e.documentationUrl
|
|
1499
1581
|
}),
|
|
1500
|
-
e.supportUrl && /* @__PURE__ */ G(
|
|
1582
|
+
e.supportUrl && /* @__PURE__ */ G(st, {
|
|
1501
1583
|
label: n("devportal.support", "Support"),
|
|
1502
1584
|
url: e.supportUrl
|
|
1503
1585
|
}),
|
|
1504
|
-
e.githubUrl && /* @__PURE__ */ G(
|
|
1586
|
+
e.githubUrl && /* @__PURE__ */ G(st, {
|
|
1505
1587
|
label: n("devportal.github", "GitHub"),
|
|
1506
1588
|
url: e.githubUrl
|
|
1507
1589
|
}),
|
|
1508
|
-
e.privacyPolicyUrl && /* @__PURE__ */ G(
|
|
1590
|
+
e.privacyPolicyUrl && /* @__PURE__ */ G(st, {
|
|
1509
1591
|
label: n("devportal.privacyPolicy", "Privacy Policy"),
|
|
1510
1592
|
url: e.privacyPolicyUrl
|
|
1511
1593
|
}),
|
|
1512
|
-
e.termsOfServiceUrl && /* @__PURE__ */ G(
|
|
1594
|
+
e.termsOfServiceUrl && /* @__PURE__ */ G(st, {
|
|
1513
1595
|
label: n("devportal.termsOfService", "Terms of Service"),
|
|
1514
1596
|
url: e.termsOfServiceUrl
|
|
1515
1597
|
})
|
|
@@ -1518,8 +1600,8 @@ var Ie = [
|
|
|
1518
1600
|
})]
|
|
1519
1601
|
})]
|
|
1520
1602
|
});
|
|
1521
|
-
},
|
|
1522
|
-
let { t: i } =
|
|
1603
|
+
}, Xe = ({ appId: e, webhooks: t, onNavigate: n }) => {
|
|
1604
|
+
let { t: i } = P(), a = (e, t) => {
|
|
1523
1605
|
let n = i(e);
|
|
1524
1606
|
return n === e ? t : n;
|
|
1525
1607
|
};
|
|
@@ -1539,7 +1621,7 @@ var Ie = [
|
|
|
1539
1621
|
}), /* @__PURE__ */ K("button", {
|
|
1540
1622
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
1541
1623
|
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",
|
|
1542
|
-
children: [/* @__PURE__ */ G(
|
|
1624
|
+
children: [/* @__PURE__ */ G(V, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
|
|
1543
1625
|
})]
|
|
1544
1626
|
}), t.length > 0 ? /* @__PURE__ */ G("div", {
|
|
1545
1627
|
className: "space-y-4",
|
|
@@ -1563,7 +1645,7 @@ var Ie = [
|
|
|
1563
1645
|
})] }), /* @__PURE__ */ G("button", {
|
|
1564
1646
|
onClick: () => n(`/apps/${e}/webhooks/${t.id}`),
|
|
1565
1647
|
className: "rounded-md p-1 hover:bg-bg-sunken",
|
|
1566
|
-
children: /* @__PURE__ */ G(
|
|
1648
|
+
children: /* @__PURE__ */ G(ve, { size: 20 })
|
|
1567
1649
|
})]
|
|
1568
1650
|
}),
|
|
1569
1651
|
/* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("p", {
|
|
@@ -1620,18 +1702,18 @@ var Ie = [
|
|
|
1620
1702
|
}, t.id))
|
|
1621
1703
|
}) : /* @__PURE__ */ G(r, {
|
|
1622
1704
|
illustration: "empty-notifications",
|
|
1623
|
-
icon: /* @__PURE__ */ G(
|
|
1705
|
+
icon: /* @__PURE__ */ G(De, { size: 32 }),
|
|
1624
1706
|
title: a("devportal.noWebhooks", "No webhooks"),
|
|
1625
1707
|
description: a("devportal.noWebhooksDescription", "Add a webhook to receive event notifications"),
|
|
1626
1708
|
action: /* @__PURE__ */ K("button", {
|
|
1627
1709
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
1628
1710
|
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",
|
|
1629
|
-
children: [/* @__PURE__ */ G(
|
|
1711
|
+
children: [/* @__PURE__ */ G(V, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
|
|
1630
1712
|
})
|
|
1631
1713
|
})]
|
|
1632
1714
|
});
|
|
1633
|
-
},
|
|
1634
|
-
let { t: p } =
|
|
1715
|
+
}, Ze = ({ appName: e, delegations: n, onGrantDelegation: i, onRevokeDelegation: a, selectedDelegationIds: o, onToggleSelectDelegation: s, onToggleAllDelegations: c, onClearSelection: l, onRevokeSelected: u, allVisibleSelected: d, partiallySelected: f }) => {
|
|
1716
|
+
let { t: p } = P(), m = (e, t) => {
|
|
1635
1717
|
let n = p(e);
|
|
1636
1718
|
return n === e ? t : n;
|
|
1637
1719
|
}, h = n.filter((e) => e.status === "ACTIVE"), g = n.filter((e) => e.status !== "ACTIVE");
|
|
@@ -1666,7 +1748,7 @@ var Ie = [
|
|
|
1666
1748
|
})] }), /* @__PURE__ */ K("button", {
|
|
1667
1749
|
onClick: i,
|
|
1668
1750
|
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",
|
|
1669
|
-
children: [/* @__PURE__ */ G(
|
|
1751
|
+
children: [/* @__PURE__ */ G(V, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
1670
1752
|
})]
|
|
1671
1753
|
}),
|
|
1672
1754
|
h.length > 0 && /* @__PURE__ */ G("div", {
|
|
@@ -1732,7 +1814,7 @@ var Ie = [
|
|
|
1732
1814
|
className: "font-medium",
|
|
1733
1815
|
children: ["Delegation #", e.id.slice(0, 8)]
|
|
1734
1816
|
}), /* @__PURE__ */ G("span", {
|
|
1735
|
-
className: t("rounded-full px-2 py-0.5 text-xs font-medium",
|
|
1817
|
+
className: t("rounded-full px-2 py-0.5 text-xs font-medium", Re[e.status]),
|
|
1736
1818
|
children: e.status
|
|
1737
1819
|
})]
|
|
1738
1820
|
}), /* @__PURE__ */ K("p", {
|
|
@@ -1750,7 +1832,7 @@ var Ie = [
|
|
|
1750
1832
|
}), e.status === "ACTIVE" && /* @__PURE__ */ K("button", {
|
|
1751
1833
|
onClick: () => a(e.id),
|
|
1752
1834
|
className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
|
|
1753
|
-
children: [/* @__PURE__ */ G(
|
|
1835
|
+
children: [/* @__PURE__ */ G(ke, { size: 14 }), m("devportal.revoke", "Revoke")]
|
|
1754
1836
|
})]
|
|
1755
1837
|
}),
|
|
1756
1838
|
/* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("p", {
|
|
@@ -1779,7 +1861,7 @@ var Ie = [
|
|
|
1779
1861
|
e.expiresAt && /* @__PURE__ */ K("span", {
|
|
1780
1862
|
className: "flex items-center gap-1",
|
|
1781
1863
|
children: [
|
|
1782
|
-
/* @__PURE__ */ G(
|
|
1864
|
+
/* @__PURE__ */ G(fe, { size: 12 }),
|
|
1783
1865
|
m("devportal.expires", "Expires"),
|
|
1784
1866
|
" ",
|
|
1785
1867
|
new Date(e.expiresAt).toLocaleDateString()
|
|
@@ -1787,7 +1869,7 @@ var Ie = [
|
|
|
1787
1869
|
}),
|
|
1788
1870
|
!e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */ K("span", {
|
|
1789
1871
|
className: "flex items-center gap-1",
|
|
1790
|
-
children: [/* @__PURE__ */ G(
|
|
1872
|
+
children: [/* @__PURE__ */ G(ue, {
|
|
1791
1873
|
size: 12,
|
|
1792
1874
|
className: "text-status-success-text"
|
|
1793
1875
|
}), m("devportal.noExpiration", "No expiration")]
|
|
@@ -1795,7 +1877,7 @@ var Ie = [
|
|
|
1795
1877
|
e.revokedAt && /* @__PURE__ */ K("span", {
|
|
1796
1878
|
className: "flex items-center gap-1",
|
|
1797
1879
|
children: [
|
|
1798
|
-
/* @__PURE__ */ G(
|
|
1880
|
+
/* @__PURE__ */ G(ke, {
|
|
1799
1881
|
size: 12,
|
|
1800
1882
|
className: "text-status-error-text"
|
|
1801
1883
|
}),
|
|
@@ -1810,19 +1892,19 @@ var Ie = [
|
|
|
1810
1892
|
}, e.id))
|
|
1811
1893
|
}) : /* @__PURE__ */ G(r, {
|
|
1812
1894
|
illustration: "empty-people",
|
|
1813
|
-
icon: /* @__PURE__ */ G(
|
|
1895
|
+
icon: /* @__PURE__ */ G(Te, { size: 32 }),
|
|
1814
1896
|
title: m("devportal.noDelegations", "No delegations"),
|
|
1815
1897
|
description: m("devportal.noDelegationsDescription", "Grant a delegation to allow this app to act on your behalf"),
|
|
1816
1898
|
action: /* @__PURE__ */ K("button", {
|
|
1817
1899
|
onClick: i,
|
|
1818
1900
|
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",
|
|
1819
|
-
children: [/* @__PURE__ */ G(
|
|
1901
|
+
children: [/* @__PURE__ */ G(V, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
1820
1902
|
})
|
|
1821
1903
|
})
|
|
1822
1904
|
]
|
|
1823
1905
|
});
|
|
1824
|
-
},
|
|
1825
|
-
let { t } =
|
|
1906
|
+
}, Qe = ({ analytics: e }) => {
|
|
1907
|
+
let { t } = P(), n = (e, n) => {
|
|
1826
1908
|
let r = t(e);
|
|
1827
1909
|
return r === e ? n : r;
|
|
1828
1910
|
}, i = e[0], a = e[1], o = (e, t) => t ? (e - t) / t * 100 : 0;
|
|
@@ -1831,22 +1913,22 @@ var Ie = [
|
|
|
1831
1913
|
children: [/* @__PURE__ */ K("div", {
|
|
1832
1914
|
className: "grid gap-4 sm:grid-cols-4",
|
|
1833
1915
|
children: [
|
|
1834
|
-
/* @__PURE__ */ G(
|
|
1916
|
+
/* @__PURE__ */ G($, {
|
|
1835
1917
|
label: n("devportal.activeUsers", "Active Users"),
|
|
1836
1918
|
value: i?.activeUsers.toLocaleString() || "0",
|
|
1837
1919
|
trend: a ? o(i.activeUsers, a.activeUsers) : void 0
|
|
1838
1920
|
}),
|
|
1839
|
-
/* @__PURE__ */ G(
|
|
1921
|
+
/* @__PURE__ */ G($, {
|
|
1840
1922
|
label: n("devportal.apiCalls", "API Calls"),
|
|
1841
1923
|
value: i ? `${(i.apiCalls / 1e3).toFixed(1)}K` : "0",
|
|
1842
1924
|
trend: a ? o(i.apiCalls, a.apiCalls) : void 0
|
|
1843
1925
|
}),
|
|
1844
|
-
/* @__PURE__ */ G(
|
|
1926
|
+
/* @__PURE__ */ G($, {
|
|
1845
1927
|
label: n("devportal.avgResponseTime", "Avg Response Time"),
|
|
1846
1928
|
value: i?.avgResponseTime ? `${i.avgResponseTime}ms` : n("devportal.notAvailable", "N/A"),
|
|
1847
1929
|
trend: a && i?.avgResponseTime ? -o(i.avgResponseTime, a.avgResponseTime || 1) : void 0
|
|
1848
1930
|
}),
|
|
1849
|
-
/* @__PURE__ */ G(
|
|
1931
|
+
/* @__PURE__ */ G($, {
|
|
1850
1932
|
label: n("devportal.errorRate", "Error Rate"),
|
|
1851
1933
|
value: i && i.apiCalls > 0 ? `${(i.errors / i.apiCalls * 100).toFixed(2)}%` : "0%",
|
|
1852
1934
|
trend: a && i && i.apiCalls > 0 && a.apiCalls > 0 ? -o(i.errors / i.apiCalls, a.errors / a.apiCalls) : void 0
|
|
@@ -1896,17 +1978,17 @@ var Ie = [
|
|
|
1896
1978
|
]
|
|
1897
1979
|
}) : /* @__PURE__ */ G(r, {
|
|
1898
1980
|
illustration: "empty-data",
|
|
1899
|
-
icon: /* @__PURE__ */ G(
|
|
1981
|
+
icon: /* @__PURE__ */ G(F, { size: 32 }),
|
|
1900
1982
|
title: n("devportal.noAnalyticsData", "No analytics data"),
|
|
1901
1983
|
description: n("devportal.noAnalyticsDataDescription", "Analytics data will appear here once the application starts receiving traffic.")
|
|
1902
1984
|
})
|
|
1903
1985
|
})]
|
|
1904
1986
|
});
|
|
1905
|
-
},
|
|
1906
|
-
let { apiGatewayUrl: n, workspacesGatewayUrl: r, authToken: i } = e(), { t: a } =
|
|
1987
|
+
}, $e = "# Sample query — replace with your own\n# Note: introspection is disabled on this gateway for security.\n# Use a real query from your app's API schema instead.\nquery GetCurrentUser {\n currentUser {\n id\n email\n }\n}", et = ({ app: t }) => {
|
|
1988
|
+
let { apiGatewayUrl: n, workspacesGatewayUrl: r, authToken: i } = e(), { t: a } = P(), o = (e, t) => {
|
|
1907
1989
|
let n = a(e);
|
|
1908
1990
|
return n === e ? t : n;
|
|
1909
|
-
}, [s, c] =
|
|
1991
|
+
}, [s, c] = N($e), [l, u] = N("{}"), [d, f] = N(""), [p, m] = N(!1), [h, g] = N(`${n || "https://gw-global.local.burdenoff.com"}/global/graphql`), [_, v] = N(i || ""), [y, b] = N(!1), x = A(async () => {
|
|
1910
1992
|
m(!0), f("");
|
|
1911
1993
|
try {
|
|
1912
1994
|
let e = {};
|
|
@@ -1937,7 +2019,7 @@ var Ie = [
|
|
|
1937
2019
|
l,
|
|
1938
2020
|
h,
|
|
1939
2021
|
_
|
|
1940
|
-
]), S =
|
|
2022
|
+
]), S = A(() => {
|
|
1941
2023
|
i && v(i), b(!0);
|
|
1942
2024
|
}, [i]);
|
|
1943
2025
|
return /* @__PURE__ */ K("div", {
|
|
@@ -1966,7 +2048,7 @@ var Ie = [
|
|
|
1966
2048
|
})] }), /* @__PURE__ */ K("button", {
|
|
1967
2049
|
onClick: S,
|
|
1968
2050
|
className: "flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-accent transition-colors",
|
|
1969
|
-
children: [/* @__PURE__ */ G(
|
|
2051
|
+
children: [/* @__PURE__ */ G(z, { size: 14 }), o("devportal.autoFillCredentials", "Auto-fill Credentials")]
|
|
1970
2052
|
})]
|
|
1971
2053
|
}),
|
|
1972
2054
|
y && /* @__PURE__ */ K("div", {
|
|
@@ -2067,10 +2149,10 @@ var Ie = [
|
|
|
2067
2149
|
onClick: x,
|
|
2068
2150
|
disabled: p,
|
|
2069
2151
|
className: "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",
|
|
2070
|
-
children: [p ? /* @__PURE__ */ G(
|
|
2152
|
+
children: [p ? /* @__PURE__ */ G(B, {
|
|
2071
2153
|
size: 16,
|
|
2072
2154
|
className: "animate-spin"
|
|
2073
|
-
}) : /* @__PURE__ */ G(
|
|
2155
|
+
}) : /* @__PURE__ */ G(R, { size: 16 }), p ? o("devportal.executing", "Executing...") : o("devportal.executeQuery", "Execute Query")]
|
|
2074
2156
|
}),
|
|
2075
2157
|
d && /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("label", {
|
|
2076
2158
|
className: "block text-sm font-medium mb-1",
|
|
@@ -2081,10 +2163,10 @@ var Ie = [
|
|
|
2081
2163
|
})] })
|
|
2082
2164
|
]
|
|
2083
2165
|
});
|
|
2084
|
-
},
|
|
2085
|
-
let d =
|
|
2166
|
+
}, tt = ({ label: e, value: n, onChange: r, hint: i, accept: a = "image/png,image/jpeg,image/webp,image/gif,image/svg+xml", aspectClass: o = "aspect-square", upload: s, uploading: c, progress: l, error: u }) => {
|
|
2167
|
+
let d = M(null), [f, p] = N(!1), m = M(n);
|
|
2086
2168
|
m.current !== n && (m.current = n, f && p(!1));
|
|
2087
|
-
let h =
|
|
2169
|
+
let h = A(async (e) => {
|
|
2088
2170
|
try {
|
|
2089
2171
|
r((await s(e)).downloadUrl);
|
|
2090
2172
|
} catch {}
|
|
@@ -2110,7 +2192,7 @@ var Ie = [
|
|
|
2110
2192
|
className: "text-text-secondary opacity-40"
|
|
2111
2193
|
}), c && /* @__PURE__ */ K("div", {
|
|
2112
2194
|
className: "absolute inset-0 bg-bg-overlay flex flex-col items-center justify-center gap-1",
|
|
2113
|
-
children: [/* @__PURE__ */ G(
|
|
2195
|
+
children: [/* @__PURE__ */ G(B, {
|
|
2114
2196
|
size: 14,
|
|
2115
2197
|
className: "animate-spin text-white"
|
|
2116
2198
|
}), /* @__PURE__ */ K("span", {
|
|
@@ -2158,8 +2240,8 @@ var Ie = [
|
|
|
2158
2240
|
})
|
|
2159
2241
|
]
|
|
2160
2242
|
});
|
|
2161
|
-
},
|
|
2162
|
-
let s =
|
|
2243
|
+
}, Z = ({ urls: e, onChange: n, upload: r, uploading: i, progress: a, error: o }) => {
|
|
2244
|
+
let s = M(null), [c, l] = N(""), u = A(async (t) => {
|
|
2163
2245
|
try {
|
|
2164
2246
|
let i = await r(t);
|
|
2165
2247
|
n([...e, i.downloadUrl]);
|
|
@@ -2199,14 +2281,14 @@ var Ie = [
|
|
|
2199
2281
|
type: "button",
|
|
2200
2282
|
onClick: () => f(t),
|
|
2201
2283
|
className: "absolute top-1 right-1 rounded-full bg-bg-overlay text-white p-0.5 opacity-0 group-hover:opacity-100 transition-opacity",
|
|
2202
|
-
children: /* @__PURE__ */ G(
|
|
2284
|
+
children: /* @__PURE__ */ G(Oe, { size: 12 })
|
|
2203
2285
|
})]
|
|
2204
2286
|
}, t)), /* @__PURE__ */ G("button", {
|
|
2205
2287
|
type: "button",
|
|
2206
2288
|
disabled: i,
|
|
2207
2289
|
onClick: () => s.current?.click(),
|
|
2208
2290
|
className: t("w-36 aspect-video rounded-lg border-2 border-dashed border-border-subtle flex flex-col items-center justify-center gap-1.5 text-text-secondary hover:border-border-strong hover:bg-bg-sunken transition-colors disabled:opacity-50"),
|
|
2209
|
-
children: i ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
2291
|
+
children: i ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(B, {
|
|
2210
2292
|
size: 18,
|
|
2211
2293
|
className: "animate-spin text-primary"
|
|
2212
2294
|
}), /* @__PURE__ */ K("span", {
|
|
@@ -2253,13 +2335,13 @@ var Ie = [
|
|
|
2253
2335
|
})
|
|
2254
2336
|
]
|
|
2255
2337
|
});
|
|
2256
|
-
},
|
|
2338
|
+
}, Q = new Set(["workflow", "template"]), nt = [{
|
|
2257
2339
|
value: "FREE",
|
|
2258
2340
|
label: "Free"
|
|
2259
2341
|
}, {
|
|
2260
2342
|
value: "PAID",
|
|
2261
2343
|
label: "Paid"
|
|
2262
|
-
}],
|
|
2344
|
+
}], rt = {
|
|
2263
2345
|
NODE: [
|
|
2264
2346
|
{
|
|
2265
2347
|
value: "node",
|
|
@@ -2331,12 +2413,12 @@ var Ie = [
|
|
|
2331
2413
|
label: "Plugin"
|
|
2332
2414
|
}
|
|
2333
2415
|
]
|
|
2334
|
-
},
|
|
2416
|
+
}, it = {
|
|
2335
2417
|
NODE: "node",
|
|
2336
2418
|
WORKFLOW: "workflow",
|
|
2337
2419
|
APP: "app"
|
|
2338
2420
|
};
|
|
2339
|
-
function
|
|
2421
|
+
function at(e) {
|
|
2340
2422
|
let t = e.manifest ?? {}, n = t.identity ?? {}, r = (t.digital ?? {}).install ?? {}, i = t.compatibility ?? {}, a = Array.isArray(t.permissions) ? t.permissions : [], o = Array.isArray(e.screenshots) ? e.screenshots.join("\n") : "";
|
|
2341
2423
|
return {
|
|
2342
2424
|
iconUrl: e.iconUrl ?? "",
|
|
@@ -2351,7 +2433,7 @@ function rt(e) {
|
|
|
2351
2433
|
supportUrl: e.supportUrl ?? "",
|
|
2352
2434
|
privacyPolicyUrl: e.privacyPolicyUrl ?? "",
|
|
2353
2435
|
termsOfServiceUrl: e.termsOfServiceUrl ?? "",
|
|
2354
|
-
manifestItemType: typeof t.itemType == "string" ? t.itemType :
|
|
2436
|
+
manifestItemType: typeof t.itemType == "string" ? t.itemType : it[e.appType] ?? "",
|
|
2355
2437
|
manifestDisplayName: typeof n.displayName == "string" ? n.displayName : e.name ?? "",
|
|
2356
2438
|
manifestVersion: typeof n.version == "string" ? n.version : "",
|
|
2357
2439
|
manifestInstallType: typeof r.type == "string" ? r.type : "zip",
|
|
@@ -2362,15 +2444,15 @@ function rt(e) {
|
|
|
2362
2444
|
manifestJsonContent: typeof t.jsonContent == "string" ? t.jsonContent : typeof t.content == "string" ? t.content : ""
|
|
2363
2445
|
};
|
|
2364
2446
|
}
|
|
2365
|
-
var
|
|
2366
|
-
let { workspacesGatewayUrl: c, authToken: l, workspaceId: u, getWorkspaceToken: d } = e(), { t: f } =
|
|
2447
|
+
var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i = !1, onNavigateToVersions: a, onNavigateToPricing: o, onNavigateToSubmission: s }) => {
|
|
2448
|
+
let { workspacesGatewayUrl: c, authToken: l, workspaceId: u, getWorkspaceToken: d } = e(), { t: f } = P(), p = (e, t) => {
|
|
2367
2449
|
let n = f(e);
|
|
2368
2450
|
return n === e ? t : n;
|
|
2369
|
-
}, [m, h] =
|
|
2451
|
+
}, [m, h] = N(() => at(t)), [g, v] = N(!1), [b, x] = N(null), S = M(at(t)), C = M(t);
|
|
2370
2452
|
C.current = t;
|
|
2371
2453
|
let w = JSON.stringify(m) !== JSON.stringify(S.current), [ee] = _();
|
|
2372
|
-
|
|
2373
|
-
let e =
|
|
2454
|
+
se(() => {
|
|
2455
|
+
let e = at(C.current);
|
|
2374
2456
|
h(e), S.current = e, x(null);
|
|
2375
2457
|
}, [t.id]);
|
|
2376
2458
|
let E = (e, t) => {
|
|
@@ -2378,10 +2460,10 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2378
2460
|
...n,
|
|
2379
2461
|
[e]: t
|
|
2380
2462
|
})), x(null);
|
|
2381
|
-
}, D = m.shortDescription.trim().length > 0 && m.privacyPolicyUrl.trim().length > 0 && m.termsOfServiceUrl.trim().length > 0,
|
|
2463
|
+
}, D = m.shortDescription.trim().length > 0 && m.privacyPolicyUrl.trim().length > 0 && m.termsOfServiceUrl.trim().length > 0, re = async () => {
|
|
2382
2464
|
v(!0), x(null);
|
|
2383
2465
|
try {
|
|
2384
|
-
let e = m.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), n = m.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r =
|
|
2466
|
+
let e = m.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), n = m.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r = Q.has(m.manifestItemType), i = t.manifest ?? {}, a = {
|
|
2385
2467
|
manifestVersion: typeof i.manifestVersion == "string" ? i.manifestVersion : "1.0",
|
|
2386
2468
|
itemType: m.manifestItemType || void 0,
|
|
2387
2469
|
identity: {
|
|
@@ -2418,13 +2500,13 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2418
2500
|
} finally {
|
|
2419
2501
|
v(!1);
|
|
2420
2502
|
}
|
|
2421
|
-
}, { upload:
|
|
2503
|
+
}, { upload: ie, uploading: ae, progress: oe, error: A } = k(c, l, u, d, "/DevPortal/Assets"), { upload: j, uploading: le, progress: F, error: L } = k(c, l, u, d, "/DevPortal/Assets"), { upload: pe, uploading: me, progress: he, error: ge } = k(c, l, u, d, "/DevPortal/Assets"), z = Q.has(m.manifestItemType), _e = t.status === "SUBMITTED";
|
|
2422
2504
|
return /* @__PURE__ */ K("div", {
|
|
2423
2505
|
className: "space-y-8 max-w-3xl",
|
|
2424
2506
|
children: [
|
|
2425
2507
|
t.status === "PUBLISHED" ? /* @__PURE__ */ K("div", {
|
|
2426
2508
|
className: "flex items-start gap-3 rounded-lg border border-success/30 bg-success/10 px-4 py-3",
|
|
2427
|
-
children: [/* @__PURE__ */ G(
|
|
2509
|
+
children: [/* @__PURE__ */ G(ue, {
|
|
2428
2510
|
size: 16,
|
|
2429
2511
|
className: "text-success mt-0.5 shrink-0"
|
|
2430
2512
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -2441,11 +2523,11 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2441
2523
|
]
|
|
2442
2524
|
})]
|
|
2443
2525
|
})]
|
|
2444
|
-
}) :
|
|
2526
|
+
}) : _e ? /* @__PURE__ */ K("div", {
|
|
2445
2527
|
className: "flex items-center justify-between gap-3 rounded-lg border border-primary/30 bg-action-primary-bg/5 px-4 py-3",
|
|
2446
2528
|
children: [/* @__PURE__ */ K("div", {
|
|
2447
2529
|
className: "flex items-start gap-3",
|
|
2448
|
-
children: [/* @__PURE__ */ G(
|
|
2530
|
+
children: [/* @__PURE__ */ G(fe, {
|
|
2449
2531
|
size: 16,
|
|
2450
2532
|
className: "text-primary mt-0.5 shrink-0"
|
|
2451
2533
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -2469,11 +2551,11 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2469
2551
|
type: "button",
|
|
2470
2552
|
onClick: s,
|
|
2471
2553
|
className: "shrink-0 text-xs text-primary hover:underline font-medium flex items-center gap-1",
|
|
2472
|
-
children: [p("devportal.viewStatus", "View Status"), /* @__PURE__ */ G(
|
|
2554
|
+
children: [p("devportal.viewStatus", "View Status"), /* @__PURE__ */ G(R, { size: 12 })]
|
|
2473
2555
|
})]
|
|
2474
2556
|
}) : /* @__PURE__ */ K("div", {
|
|
2475
2557
|
className: "flex items-start gap-3 rounded-lg border border-warning/30 bg-warning/5 px-4 py-3",
|
|
2476
|
-
children: [/* @__PURE__ */ G(
|
|
2558
|
+
children: [/* @__PURE__ */ G(ce, {
|
|
2477
2559
|
size: 16,
|
|
2478
2560
|
className: "text-warning mt-0.5 shrink-0"
|
|
2479
2561
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -2493,14 +2575,14 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2493
2575
|
children: /* @__PURE__ */ K("div", {
|
|
2494
2576
|
className: "space-y-6",
|
|
2495
2577
|
children: [
|
|
2496
|
-
/* @__PURE__ */ G(
|
|
2578
|
+
/* @__PURE__ */ G(te, {
|
|
2497
2579
|
label: p("devportal.storeItemType", "Item Type"),
|
|
2498
2580
|
value: m.manifestItemType,
|
|
2499
2581
|
onChange: (e) => {
|
|
2500
2582
|
let t = e.target.value;
|
|
2501
|
-
E("manifestItemType", t),
|
|
2583
|
+
E("manifestItemType", t), Q.has(t) ? E("manifestInstallType", "json") : m.manifestInstallType === "json" && E("manifestInstallType", "zip");
|
|
2502
2584
|
},
|
|
2503
|
-
options:
|
|
2585
|
+
options: rt[t.appType] ?? rt.APP,
|
|
2504
2586
|
placeholder: p("devportal.selectItemType", "Select item type…"),
|
|
2505
2587
|
hint: p("devportal.storeItemTypeHint", "Sub-category shown in the marketplace (e.g. Node vs Agent vs Parser)")
|
|
2506
2588
|
}),
|
|
@@ -2510,7 +2592,7 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2510
2592
|
onChange: (e) => E("manifestDisplayName", e.target.value),
|
|
2511
2593
|
placeholder: "My Awesome Node"
|
|
2512
2594
|
}),
|
|
2513
|
-
|
|
2595
|
+
z && t.appType !== "WORKFLOW" && /* @__PURE__ */ G(ne, {
|
|
2514
2596
|
label: p("devportal.jsonContent", "Template Definition (JSON)"),
|
|
2515
2597
|
value: m.manifestJsonContent,
|
|
2516
2598
|
onChange: (e) => E("manifestJsonContent", e.target.value),
|
|
@@ -2518,7 +2600,7 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2518
2600
|
placeholder: "{\n \"nodes\": [],\n \"edges\": []\n}",
|
|
2519
2601
|
hint: p("devportal.jsonContentHint", "Paste the full JSON definition. Stored and applied directly — no zip needed.")
|
|
2520
2602
|
}),
|
|
2521
|
-
|
|
2603
|
+
z && t.appType === "WORKFLOW" && /* @__PURE__ */ K("p", {
|
|
2522
2604
|
className: "text-sm text-text-secondary rounded-md bg-bg-sunken px-3 py-2",
|
|
2523
2605
|
children: [
|
|
2524
2606
|
"The Workflow Definition (JSON) is set per version. Go to the",
|
|
@@ -2538,26 +2620,26 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2538
2620
|
children: [
|
|
2539
2621
|
/* @__PURE__ */ K("div", {
|
|
2540
2622
|
className: "grid gap-5 sm:grid-cols-2",
|
|
2541
|
-
children: [/* @__PURE__ */ G(
|
|
2623
|
+
children: [/* @__PURE__ */ G(tt, {
|
|
2542
2624
|
label: p("devportal.iconUrl", "Icon"),
|
|
2543
2625
|
value: m.iconUrl,
|
|
2544
2626
|
onChange: (e) => E("iconUrl", e),
|
|
2545
2627
|
hint: p("devportal.iconUrlHint", "Shown in marketplace cards and search — square proportions (1:1)"),
|
|
2546
2628
|
aspectClass: "aspect-square",
|
|
2547
|
-
upload:
|
|
2548
|
-
uploading:
|
|
2549
|
-
progress:
|
|
2550
|
-
error:
|
|
2551
|
-
}), /* @__PURE__ */ G(
|
|
2629
|
+
upload: ie,
|
|
2630
|
+
uploading: ae,
|
|
2631
|
+
progress: oe,
|
|
2632
|
+
error: A
|
|
2633
|
+
}), /* @__PURE__ */ G(tt, {
|
|
2552
2634
|
label: p("devportal.bannerUrl", "Banner"),
|
|
2553
2635
|
value: m.bannerUrl,
|
|
2554
2636
|
onChange: (e) => E("bannerUrl", e),
|
|
2555
2637
|
hint: p("devportal.bannerUrlHint", "Fills the right panel on the product page — square or portrait works best on all screen sizes (1:1)"),
|
|
2556
2638
|
aspectClass: "aspect-square",
|
|
2557
|
-
upload:
|
|
2558
|
-
uploading:
|
|
2559
|
-
progress:
|
|
2560
|
-
error:
|
|
2639
|
+
upload: j,
|
|
2640
|
+
uploading: le,
|
|
2641
|
+
progress: F,
|
|
2642
|
+
error: L
|
|
2561
2643
|
})]
|
|
2562
2644
|
}),
|
|
2563
2645
|
/* @__PURE__ */ G(O, {
|
|
@@ -2567,7 +2649,7 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2567
2649
|
placeholder: "https://...",
|
|
2568
2650
|
hint: p("devportal.videoUrlHint", "YouTube or Vimeo embed URL")
|
|
2569
2651
|
}),
|
|
2570
|
-
/* @__PURE__ */ G(
|
|
2652
|
+
/* @__PURE__ */ G(ne, {
|
|
2571
2653
|
label: p("devportal.shortDescription", "Short Description"),
|
|
2572
2654
|
value: m.shortDescription,
|
|
2573
2655
|
onChange: (e) => E("shortDescription", e.target.value),
|
|
@@ -2575,20 +2657,20 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2575
2657
|
rows: 2,
|
|
2576
2658
|
hint: `${m.shortDescription.length}/200 · ${p("devportal.shortDescHint", "Shown in search results and cards")}`
|
|
2577
2659
|
}),
|
|
2578
|
-
/* @__PURE__ */ G(
|
|
2660
|
+
/* @__PURE__ */ G(ne, {
|
|
2579
2661
|
label: p("devportal.longDescription", "Full Description"),
|
|
2580
2662
|
value: m.description,
|
|
2581
2663
|
onChange: (e) => E("description", e.target.value),
|
|
2582
2664
|
rows: 5,
|
|
2583
2665
|
hint: p("devportal.fullDescHint", "Markdown supported")
|
|
2584
2666
|
}),
|
|
2585
|
-
/* @__PURE__ */ G(
|
|
2667
|
+
/* @__PURE__ */ G(Z, {
|
|
2586
2668
|
urls: m.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean),
|
|
2587
2669
|
onChange: (e) => E("screenshotsText", e.join("\n")),
|
|
2588
|
-
upload:
|
|
2589
|
-
uploading:
|
|
2590
|
-
progress:
|
|
2591
|
-
error:
|
|
2670
|
+
upload: pe,
|
|
2671
|
+
uploading: me,
|
|
2672
|
+
progress: he,
|
|
2673
|
+
error: ge
|
|
2592
2674
|
})
|
|
2593
2675
|
]
|
|
2594
2676
|
})
|
|
@@ -2645,14 +2727,14 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2645
2727
|
children: [
|
|
2646
2728
|
b === "success" && /* @__PURE__ */ K("div", {
|
|
2647
2729
|
className: "flex items-center gap-2 rounded-md border border-success/30 bg-success/10 px-3 py-2 text-sm text-success",
|
|
2648
|
-
children: [/* @__PURE__ */ G(
|
|
2730
|
+
children: [/* @__PURE__ */ G(ue, {
|
|
2649
2731
|
size: 15,
|
|
2650
2732
|
className: "shrink-0"
|
|
2651
2733
|
}), p("devportal.storeListing.savedSuccess", "Store listing saved successfully.")]
|
|
2652
2734
|
}),
|
|
2653
2735
|
b === "error" && /* @__PURE__ */ K("div", {
|
|
2654
2736
|
className: "flex items-center gap-2 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",
|
|
2655
|
-
children: [/* @__PURE__ */ G(
|
|
2737
|
+
children: [/* @__PURE__ */ G(ce, {
|
|
2656
2738
|
size: 15,
|
|
2657
2739
|
className: "shrink-0"
|
|
2658
2740
|
}), p("devportal.storeListing.savedError", "Failed to save. Please try again.")]
|
|
@@ -2662,14 +2744,14 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2662
2744
|
children: [
|
|
2663
2745
|
/* @__PURE__ */ G("button", {
|
|
2664
2746
|
type: "button",
|
|
2665
|
-
onClick:
|
|
2747
|
+
onClick: re,
|
|
2666
2748
|
disabled: g || !D || !w,
|
|
2667
2749
|
title: D ? w ? void 0 : p("devportal.storeListing.noChanges", "All changes saved — edit any field to save again") : p("devportal.storeListing.requiredFieldsHint", "Fill in Short Description, Privacy Policy URL, and Terms of Service URL to save"),
|
|
2668
2750
|
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 disabled:cursor-not-allowed",
|
|
2669
|
-
children: g ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
2751
|
+
children: g ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(B, {
|
|
2670
2752
|
size: 16,
|
|
2671
2753
|
className: "animate-spin"
|
|
2672
|
-
}), p("devportal.saving", "Saving…")] }) : w ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
2754
|
+
}), p("devportal.saving", "Saving…")] }) : w ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(Ce, { size: 16 }), p("devportal.saveStoreListing", "Save Store Listing")] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(I, { size: 16 }), p("devportal.saved", "Saved")] })
|
|
2673
2755
|
}),
|
|
2674
2756
|
!D && /* @__PURE__ */ G("p", {
|
|
2675
2757
|
className: "text-xs text-text-secondary",
|
|
@@ -2679,13 +2761,13 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2679
2761
|
type: "button",
|
|
2680
2762
|
onClick: a,
|
|
2681
2763
|
className: "inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline underline-offset-2",
|
|
2682
|
-
children: [p("devportal.nextUploadVersion", "Next: Upload a Version"), /* @__PURE__ */ G(
|
|
2764
|
+
children: [p("devportal.nextUploadVersion", "Next: Upload a Version"), /* @__PURE__ */ G(de, { size: 15 })]
|
|
2683
2765
|
}),
|
|
2684
2766
|
(!r || n > 0) && !i && o && /* @__PURE__ */ K("button", {
|
|
2685
2767
|
type: "button",
|
|
2686
2768
|
onClick: o,
|
|
2687
2769
|
className: "inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline underline-offset-2",
|
|
2688
|
-
children: [p("devportal.nextSetPricing", "Next: Set Pricing"), /* @__PURE__ */ G(
|
|
2770
|
+
children: [p("devportal.nextSetPricing", "Next: Set Pricing"), /* @__PURE__ */ G(de, { size: 15 })]
|
|
2689
2771
|
})
|
|
2690
2772
|
]
|
|
2691
2773
|
})
|
|
@@ -2693,9 +2775,9 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2693
2775
|
})
|
|
2694
2776
|
]
|
|
2695
2777
|
});
|
|
2696
|
-
},
|
|
2697
|
-
let { t: i } =
|
|
2698
|
-
return /* @__PURE__ */ K(
|
|
2778
|
+
}, $ = ({ label: e, value: n, trend: r }) => {
|
|
2779
|
+
let { t: i } = P();
|
|
2780
|
+
return /* @__PURE__ */ K(Ne, {
|
|
2699
2781
|
treatment: "metric",
|
|
2700
2782
|
className: "p-4",
|
|
2701
2783
|
children: [
|
|
@@ -2721,13 +2803,13 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2721
2803
|
})
|
|
2722
2804
|
]
|
|
2723
2805
|
});
|
|
2724
|
-
},
|
|
2806
|
+
}, st = ({ label: e, url: t }) => /* @__PURE__ */ K("a", {
|
|
2725
2807
|
href: t,
|
|
2726
2808
|
target: "_blank",
|
|
2727
2809
|
rel: "noopener noreferrer",
|
|
2728
2810
|
className: "flex items-center gap-2 text-sm text-primary hover:underline",
|
|
2729
|
-
children: [/* @__PURE__ */ G(
|
|
2730
|
-
}),
|
|
2811
|
+
children: [/* @__PURE__ */ G(R, { size: 14 }), e]
|
|
2812
|
+
}), ct = [
|
|
2731
2813
|
{
|
|
2732
2814
|
id: "auth",
|
|
2733
2815
|
label: "Authentication",
|
|
@@ -2799,40 +2881,51 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2799
2881
|
description: "Access control configuration"
|
|
2800
2882
|
}
|
|
2801
2883
|
];
|
|
2802
|
-
function
|
|
2803
|
-
let t = Object.fromEntries(
|
|
2884
|
+
function lt(e) {
|
|
2885
|
+
let t = Object.fromEntries(ct.map((e) => [e.id, "none"]));
|
|
2804
2886
|
if (!e || !Array.isArray(e.permissions)) return t;
|
|
2805
|
-
for (let n of e.permissions) n.resource in t && (t[n.resource] = n.level === "write" ? "write" : "read");
|
|
2887
|
+
for (let n of e.permissions) n && typeof n == "object" && n.resource in t && (t[n.resource] = n.level === "write" ? "write" : "read");
|
|
2806
2888
|
return t;
|
|
2807
2889
|
}
|
|
2808
|
-
|
|
2809
|
-
let t =
|
|
2810
|
-
|
|
2890
|
+
function ut(e) {
|
|
2891
|
+
let t = Object.fromEntries(ct.map((e) => [e.id, "none"]));
|
|
2892
|
+
for (let n of e) {
|
|
2893
|
+
let [e, r] = n.split(":");
|
|
2894
|
+
r && r in t && (t[r] = e === "write" ? "write" : "read");
|
|
2895
|
+
}
|
|
2896
|
+
return t;
|
|
2897
|
+
}
|
|
2898
|
+
function dt(e) {
|
|
2899
|
+
return !e || !Array.isArray(e.permissions) ? !1 : e.permissions.some((e) => e && typeof e == "object");
|
|
2900
|
+
}
|
|
2901
|
+
var ft = ({ app: e, versionScopes: t }) => {
|
|
2902
|
+
let n = e.manifest ?? {}, [r, i] = N(() => dt(n) ? lt(n) : t && t.length > 0 ? ut(t) : lt(n)), [a, o] = N(!1), [s, c] = N(!1), [l] = _(), u = (e, t) => {
|
|
2903
|
+
c(!1), i((n) => ({
|
|
2811
2904
|
...n,
|
|
2812
2905
|
[e]: t
|
|
2813
2906
|
}));
|
|
2814
|
-
},
|
|
2815
|
-
|
|
2907
|
+
}, d = async () => {
|
|
2908
|
+
o(!0);
|
|
2816
2909
|
try {
|
|
2817
|
-
let
|
|
2910
|
+
let t = Object.entries(r).filter(([, e]) => e !== "none").map(([e, t]) => ({
|
|
2818
2911
|
resource: e,
|
|
2819
2912
|
level: t
|
|
2820
2913
|
}));
|
|
2821
|
-
await
|
|
2914
|
+
await l({ variables: {
|
|
2822
2915
|
id: e.id,
|
|
2823
2916
|
input: { manifest: {
|
|
2824
|
-
...
|
|
2825
|
-
permissions:
|
|
2917
|
+
...n,
|
|
2918
|
+
permissions: t
|
|
2826
2919
|
} }
|
|
2827
|
-
} }),
|
|
2920
|
+
} }), c(!0);
|
|
2828
2921
|
} finally {
|
|
2829
|
-
|
|
2922
|
+
o(!1);
|
|
2830
2923
|
}
|
|
2831
|
-
},
|
|
2924
|
+
}, f = {
|
|
2832
2925
|
none: "No access",
|
|
2833
2926
|
read: "Read",
|
|
2834
2927
|
write: "Read & Write"
|
|
2835
|
-
},
|
|
2928
|
+
}, p = [
|
|
2836
2929
|
"none",
|
|
2837
2930
|
"read",
|
|
2838
2931
|
"write"
|
|
@@ -2852,13 +2945,13 @@ var st = ({ app: e }) => {
|
|
|
2852
2945
|
children: [/* @__PURE__ */ G("th", {
|
|
2853
2946
|
className: "px-4 py-3 text-left font-medium text-text-secondary w-1/2",
|
|
2854
2947
|
children: "Resource"
|
|
2855
|
-
}),
|
|
2948
|
+
}), p.map((e) => /* @__PURE__ */ G("th", {
|
|
2856
2949
|
className: "px-4 py-3 text-center font-medium text-text-secondary",
|
|
2857
|
-
children:
|
|
2950
|
+
children: f[e]
|
|
2858
2951
|
}, e))]
|
|
2859
2952
|
}) }), /* @__PURE__ */ G("tbody", {
|
|
2860
2953
|
className: "divide-y divide-border",
|
|
2861
|
-
children:
|
|
2954
|
+
children: ct.map((e) => /* @__PURE__ */ K("tr", {
|
|
2862
2955
|
className: "hover:bg-bg-sunken/30 transition-colors",
|
|
2863
2956
|
children: [/* @__PURE__ */ K("td", {
|
|
2864
2957
|
className: "px-4 py-3",
|
|
@@ -2869,14 +2962,14 @@ var st = ({ app: e }) => {
|
|
|
2869
2962
|
className: "text-xs text-text-secondary",
|
|
2870
2963
|
children: e.description
|
|
2871
2964
|
})]
|
|
2872
|
-
}),
|
|
2965
|
+
}), p.map((t) => /* @__PURE__ */ G("td", {
|
|
2873
2966
|
className: "px-4 py-3 text-center",
|
|
2874
2967
|
children: /* @__PURE__ */ G("input", {
|
|
2875
2968
|
type: "radio",
|
|
2876
2969
|
name: `perm-${e.id}`,
|
|
2877
2970
|
value: t,
|
|
2878
|
-
checked:
|
|
2879
|
-
onChange: () =>
|
|
2971
|
+
checked: r[e.id] === t,
|
|
2972
|
+
onChange: () => u(e.id, t),
|
|
2880
2973
|
className: "h-4 w-4 accent-primary cursor-pointer"
|
|
2881
2974
|
})
|
|
2882
2975
|
}, t))]
|
|
@@ -2886,25 +2979,25 @@ var st = ({ app: e }) => {
|
|
|
2886
2979
|
}),
|
|
2887
2980
|
/* @__PURE__ */ K("div", {
|
|
2888
2981
|
className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-3 flex gap-2 text-xs text-text-secondary",
|
|
2889
|
-
children: [/* @__PURE__ */ G(
|
|
2982
|
+
children: [/* @__PURE__ */ G(ge, {
|
|
2890
2983
|
size: 14,
|
|
2891
2984
|
className: "flex-shrink-0 mt-0.5"
|
|
2892
2985
|
}), /* @__PURE__ */ K("span", { children: [/* @__PURE__ */ G("strong", { children: "Read & Write" }), " implies Read. Request only what your app genuinely needs — fewer permissions build more user trust."] })]
|
|
2893
2986
|
}),
|
|
2894
2987
|
/* @__PURE__ */ K("div", {
|
|
2895
2988
|
className: "flex items-center justify-end gap-3",
|
|
2896
|
-
children: [
|
|
2989
|
+
children: [s && /* @__PURE__ */ K("span", {
|
|
2897
2990
|
className: "flex items-center gap-1.5 text-sm text-status-success-text",
|
|
2898
|
-
children: [/* @__PURE__ */ G(
|
|
2991
|
+
children: [/* @__PURE__ */ G(ue, { size: 14 }), "Saved"]
|
|
2899
2992
|
}), /* @__PURE__ */ K("button", {
|
|
2900
2993
|
type: "button",
|
|
2901
|
-
onClick: () => void
|
|
2902
|
-
disabled:
|
|
2994
|
+
onClick: () => void d(),
|
|
2995
|
+
disabled: a,
|
|
2903
2996
|
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",
|
|
2904
|
-
children: [
|
|
2997
|
+
children: [a ? /* @__PURE__ */ G(B, {
|
|
2905
2998
|
size: 14,
|
|
2906
2999
|
className: "animate-spin"
|
|
2907
|
-
}) : /* @__PURE__ */ G(
|
|
3000
|
+
}) : /* @__PURE__ */ G(H, { size: 14 }), "Save Permissions"]
|
|
2908
3001
|
})]
|
|
2909
3002
|
})
|
|
2910
3003
|
]
|
|
@@ -2912,6 +3005,6 @@ var st = ({ app: e }) => {
|
|
|
2912
3005
|
});
|
|
2913
3006
|
};
|
|
2914
3007
|
//#endregion
|
|
2915
|
-
export {
|
|
3008
|
+
export { J as ApplicationDetailPage };
|
|
2916
3009
|
|
|
2917
3010
|
//# sourceMappingURL=ApplicationDetailPage.js.map
|