@burdenoff/microfe-devportal 2026.626.1 → 2026.626.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.
Files changed (34) hide show
  1. package/dist/devportal/DevportalRoutes.js +38 -34
  2. package/dist/devportal/DevportalRoutes.js.map +1 -1
  3. package/dist/devportal/components/ConfirmDialog.js.map +1 -1
  4. package/dist/devportal/components/DataTable.js.map +1 -1
  5. package/dist/devportal/components/FormField.js.map +1 -1
  6. package/dist/devportal/components/GrantDelegationModal.js +2 -1
  7. package/dist/devportal/components/GrantDelegationModal.js.map +1 -1
  8. package/dist/devportal/components/LoadingState.js.map +1 -1
  9. package/dist/devportal/components/PageLayout.js.map +1 -1
  10. package/dist/devportal/components/SelectionCheckbox.js.map +1 -1
  11. package/dist/devportal/hooks/usePermission.js +2 -2
  12. package/dist/devportal/hooks/usePermission.js.map +1 -1
  13. package/dist/devportal/pages/AnalyticsDashboardPage.js.map +1 -1
  14. package/dist/devportal/pages/ApiKeysPage.js.map +1 -1
  15. package/dist/devportal/pages/CreateApplicationPage.js +185 -104
  16. package/dist/devportal/pages/CreateApplicationPage.js.map +1 -1
  17. package/dist/devportal/pages/CreateWebhookPage.js +6 -5
  18. package/dist/devportal/pages/CreateWebhookPage.js.map +1 -1
  19. package/dist/devportal/pages/DashboardPage.js.map +1 -1
  20. package/dist/devportal/pages/OAuthCallbackPage.js +64 -0
  21. package/dist/devportal/pages/OAuthCallbackPage.js.map +1 -0
  22. package/dist/devportal/pages/OAuthClientsPage.js.map +1 -1
  23. package/dist/devportal/pages/OrganizationDetailPage.js.map +1 -1
  24. package/dist/devportal/pages/PublishPage.js +392 -187
  25. package/dist/devportal/pages/PublishPage.js.map +1 -1
  26. package/dist/devportal/pages/ResourcesPage.js.map +1 -1
  27. package/dist/devportal/pages/RevenueDashboardPage.js.map +1 -1
  28. package/dist/devportal/pages/WebhookDetailPage.js.map +1 -1
  29. package/dist/devportal/pages/WebhooksPage.js +1 -1
  30. package/dist/devportal/pages/WebhooksPage.js.map +1 -1
  31. package/dist/devportal/types/index.js.map +1 -1
  32. package/dist/generated/global-operations.js +260 -174
  33. package/dist/generated/global-operations.js.map +1 -1
  34. package/package.json +1 -1
@@ -1,109 +1,198 @@
1
1
  import { useDevportal as e } from "../providers/DevportalProvider.js";
2
- import { useGetApplicationQuery as t, useSubmitApplicationMutation as n } from "../../generated/global-operations.js";
3
- import { PageLayout as r, PageSection as i } from "../components/PageLayout.js";
4
- import { Alert as a } from "../components/ConfirmDialog.js";
5
- import { PermissionGuard as o } from "../components/PermissionGuard.js";
2
+ import { useGetApplicationQuery as t, useSubmitApplicationForReviewMutation as n, useSubmitApplicationMutation as r } from "../../generated/global-operations.js";
3
+ import { PageLayout as i, PageSection as a } from "../components/PageLayout.js";
4
+ import { Alert as o } from "../components/ConfirmDialog.js";
5
+ import { PermissionGuard as s } from "../components/PermissionGuard.js";
6
6
  import "../components/index.js";
7
- import { DEVPORTAL_PERMISSIONS as s } from "../constants/permissions.js";
8
- import { useDevportalPermission as c } from "../hooks/usePermission.js";
7
+ import { DEVPORTAL_PERMISSIONS as c } from "../constants/permissions.js";
8
+ import { useDevportalPermission as ee } from "../hooks/usePermission.js";
9
9
  import "../hooks/index.js";
10
10
  import { useEffect as l, useMemo as u, useState as d } from "react";
11
- import { useI18n as f } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
12
- import { AlertTriangle as p, CheckCircle as m, Eye as h, FileText as g, Globe as _, Image as v, Loader2 as y, Send as b, Shield as x, XCircle as S } from "lucide-react";
13
- import { useParams as C } from "react-router-dom";
14
- import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
11
+ import { useI18n as te } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
12
+ import { AlertTriangle as f, ArrowRight as ne, CheckCircle as p, Eye as re, FileText as m, Globe as ie, Image as h, KeyRound as ae, Link as g, Loader2 as _, PartyPopper as oe, Send as se, Shield as v, Webhook as ce, XCircle as y } from "lucide-react";
13
+ import { useParams as le } from "react-router-dom";
14
+ import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
15
+ import { gql as C } from "@apollo/client";
16
+ import { useQuery as w } from "@apollo/client/react";
15
17
  //#region src/devportal/pages/PublishPage.tsx
