@burdenoff/microfe-devportal 2026.625.4 → 2026.625.6

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