16
- var D = [
18
+ var T = C`
19
+ query PublishPagePublisher {
20
+ myPublisher {
21
+ id
22
+ }
23
+ }
24
+ `, ue = C`
25
+ query PublishPageProducts($publisherId: String!) {
26
+ products(filter: { publisherId: $publisherId }) {
27
+ id
28
+ productId
29
+ }
30
+ }
31
+ `, de = C`
32
+ query PublishPageWebhooks($applicationId: ID!) {
33
+ webhooks(applicationId: $applicationId) {
34
+ id
35
+ }
36
+ }
37
+ `, fe = [
17
38
  "SUBMITTED",
18
39
  "IN_REVIEW",
19
40
  "APPROVED",
20
41
  "PUBLISHED"
21
- ], O = () => {
22
- let { appId: O } = C(), { navigate: k, basePath: A } = e(), { t: j } = f(), M = (e, t) => {
23
- let n = j(e);
42
+ ], E = () => {
43
+ let { appId: C } = le(), { navigate: E, basePath: D } = e(), { t: pe } = te(), O = (e, t) => {
44
+ let n = pe(e);
24
45
  return n === e ? t : n;
25
- }, [N, P] = d(!1), [F, I] = d(null), [L, R] = d(""), z = c(s.APP_SUBMIT), { data: B, loading: V, error: H } = t({
26
- variables: { id: O },
27
- skip: !O,
46
+ }, [k, A] = d(!1), [j, M] = d(null), [me, N] = d(!1), [P, F] = d(""), I = ee(c.APP_SUBMIT), { data: L, loading: R, error: z } = t({
47
+ variables: { id: C },
48
+ skip: !C,
28
49
  fetchPolicy: "network-only"
29
- }), [U] = n(), W = B?.application;
50
+ }), [he] = r(), [ge] = n(), { data: _e } = w(T, { fetchPolicy: "cache-first" }), B = _e?.myPublisher?.id ?? null, { data: ve } = w(ue, {
51
+ variables: { publisherId: B ?? "" },
52
+ skip: !B,
53
+ fetchPolicy: "cache-first"
54
+ });
55
+ ve?.products?.find((e) => e.productId === C)?.id;
56
+ let V = L?.application?.appType === "API_INTEGRATION", H = L?.application?.manifest?.oauth, U = !!(H?.authorizationUrl && H?.tokenUrl && H?.clientId), { data: ye } = w(de, {
57
+ variables: { applicationId: C },
58
+ skip: !C || !V,
59
+ fetchPolicy: "network-only"
60
+ }), W = ye?.webhooks?.length ?? 0, G = L?.application;
30
61
  l(() => {
31
- let e = W?.name;
32
- if (!O || !e) return;
62
+ let e = G?.name;
63
+ if (!C || !e) return;
33
64
  let t = window.__breadcrumbRegistry;
34
- return t?.register(O, e), () => t?.unregister(O);
35
- }, [O, W?.name]);
36
- let G = D.includes(W?.status ?? ""), K = u(() => {
37
- if (!W) return [];
38
- let e = W.screenshots?.length ?? 0;
39
- return [
65
+ return t?.register(C, e), () => t?.unregister(C);
66
+ }, [C, G?.name]);
67
+ let K = fe.includes(G?.status ?? ""), q = G?.appType === "NODE" || G?.appType === "WORKFLOW", J = G?.versions?.totalCount ?? 0, Y = u(() => {
68
+ if (!G) return [];
69
+ let e = G.screenshots?.length ?? 0, t = `/apps/${C}?tab=store-listing`, n = `/apps/${C}/versions`, r = `/apps/${C}/edit#oauth-config`, i = `/apps/${C}/webhooks`, a = [
40
70
  {
41
71
  id: "name",
42
- label: M("devportal.checklistNameLabel", "App Name & Description"),
43
- description: M("devportal.checklistNameDesc", "Name and short description are required"),
44
- status: W.name && W.shortDescription ? "passed" : "failed",
45
- icon: /* @__PURE__ */ T(g, { size: 20 })
72
+ label: O("devportal.checklistNameLabel", "Name & Short Description"),
73
+ description: O("devportal.checklistNameDesc", "Name and short description are required for the store card"),
74
+ status: G.name && G.shortDescription ? "passed" : "failed",
75
+ icon: /* @__PURE__ */ x(m, { size: 20 }),
76
+ actionLabel: "Edit store listing →",
77
+ actionPath: t
46
78
  },
47
79
  {
48
80
  id: "category",
49
- label: M("devportal.checklistCategoryLabel", "Category"),
50
- description: M("devportal.checklistCategoryDesc", "A category must be selected"),
51
- status: W.category ? "passed" : "failed",
52
- icon: /* @__PURE__ */ T(_, { size: 20 })
81
+ label: O("devportal.checklistCategoryLabel", "Category"),
82
+ description: O("devportal.checklistCategoryDesc", "A category helps users find your item in the marketplace"),
83
+ status: G.category ? "passed" : "failed",
84
+ icon: /* @__PURE__ */ x(ie, { size: 20 }),
85
+ actionLabel: "Edit app info →",
86
+ actionPath: `/apps/${C}/edit`
53
87
  },
54
88
  {
55
89
  id: "privacy",
56
- label: M("devportal.checklistPrivacyLabel", "Privacy Policy"),
57
- description: M("devportal.checklistPrivacyDesc", "Privacy policy URL is required"),
58
- status: W.privacyPolicyUrl ? "passed" : "failed",
59
- icon: /* @__PURE__ */ T(x, { size: 20 })
90
+ label: O("devportal.checklistPrivacyLabel", "Privacy Policy"),
91
+ description: O("devportal.checklistPrivacyDesc", "Privacy policy URL is required for store submission"),
92
+ status: G.privacyPolicyUrl ? "passed" : "failed",
93
+ icon: /* @__PURE__ */ x(v, { size: 20 }),
94
+ actionLabel: "Edit store listing →",
95
+ actionPath: t
60
96
  },
61
97
  {
62
98
  id: "terms",
63
- label: M("devportal.checklistTermsLabel", "Terms of Service"),
64
- description: M("devportal.checklistTermsDesc", "Terms of service URL is required"),
65
- status: W.termsOfServiceUrl ? "passed" : "failed",
66
- icon: /* @__PURE__ */ T(g, { size: 20 })
99
+ label: O("devportal.checklistTermsLabel", "Terms of Service"),
100
+ description: O("devportal.checklistTermsDesc", "Terms of service URL is required for store submission"),
101
+ status: G.termsOfServiceUrl ? "passed" : "failed",
102
+ icon: /* @__PURE__ */ x(m, { size: 20 }),
103
+ actionLabel: "Edit store listing →",
104
+ actionPath: t
67
105
  },
68
106
  {
69
107
  id: "icon",
70
- label: M("devportal.checklistIconLabel", "App Icon"),
71
- description: M("devportal.checklistIconDesc", "An icon URL is recommended"),
72
- status: W.iconUrl ? "passed" : "warning",
73
- icon: /* @__PURE__ */ T(v, { size: 20 })
108
+ label: O("devportal.checklistIconLabel", "App Icon"),
109
+ description: O("devportal.checklistIconDesc", "An icon makes your listing stand out in the marketplace"),
110
+ status: G.iconUrl ? "passed" : "warning",
111
+ icon: /* @__PURE__ */ x(h, { size: 20 }),
112
+ actionLabel: "Edit store listing →",
113
+ actionPath: t
74
114
  },
75
115
  {
76
116
  id: "screenshots",
77
- label: M("devportal.checklistScreenshotsLabel", "Screenshots"),
78
- description: M("devportal.checklistScreenshotsDesc", "At least 3 screenshots are recommended"),
117
+ label: O("devportal.checklistScreenshotsLabel", "Screenshots"),
118
+ description: O("devportal.checklistScreenshotsDesc", "At least 3 screenshots are recommended"),
79
119
  status: e >= 3 ? "passed" : "warning",
80
- icon: /* @__PURE__ */ T(v, { size: 20 })
81
- },
82
- {
83
- id: "status",
84
- label: M("devportal.checklistStatusLabel", "App Status"),
85
- description: M("devportal.checklistStatusDesc", "App must be in DRAFT or REJECTED state to submit"),
86
- status: ["DRAFT", "REJECTED"].includes(W.status ?? "") ? "passed" : "warning",
87
- icon: /* @__PURE__ */ T(m, { size: 20 })
120
+ icon: /* @__PURE__ */ x(h, { size: 20 }),
121
+ actionLabel: "Edit store listing →",
122
+ actionPath: t
88
123
  }
89
124
  ];
90
- }, [W]), q = K.filter((e) => e.status === "passed").length, J = K.filter((e) => e.status === "failed").length, Y = K.filter((e) => e.status === "warning").length, X = ["DRAFT", "REJECTED"].includes(W?.status ?? ""), Z = !V && !H && J === 0 && !!W && !G && X, Q = (e) => {
125
+ return q && a.push({
126
+ id: "version",
127
+ label: O("devportal.checklistVersionLabel", "Published Version"),
128
+ description: O("devportal.checklistVersionDesc", G?.appType === "WORKFLOW" ? "At least one published version (manifest JSON) is required before submitting to the store" : "At least one published version (ZIP + manifest) is required before submitting to the store"),
129
+ status: J > 0 ? "passed" : "failed",
130
+ icon: /* @__PURE__ */ x(p, { size: 20 }),
131
+ actionLabel: "Create a version →",
132
+ actionPath: n
133
+ }), G.appType === "API_INTEGRATION" && (a.push({
134
+ id: "oauth",
135
+ label: O("devportal.checklistOAuthLabel", "OAuth Configuration"),
136
+ description: O("devportal.checklistOAuthDesc", "Authorization URL, Token URL and Client ID are required so users can connect their accounts. Without these the Connect button does not work."),
137
+ status: U ? "passed" : "failed",
138
+ icon: /* @__PURE__ */ x(ae, { size: 20 }),
139
+ actionLabel: "Configure in Edit App →",
140
+ actionPath: r
141
+ }), a.push({
142
+ id: "webhook",
143
+ label: O("devportal.checklistWebhookLabel", "Webhook Endpoint"),
144
+ description: O("devportal.checklistWebhookDesc", "At least one webhook endpoint must be configured so your server receives platform events after users connect. Without this the integration does nothing."),
145
+ status: W > 0 ? "passed" : "failed",
146
+ icon: /* @__PURE__ */ x(ce, { size: 20 }),
147
+ actionLabel: "Add a webhook →",
148
+ actionPath: i
149
+ }), a.push({
150
+ id: "documentation",
151
+ label: O("devportal.checklistDocsLabel", "Documentation URL"),
152
+ description: O("devportal.checklistDocsDesc", "Users need to know how to use and configure this integration. A documentation link is required for API integrations."),
153
+ status: G.documentationUrl ? "passed" : "failed",
154
+ icon: /* @__PURE__ */ x(m, { size: 20 }),
155
+ actionLabel: "Add documentation URL →",
156
+ actionPath: r
157
+ }), a.push({
158
+ id: "website",
159
+ label: O("devportal.checklistWebsiteLabel", "Website URL"),
160
+ description: O("devportal.checklistWebsiteDesc", "Users need to verify who built this integration. A website URL is required so users know where to get support."),
161
+ status: G.websiteUrl ? "passed" : "failed",
162
+ icon: /* @__PURE__ */ x(g, { size: 20 }),
163
+ actionLabel: "Add website URL →",
164
+ actionPath: r
165
+ })), a.push({
166
+ id: "status",
167
+ label: O("devportal.checklistStatusLabel", "App Status"),
168
+ description: O("devportal.checklistStatusDesc", "App must be in DRAFT or REJECTED state to submit"),
169
+ status: ["DRAFT", "REJECTED"].includes(G.status ?? "") ? "passed" : "warning",
170
+ icon: /* @__PURE__ */ x(p, { size: 20 })
171
+ }), a;
172
+ }, [
173
+ G,
174
+ q,
175
+ J,
176
+ W,
177
+ U,
178
+ C
179
+ ]), X = Y.filter((e) => e.status === "passed").length, Z = Y.filter((e) => e.status === "failed").length, Q = Y.filter((e) => e.status === "warning").length, be = ["DRAFT", "REJECTED"].includes(G?.status ?? ""), $ = !R && !z && Z === 0 && !!G && !K && be, xe = (e) => {
91
180
  switch (e) {
92
- case "passed": return /* @__PURE__ */ T(m, {
181
+ case "passed": return /* @__PURE__ */ x(p, {
93
182
  size: 20,
94
183
  className: "text-status-success-text"
95
184
  });
96
- case "failed": return /* @__PURE__ */ T(S, {
185
+ case "failed": return /* @__PURE__ */ x(y, {
97
186
  size: 20,
98
187
  className: "text-status-error-text"
99
188
  });
100
- case "warning": return /* @__PURE__ */ T(p, {
189
+ case "warning": return /* @__PURE__ */ x(f, {
101
190
  size: 20,
102
191
  className: "text-status-warning-text"
103
192
  });
104
- default: return /* @__PURE__ */ T("div", { className: "h-5 w-5 rounded-full border-2 border-border-default" });
193
+ default: return /* @__PURE__ */ x("div", { className: "h-5 w-5 rounded-full border-2 border-border-default" });
105
194
  }
106
- }, $ = (e) => {
195
+ }, Se = (e) => {
107
196
  switch (e) {
108
197
  case "passed": return "bg-status-success-bg-subtle border-border-subtle";
109
198
  case "failed": return "bg-status-error-bg-subtle border-border-subtle";
@@ -111,240 +200,356 @@ var D = [
111
200
  default: return "bg-bg-canvas border-border-subtle";
112
201
  }
113
202
  };
114
- return V ? /* @__PURE__ */ T(r, {
115
- title: M("devportal.publishToStoreTitle", "Publish to Store"),
116
- description: M("devportal.loadingApplicationDetails", "Loading application details..."),
117
- backLink: `/apps/${O}`,
118
- backLabel: M("devportal.backToApplication", "Back to Application"),
119
- children: /* @__PURE__ */ T("div", {
203
+ return R ? /* @__PURE__ */ x(i, {
204
+ title: O("devportal.publishToStoreTitle", "Publish to Store"),
205
+ description: O("devportal.loadingApplicationDetails", "Loading application details..."),
206
+ backLink: `/apps/${C}`,
207
+ backLabel: O("devportal.backToApplication", "Back to Application"),
208
+ children: /* @__PURE__ */ x("div", {
120
209
  className: "flex items-center justify-center py-12",
121
- children: /* @__PURE__ */ T(y, { className: "animate-spin h-8 w-8 text-text-secondary" })
210
+ children: /* @__PURE__ */ x(_, { className: "animate-spin h-8 w-8 text-text-secondary" })
122
211
  })
123
- }) : H || !W ? /* @__PURE__ */ T(r, {
124
- title: M("devportal.publishToStoreTitle", "Publish to Store"),
125
- description: M("devportal.couldNotLoadApplication", "Could not load application"),
126
- backLink: `/apps/${O}`,
127
- backLabel: M("devportal.backToApplication", "Back to Application"),
128
- children: /* @__PURE__ */ T(a, {
212
+ }) : z || !G ? /* @__PURE__ */ x(i, {
213
+ title: O("devportal.publishToStoreTitle", "Publish to Store"),
214
+ description: O("devportal.couldNotLoadApplication", "Could not load application"),
215
+ backLink: `/apps/${C}`,
216
+ backLabel: O("devportal.backToApplication", "Back to Application"),
217
+ children: /* @__PURE__ */ x(o, {
129
218
  variant: "error",
130
- title: M("devportal.failedToLoadApplication", "Failed to load application"),
131
- children: H?.message ?? M("devportal.applicationNotFound", "Application not found")
219
+ title: O("devportal.failedToLoadApplication", "Failed to load application"),
220
+ children: z?.message ?? O("devportal.applicationNotFound", "Application not found")
221
+ })
222
+ }) : me ? /* @__PURE__ */ x(s, {
223
+ permission: c.APP_SUBMIT,
224
+ children: /* @__PURE__ */ x(i, {
225
+ title: O("devportal.publishToStoreTitle", "Publish to Store"),
226
+ backLink: `/apps/${C}`,
227
+ backLabel: O("devportal.backToApplication", "Back to Application"),
228
+ children: /* @__PURE__ */ S("div", {
229
+ className: "flex flex-col items-center justify-center py-16 gap-6 text-center",
230
+ children: [
231
+ /* @__PURE__ */ x("div", {
232
+ className: "rounded-full bg-status-success-bg p-4",
233
+ children: /* @__PURE__ */ x(oe, {
234
+ size: 40,
235
+ className: "text-status-success-text"
236
+ })
237
+ }),
238
+ /* @__PURE__ */ S("div", {
239
+ className: "space-y-2",
240
+ children: [/* @__PURE__ */ x("h2", {
241
+ className: "text-2xl font-bold",
242
+ children: O("devportal.submittedSuccessTitle", "Submitted for Review!")
243
+ }), /* @__PURE__ */ x("p", {
244
+ className: "text-muted-foreground max-w-md",
245
+ children: O("devportal.submittedSuccessMsg", "Your app has been submitted to the marketplace review queue. You'll receive email notifications as the review progresses — typically 3–5 business days.")
246
+ })]
247
+ }),
248
+ /* @__PURE__ */ S("div", {
249
+ className: "rounded-lg border bg-muted/40 px-6 py-4 text-sm text-left space-y-2 max-w-md w-full",
250
+ children: [/* @__PURE__ */ x("p", {
251
+ className: "font-medium",
252
+ children: "What happens next:"
253
+ }), /* @__PURE__ */ S("ul", {
254
+ className: "space-y-1 text-muted-foreground list-none",
255
+ children: [
256
+ /* @__PURE__ */ S("li", {
257
+ className: "flex items-start gap-2",
258
+ children: [
259
+ /* @__PURE__ */ x(p, {
260
+ size: 14,
261
+ className: "mt-0.5 text-status-success-text shrink-0"
262
+ }),
263
+ " ",
264
+ "Our team reviews your submission"
265
+ ]
266
+ }),
267
+ /* @__PURE__ */ S("li", {
268
+ className: "flex items-start gap-2",
269
+ children: [
270
+ /* @__PURE__ */ x(p, {
271
+ size: 14,
272
+ className: "mt-0.5 text-status-success-text shrink-0"
273
+ }),
274
+ " ",
275
+ "You'll get an email on approval or if changes are needed"
276
+ ]
277
+ }),
278
+ /* @__PURE__ */ S("li", {
279
+ className: "flex items-start gap-2",
280
+ children: [
281
+ /* @__PURE__ */ x(p, {
282
+ size: 14,
283
+ className: "mt-0.5 text-status-success-text shrink-0"
284
+ }),
285
+ " ",
286
+ "Once approved, your app goes live in the marketplace"
287
+ ]
288
+ })
289
+ ]
290
+ })]
291
+ }),
292
+ /* @__PURE__ */ x("button", {
293
+ onClick: () => E?.(`${D}/apps/${C}`),
294
+ className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted",
295
+ children: "Back to App"
296
+ })
297
+ ]
298
+ })
132
299
  })
133
- }) : /* @__PURE__ */ T(o, {
134
- permission: s.APP_SUBMIT,
135
- children: /* @__PURE__ */ E(r, {
136
- title: M("devportal.publishToStoreTitle", "Publish to Store"),
137
- description: `${M("devportal.submitAppForReview", "Submit")} "${W.name}" ${M("devportal.forReviewAndPublication", "for review and publication")}`,
138
- purpose: M("devportal.publishPurpose", "Submitting sends your app to the review team, who check it against the marketplace guidelines before it goes live to users. Make sure the listing, screenshots, and permissions are final — preview the listing first, since changes after approval need another review."),
139
- backLink: `/apps/${O}`,
140
- backLabel: M("devportal.backToApplication", "Back to Application"),
141
- actions: /* @__PURE__ */ E("button", {
142
- onClick: () => k?.(`${A}/apps/${O}/listing`),
300
+ }) : /* @__PURE__ */ x(s, {
301
+ permission: c.APP_SUBMIT,
302
+ children: /* @__PURE__ */ S(i, {
303
+ title: O("devportal.publishToStoreTitle", "Publish to Store"),
304
+ description: `${O("devportal.submitAppForReview", "Submit")} "${G.name}" ${O("devportal.forReviewAndPublication", "for review and publication")}`,
305
+ purpose: O("devportal.publishPurpose", "Submitting sends your app to the review team, who check it against the marketplace guidelines before it goes live to users. Make sure the listing, screenshots, and permissions are final — preview the listing first, since changes after approval need another review."),
306
+ backLink: `/apps/${C}`,
307
+ backLabel: O("devportal.backToApplication", "Back to Application"),
308
+ actions: /* @__PURE__ */ S("button", {
309
+ onClick: () => E?.(`${D}/apps/${C}/listing`),
143
310
  className: "inline-flex items-center gap-2 rounded-md border px-3 py-2 text-sm font-medium hover:bg-bg-sunken",
144
- children: [/* @__PURE__ */ T(h, { size: 16 }), M("devportal.previewListing", "Preview Listing")]
311
+ children: [/* @__PURE__ */ x(re, { size: 16 }), O("devportal.previewListing", "Preview Listing")]
145
312
  }),
146
313
  children: [
147
- G && /* @__PURE__ */ E(a, {
314
+ K && /* @__PURE__ */ S(o, {
148
315
  variant: "warning",
149
- title: M("devportal.alreadySubmittedTitle", "Already Submitted"),
316
+ title: O("devportal.alreadySubmittedTitle", "Already Submitted"),
150
317
  children: [
151
- M("devportal.alreadySubmittedMsg1", "This app is currently in"),
318
+ O("devportal.alreadySubmittedMsg1", "This app is currently in"),
152
319
  " ",
153
- /* @__PURE__ */ T("strong", { children: W.status }),
320
+ /* @__PURE__ */ x("strong", { children: G.status }),
154
321
  " ",
155
- M("devportal.alreadySubmittedMsg2", "state and cannot be re-submitted until the review process is complete or the app is rejected.")
322
+ O("devportal.alreadySubmittedMsg2", "state and cannot be re-submitted until the review process is complete or the app is rejected.")
156
323
  ]
157
324
  }),
158
- /* @__PURE__ */ E("div", {
325
+ /* @__PURE__ */ S("div", {
159
326
  className: "rounded-card border border-border-seam bg-bg-surface p-6",
160
327
  children: [
161
- /* @__PURE__ */ T("h2", {
328
+ /* @__PURE__ */ x("h2", {
162
329
  className: "text-lg font-semibold",
163
- children: M("devportal.preSubmissionChecklist", "Pre-submission Checklist")
330
+ children: O("devportal.preSubmissionChecklist", "Pre-submission Checklist")
164
331
  }),
165
- /* @__PURE__ */ T("p", {
332
+ /* @__PURE__ */ x("p", {
166
333
  className: "mt-1 text-sm text-text-secondary",
167
- children: M("devportal.completeAllRequiredItems", "Complete all required items before submitting for review")
334
+ children: O("devportal.completeAllRequiredItems", "Complete all required items before submitting for review")
168
335
  }),
169
- /* @__PURE__ */ E("div", {
336
+ /* @__PURE__ */ S("div", {
170
337
  className: "mt-4 flex gap-6",
171
338
  children: [
172
- /* @__PURE__ */ E("div", {
339
+ /* @__PURE__ */ S("div", {
173
340
  className: "flex items-center gap-2",
174
- children: [/* @__PURE__ */ T(m, {
341
+ children: [/* @__PURE__ */ x(p, {
175
342
  size: 20,
176
343
  className: "text-status-success-text"
177
- }), /* @__PURE__ */ E("span", { children: [
178
- q,
344
+ }), /* @__PURE__ */ S("span", { children: [
345
+ X,
179
346
  " ",
180
- M("devportal.passed", "Passed")
347
+ O("devportal.passed", "Passed")
181
348
  ] })]
182
349
  }),
183
- /* @__PURE__ */ E("div", {
350
+ /* @__PURE__ */ S("div", {
184
351
  className: "flex items-center gap-2",
185
- children: [/* @__PURE__ */ T(S, {
352
+ children: [/* @__PURE__ */ x(y, {
186
353
  size: 20,
187
354
  className: "text-status-error-text"
188
- }), /* @__PURE__ */ E("span", { children: [
189
- J,
355
+ }), /* @__PURE__ */ S("span", { children: [
356
+ Z,
190
357
  " ",
191
- M("devportal.failed", "Failed")
358
+ O("devportal.failed", "Failed")
192
359
  ] })]
193
360
  }),
194
- /* @__PURE__ */ E("div", {
361
+ /* @__PURE__ */ S("div", {
195
362
  className: "flex items-center gap-2",
196
- children: [/* @__PURE__ */ T(p, {
363
+ children: [/* @__PURE__ */ x(f, {
197
364
  size: 20,
198
365
  className: "text-status-warning-text"
199
- }), /* @__PURE__ */ E("span", { children: [
200
- Y,
366
+ }), /* @__PURE__ */ S("span", { children: [
367
+ Q,
201
368
  " ",
202
- M("devportal.warnings", "Warnings")
369
+ O("devportal.warnings", "Warnings")
203
370
  ] })]
204
371
  })
205
372
  ]
206
373
  })
207
374
  ]
208
375
  }),
209
- /* @__PURE__ */ T(i, { children: /* @__PURE__ */ T("div", {
376
+ /* @__PURE__ */ x(a, { children: /* @__PURE__ */ x("div", {
210
377
  className: "space-y-3",
211
- children: K.map((e) => /* @__PURE__ */ E("div", {
212
- className: `flex items-center gap-4 rounded-lg border p-4 ${$(e.status)}`,
378
+ children: Y.map((e) => /* @__PURE__ */ S("div", {
379
+ className: `flex items-center gap-4 rounded-lg border p-4 ${Se(e.status)}`,
213
380
  children: [
214
- /* @__PURE__ */ T("div", {
381
+ /* @__PURE__ */ x("div", {
215
382
  className: "rounded-lg bg-bg-surface p-2",
216
383
  children: e.icon
217
384
  }),
218
- /* @__PURE__ */ E("div", {
385
+ /* @__PURE__ */ S("div", {
219
386
  className: "flex-1",
220
- children: [/* @__PURE__ */ T("p", {
221
- className: "font-medium",
222
- children: e.label
223
- }), /* @__PURE__ */ T("p", {
224
- className: "text-sm text-text-secondary",
225
- children: e.description
226
- })]
387
+ children: [
388
+ /* @__PURE__ */ x("p", {
389
+ className: "font-medium",
390
+ children: e.label
391
+ }),
392
+ /* @__PURE__ */ x("p", {
393
+ className: "text-sm text-text-secondary",
394
+ children: e.description
395
+ }),
396
+ e.status !== "passed" && e.actionPath && /* @__PURE__ */ S("button", {
397
+ type: "button",
398
+ onClick: () => E?.(`${D}${e.actionPath}`),
399
+ className: "mt-1 inline-flex items-center gap-1 text-xs text-primary hover:underline",
400
+ children: [
401
+ e.actionLabel ?? "Fix this",
402
+ " ",
403
+ /* @__PURE__ */ x(ne, { size: 11 })
404
+ ]
405
+ })
406
+ ]
227
407
  }),
228
- Q(e.status)
408
+ xe(e.status)
229
409
  ]
230
410
  }, e.id))
231
411
  }) }),
232
- !G && /* @__PURE__ */ E(i, {
233
- title: M("devportal.notesForReviewerTitle", "Notes for Reviewer"),
234
- description: M("devportal.notesForReviewerDesc", "Optional message to the review team"),
235
- children: [/* @__PURE__ */ T("textarea", {
236
- value: L,
237
- onChange: (e) => R(e.target.value),
238
- placeholder: M("devportal.notesForReviewerPlaceholder", "Describe what your app does, any special review considerations, or testing instructions..."),
412
+ !K && /* @__PURE__ */ S(a, {
413
+ title: O("devportal.notesForReviewerTitle", "Notes for Reviewer"),
414
+ description: O("devportal.notesForReviewerDesc", "Optional message to the review team"),
415
+ children: [/* @__PURE__ */ x("textarea", {
416
+ value: P,
417
+ onChange: (e) => F(e.target.value),
418
+ placeholder: O("devportal.notesForReviewerPlaceholder", "Describe what your app does, any special review considerations, or testing instructions..."),
239
419
  rows: 4,
240
420
  maxLength: 1e3,
241
421
  className: "w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm ring-offset-background placeholder:text-text-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] resize-none"
242
- }), /* @__PURE__ */ E("p", {
422
+ }), /* @__PURE__ */ S("p", {
243
423
  className: "mt-1 text-xs text-text-secondary text-right",
244
- children: [L.length, "/1000"]
424
+ children: [P.length, "/1000"]
245
425
  })]
246
426
  }),
247
- F && /* @__PURE__ */ T(a, {
427
+ j && /* @__PURE__ */ x(o, {
248
428
  variant: "error",
249
- title: M("devportal.submissionFailedTitle", "Submission Failed"),
250
- children: F
429
+ title: O("devportal.submissionFailedTitle", "Submission Failed"),
430
+ children: j
251
431
  }),
252
- J > 0 && !G && /* @__PURE__ */ E(a, {
432
+ Z > 0 && !K && /* @__PURE__ */ S(o, {
253
433
  variant: "error",
254
- title: M("devportal.cannotSubmitTitle", "Cannot Submit"),
434
+ title: O("devportal.cannotSubmitTitle", "Cannot Submit Yet"),
255
435
  children: [
256
- M("devportal.pleaseFixItems1", "Please fix"),
436
+ O("devportal.pleaseFixItems1", "Please fix"),
257
437
  " ",
258
- J,
438
+ Z,
259
439
  " ",
260
- M("devportal.pleaseFixItems2", "failed item(s) before submitting for review."),
261
- /* @__PURE__ */ T("button", {
262
- onClick: () => k?.(`${A}/apps/${O}/edit`),
263
- className: "mt-2 block text-sm underline hover:no-underline",
264
- children: M("devportal.editApplicationToFix", "Edit application to fix issues →")
440
+ O("devportal.pleaseFixItems2", "required item(s) before submitting for review."),
441
+ /* @__PURE__ */ S("div", {
442
+ className: "mt-2 flex flex-wrap gap-3",
443
+ children: [
444
+ /* @__PURE__ */ x("button", {
445
+ onClick: () => E?.(`${D}/apps/${C}`),
446
+ className: "text-sm underline hover:no-underline",
447
+ children: O("devportal.goToMarketplaceListing", "Update marketplace listing →")
448
+ }),
449
+ q && J === 0 && /* @__PURE__ */ x("button", {
450
+ onClick: () => E?.(`${D}/apps/${C}/versions`),
451
+ className: "text-sm underline hover:no-underline",
452
+ children: O("devportal.goToVersions", "Add a published version →")
453
+ }),
454
+ V && !U && /* @__PURE__ */ x("button", {
455
+ onClick: () => E?.(`${D}/apps/${C}/edit#oauth-config`),
456
+ className: "text-sm underline hover:no-underline",
457
+ children: "Configure OAuth endpoints →"
458
+ }),
459
+ V && W === 0 && /* @__PURE__ */ x("button", {
460
+ onClick: () => E?.(`${D}/apps/${C}/webhooks`),
461
+ className: "text-sm underline hover:no-underline",
462
+ children: "Add a webhook →"
463
+ })
464
+ ]
265
465
  })
266
466
  ]
267
467
  }),
268
- Y > 0 && J === 0 && !G && /* @__PURE__ */ E(a, {
468
+ Q > 0 && Z === 0 && !K && /* @__PURE__ */ S(o, {
269
469
  variant: "warning",
270
- title: M("devportal.warningsTitle", "Warnings"),
470
+ title: O("devportal.warningsTitle", "Warnings"),
271
471
  children: [
272
- M("devportal.warningsMsg1", "You have"),
472
+ O("devportal.warningsMsg1", "You have"),
273
473
  " ",
274
- Y,
474
+ Q,
275
475
  " ",
276
- M("devportal.warningsMsg2", "warning(s). While you can submit, addressing these may improve your app's chances of approval.")
476
+ O("devportal.warningsMsg2", "warning(s). While you can submit, addressing these may improve your app's chances of approval.")
277
477
  ]
278
478
  }),
279
- /* @__PURE__ */ T(i, {
280
- title: M("devportal.reviewProcessTitle", "Review Process"),
281
- children: /* @__PURE__ */ T("div", {
479
+ /* @__PURE__ */ x(a, {
480
+ title: O("devportal.reviewProcessTitle", "Review Process"),
481
+ children: /* @__PURE__ */ x("div", {
282
482
  className: "rounded-lg border bg-bg-sunken/50 p-4",
283
- children: /* @__PURE__ */ E("ul", {
483
+ children: /* @__PURE__ */ S("ul", {
284
484
  className: "space-y-2 text-sm",
285
485
  children: [
286
- /* @__PURE__ */ E("li", {
486
+ /* @__PURE__ */ S("li", {
287
487
  className: "flex items-start gap-2",
288
- children: [/* @__PURE__ */ T(m, {
488
+ children: [/* @__PURE__ */ x(p, {
289
489
  size: 16,
290
490
  className: "mt-0.5 text-primary"
291
- }), /* @__PURE__ */ T("span", { children: M("devportal.reviewProcessInfo1", "Review typically takes 3-5 business days") })]
491
+ }), /* @__PURE__ */ x("span", { children: O("devportal.reviewProcessInfo1", "Review typically takes 3-5 business days") })]
292
492
  }),
293
- /* @__PURE__ */ E("li", {
493
+ /* @__PURE__ */ S("li", {
294
494
  className: "flex items-start gap-2",
295
- children: [/* @__PURE__ */ T(m, {
495
+ children: [/* @__PURE__ */ x(p, {
296
496
  size: 16,
297
497
  className: "mt-0.5 text-primary"
298
- }), /* @__PURE__ */ T("span", { children: M("devportal.reviewProcessInfo2", "You'll receive notifications about review status changes") })]
498
+ }), /* @__PURE__ */ x("span", { children: O("devportal.reviewProcessInfo2", "You'll receive notifications about review status changes") })]
299
499
  }),
300
- /* @__PURE__ */ E("li", {
500
+ /* @__PURE__ */ S("li", {
301
501
  className: "flex items-start gap-2",
302
- children: [/* @__PURE__ */ T(m, {
502
+ children: [/* @__PURE__ */ x(p, {
303
503
  size: 16,
304
504
  className: "mt-0.5 text-primary"
305
- }), /* @__PURE__ */ T("span", { children: M("devportal.reviewProcessInfo3", "If changes are requested, you can resubmit without losing your place in the queue") })]
505
+ }), /* @__PURE__ */ x("span", { children: O("devportal.reviewProcessInfo3", "If changes are requested, you can resubmit without losing your place in the queue") })]
306
506
  }),
307
- /* @__PURE__ */ E("li", {
507
+ /* @__PURE__ */ S("li", {
308
508
  className: "flex items-start gap-2",
309
- children: [/* @__PURE__ */ T(m, {
509
+ children: [/* @__PURE__ */ x(p, {
310
510
  size: 16,
311
511
  className: "mt-0.5 text-primary"
312
- }), /* @__PURE__ */ T("span", { children: M("devportal.reviewProcessInfo4", "Once approved and published, your app will be visible in the marketplace") })]
512
+ }), /* @__PURE__ */ x("span", { children: O("devportal.reviewProcessInfo4", "Once approved and published, your app will be visible in the marketplace") })]
313
513
  })
314
514
  ]
315
515
  })
316
516
  })
317
517
  }),
318
- /* @__PURE__ */ E("div", {
518
+ /* @__PURE__ */ S("div", {
319
519
  className: "flex gap-3",
320
- children: [/* @__PURE__ */ T("button", {
321
- onClick: () => k?.(`${A}/apps/${O}`),
520
+ children: [/* @__PURE__ */ x("button", {
521
+ onClick: () => E?.(`${D}/apps/${C}`),
322
522
  className: "rounded-md border px-4 py-2 text-sm font-medium hover:bg-bg-sunken",
323
- children: M("devportal.cancelButton", "Cancel")
324
- }), /* @__PURE__ */ T("button", {
523
+ children: O("devportal.cancelButton", "Cancel")
524
+ }), /* @__PURE__ */ x("button", {
325
525
  onClick: async () => {
326
- if (O) {
327
- P(!0), I(null);
526
+ if (C) {
527
+ A(!0), M(null);
328
528
  try {
329
- let e = await U({ variables: {
330
- id: O,
331
- notes: L.trim() || void 0
529
+ let e = await he({ variables: {
530
+ id: C,
531
+ notes: P.trim() || void 0
332
532
  } });
333
533
  if (e.error) throw e.error;
334
- k?.(`${A}/apps/${O}`);
534
+ await ge({ variables: {
535
+ id: C,
536
+ notes: P.trim() || void 0
537
+ } }), N(!0);
335
538
  } catch (e) {
336
- I(e instanceof Error ? e.message : M("devportal.submitFailedDefault", "Failed to submit for review")), P(!1);
539
+ M(e instanceof Error ? e.message : O("devportal.submitFailedDefault", "Failed to submit for review"));
540
+ } finally {
541
+ A(!1);
337
542
  }
338
543
  }
339
544
  },
340
- disabled: !Z || N || !z.allowed,
341
- "aria-disabled": !Z || N || !z.allowed,
342
- title: z.allowed ? void 0 : M("devportal.common.noPermission", "You do not have permission to perform this action"),
545
+ disabled: !$ || k || !I.allowed,
546
+ "aria-disabled": !$ || k || !I.allowed,
547
+ title: I.allowed ? void 0 : O("devportal.common.noPermission", "You do not have permission to perform this action"),
343
548
  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 disabled:opacity-50 disabled:cursor-not-allowed focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
344
- children: N ? /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(y, {
549
+ children: k ? /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(_, {
345
550
  size: 16,
346
551
  className: "animate-spin"
347
- }), M("devportal.submittingButton", "Submitting...")] }) : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(b, { size: 16 }), M("devportal.submitForReviewButton", "Submit for Review")] })
552
+ }), O("devportal.submittingButton", "Submitting...")] }) : /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(se, { size: 16 }), O("devportal.submitForReviewButton", "Submit for Review")] })
348
553
  })]
349
554
  })
350
555
  ]
@@ -352,6 +557,6 @@ var D = [
352
557
  });
353
558
  };
354
559
  //#endregion
355
- export { O as PublishPage };
560
+ export { E as PublishPage };
356
561
 
357
562
  //# sourceMappingURL=PublishPage.js.map