@burdenoff/microfe-devportal 2026.608.1 → 2026.609.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/DevportalRoutes.js +9 -5
- package/dist/devportal/DevportalRoutes.js.map +1 -1
- package/dist/devportal/hooks/useGraphQL.js +49 -36
- package/dist/devportal/hooks/useGraphQL.js.map +1 -1
- package/dist/devportal/pages/DashboardPage.js +152 -134
- package/dist/devportal/pages/DashboardPage.js.map +1 -1
- package/dist/devportal/pages/SetupPage.js +501 -0
- package/dist/devportal/pages/SetupPage.js.map +1 -0
- package/dist/devportal/pages/StoreSubmissionPage.js +98 -76
- package/dist/devportal/pages/StoreSubmissionPage.js.map +1 -1
- package/dist/node_modules/@apollo/client/link/core/ApolloLink.js +52 -0
- package/dist/node_modules/@apollo/client/link/core/ApolloLink.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/subscriptions/index.js +41 -0
- package/dist/node_modules/@apollo/client/link/subscriptions/index.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/utils/createOperation.js +34 -0
- package/dist/node_modules/@apollo/client/link/utils/createOperation.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/caching/sizes.js +6 -0
- package/dist/node_modules/@apollo/client/utilities/caching/sizes.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/graphql/print.js +16 -0
- package/dist/node_modules/@apollo/client/utilities/graphql/print.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/caches.js +19 -0
- package/dist/node_modules/@apollo/client/utilities/internal/caches.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js +21 -0
- package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js +17 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js +9 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js +9 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js +8 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js +9 -0
- package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js +10 -0
- package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js +8 -0
- package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js +10 -0
- package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/memoize.js +23 -0
- package/dist/node_modules/@apollo/client/utilities/internal/memoize.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js +10 -0
- package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/invariant/index.js +57 -0
- package/dist/node_modules/@apollo/client/utilities/invariant/index.js.map +1 -0
- package/dist/node_modules/@apollo/client/version.js +6 -0
- package/dist/node_modules/@apollo/client/version.js.map +1 -0
- package/dist/node_modules/@wry/caches/lib/weak.js +67 -0
- package/dist/node_modules/@wry/caches/lib/weak.js.map +1 -0
- package/dist/node_modules/@wry/trie/lib/index.js +53 -0
- package/dist/node_modules/@wry/trie/lib/index.js.map +1 -0
- package/dist/node_modules/graphql-ws/dist/client.js +272 -0
- package/dist/node_modules/graphql-ws/dist/client.js.map +1 -0
- package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js +62 -0
- package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js +21 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js +78 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js +117 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js +93 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/config.js +12 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/config.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js +9 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +16 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js +8 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +13 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +11 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js +11 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js +22 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js +8 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +8 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js +6 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js +13 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js +14 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map +1 -0
- package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js +52 -0
- package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js.map +1 -0
- package/package.json +2 -1
|
@@ -26,8 +26,8 @@ function g(e, t) {
|
|
|
26
26
|
})
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
|
-
var _ = s(() => import("./pages/OrganizationsPage.js").then((e) => ({ default: e.OrganizationsPage }))), v = s(() => import("./pages/OrganizationDetailPage.js").then((e) => ({ default: e.OrganizationDetailPage }))), y = s(() => import("./pages/CreateOrganizationPage.js").then((e) => ({ default: e.CreateOrganizationPage }))), b = s(() => import("./pages/OrganizationMembersPage.js").then((e) => ({ default: e.OrganizationMembersPage }))), x = s(() => import("./pages/RevenueRedirectPage.js").then((e) => ({ default: e.RevenueRedirectPage }))), S = s(() => import("./pages/ApplicationsPage.js").then((e) => ({ default: e.ApplicationsPage }))), C = s(() => import("./pages/ApplicationDetailPage.js").then((e) => ({ default: e.ApplicationDetailPage }))), w = s(() => import("./pages/CreateApplicationPage.js").then((e) => ({ default: e.CreateApplicationPage }))), T = s(() => import("./pages/EditApplicationPage.js").then((e) => ({ default: e.EditApplicationPage }))), E = s(() => import("./pages/ApplicationVersionsPage.js").then((e) => ({ default: e.ApplicationVersionsPage }))), D = s(() => import("./pages/OAuthClientsPage.js").then((e) => ({ default: e.OAuthClientsPage }))), O = s(() => import("./pages/CreateOAuthClientPage.js").then((e) => ({ default: e.CreateOAuthClientPage }))), k = s(() => import("./pages/OAuthClientDetailPage.js").then((e) => ({ default: e.OAuthClientDetailPage }))), A = s(() => import("./pages/ApiKeysPage.js").then((e) => ({ default: e.ApiKeysPage }))), j = s(() => import("./pages/CreateApiKeyPage.js").then((e) => ({ default: e.CreateApiKeyPage }))), M = s(() => import("./pages/WebhooksPage.js").then((e) => ({ default: e.WebhooksPage }))), N = s(() => import("./pages/CreateWebhookPage.js").then((e) => ({ default: e.CreateWebhookPage }))), P = s(() => import("./pages/WebhookDetailPage.js").then((e) => ({ default: e.WebhookDetailPage }))), F = s(() => import("./pages/AnalyticsDashboardPage.js").then((e) => ({ default: e.AnalyticsDashboardPage }))), I = s(() => import("./pages/DocumentationPage.js").then((e) => ({ default: e.DocumentationPage }))), L = s(() => import("./pages/ResourcesPage.js").then((e) => ({ default: e.ResourcesPage }))), R = s(() => import("./pages/SettingsPage.js").then((e) => ({ default: e.SettingsPage }))), z = s(() => import("./pages/PublishPage.js").then((e) => ({ default: e.PublishPage }))), B = s(() => import("./pages/AppLogsPage.js").then((e) => ({ default: e.AppLogsPage }))), V = s(() => import("./pages/DelegationsPage.js").then((e) => ({ default: e.DelegationsPage }))), H = s(() => import("./pages/ListingPreviewPage.js").then((e) => ({ default: e.ListingPreviewPage }))), U = s(() => import("./pages/StoreSubmissionPage.js").then((e) => ({ default: e.StoreSubmissionPage }))), W = s(() => import("./pages/PublisherProfilePage.js").then((e) => ({ default: e.PublisherProfilePage })));
|
|
30
|
-
function
|
|
29
|
+
var _ = s(() => import("./pages/OrganizationsPage.js").then((e) => ({ default: e.OrganizationsPage }))), v = s(() => import("./pages/OrganizationDetailPage.js").then((e) => ({ default: e.OrganizationDetailPage }))), y = s(() => import("./pages/CreateOrganizationPage.js").then((e) => ({ default: e.CreateOrganizationPage }))), b = s(() => import("./pages/OrganizationMembersPage.js").then((e) => ({ default: e.OrganizationMembersPage }))), x = s(() => import("./pages/RevenueRedirectPage.js").then((e) => ({ default: e.RevenueRedirectPage }))), S = s(() => import("./pages/ApplicationsPage.js").then((e) => ({ default: e.ApplicationsPage }))), C = s(() => import("./pages/ApplicationDetailPage.js").then((e) => ({ default: e.ApplicationDetailPage }))), w = s(() => import("./pages/CreateApplicationPage.js").then((e) => ({ default: e.CreateApplicationPage }))), T = s(() => import("./pages/EditApplicationPage.js").then((e) => ({ default: e.EditApplicationPage }))), E = s(() => import("./pages/ApplicationVersionsPage.js").then((e) => ({ default: e.ApplicationVersionsPage }))), D = s(() => import("./pages/OAuthClientsPage.js").then((e) => ({ default: e.OAuthClientsPage }))), O = s(() => import("./pages/CreateOAuthClientPage.js").then((e) => ({ default: e.CreateOAuthClientPage }))), k = s(() => import("./pages/OAuthClientDetailPage.js").then((e) => ({ default: e.OAuthClientDetailPage }))), A = s(() => import("./pages/ApiKeysPage.js").then((e) => ({ default: e.ApiKeysPage }))), j = s(() => import("./pages/CreateApiKeyPage.js").then((e) => ({ default: e.CreateApiKeyPage }))), M = s(() => import("./pages/WebhooksPage.js").then((e) => ({ default: e.WebhooksPage }))), N = s(() => import("./pages/CreateWebhookPage.js").then((e) => ({ default: e.CreateWebhookPage }))), P = s(() => import("./pages/WebhookDetailPage.js").then((e) => ({ default: e.WebhookDetailPage }))), F = s(() => import("./pages/AnalyticsDashboardPage.js").then((e) => ({ default: e.AnalyticsDashboardPage }))), I = s(() => import("./pages/DocumentationPage.js").then((e) => ({ default: e.DocumentationPage }))), L = s(() => import("./pages/ResourcesPage.js").then((e) => ({ default: e.ResourcesPage }))), R = s(() => import("./pages/SettingsPage.js").then((e) => ({ default: e.SettingsPage }))), z = s(() => import("./pages/PublishPage.js").then((e) => ({ default: e.PublishPage }))), B = s(() => import("./pages/AppLogsPage.js").then((e) => ({ default: e.AppLogsPage }))), V = s(() => import("./pages/DelegationsPage.js").then((e) => ({ default: e.DelegationsPage }))), H = s(() => import("./pages/ListingPreviewPage.js").then((e) => ({ default: e.ListingPreviewPage }))), U = s(() => import("./pages/StoreSubmissionPage.js").then((e) => ({ default: e.StoreSubmissionPage }))), W = s(() => import("./pages/PublisherProfilePage.js").then((e) => ({ default: e.PublisherProfilePage }))), G = s(() => import("./pages/SetupPage.js").then((e) => ({ default: e.SetupPage })));
|
|
30
|
+
function K() {
|
|
31
31
|
return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(i, {}), /* @__PURE__ */ m(d, { children: [
|
|
32
32
|
/* @__PURE__ */ p(u, {
|
|
33
33
|
index: !0,
|
|
@@ -161,22 +161,26 @@ function G() {
|
|
|
161
161
|
path: "settings",
|
|
162
162
|
element: g("settings", /* @__PURE__ */ p(R, {}))
|
|
163
163
|
}),
|
|
164
|
+
/* @__PURE__ */ p(u, {
|
|
165
|
+
path: "setup",
|
|
166
|
+
element: g("setup", /* @__PURE__ */ p(G, {}))
|
|
167
|
+
}),
|
|
164
168
|
/* @__PURE__ */ p(u, {
|
|
165
169
|
path: "*",
|
|
166
170
|
element: /* @__PURE__ */ p(h, {})
|
|
167
171
|
})
|
|
168
172
|
] })] });
|
|
169
173
|
}
|
|
170
|
-
function
|
|
174
|
+
function q() {
|
|
171
175
|
return /* @__PURE__ */ p(o, {
|
|
172
176
|
fallback: /* @__PURE__ */ p(t, { message: "Loading page..." }),
|
|
173
177
|
children: /* @__PURE__ */ p(d, { children: /* @__PURE__ */ p(u, {
|
|
174
178
|
path: "/*",
|
|
175
|
-
element: /* @__PURE__ */ p(
|
|
179
|
+
element: /* @__PURE__ */ p(K, {})
|
|
176
180
|
}) })
|
|
177
181
|
});
|
|
178
182
|
}
|
|
179
183
|
//#endregion
|
|
180
|
-
export {
|
|
184
|
+
export { q as DevportalRoutes };
|
|
181
185
|
|
|
182
186
|
//# sourceMappingURL=DevportalRoutes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DevportalRoutes.js","names":[],"sources":["../../src/devportal/DevportalRoutes.tsx"],"sourcesContent":["import { Suspense, lazy, useEffect, type ReactNode } from \"react\";\nimport { Routes, Route, Navigate } from \"react-router-dom\";\nimport { LoadingState } from \"./components/LoadingState\";\nimport { FeatureFlaggedRoute } from \"./components/FeatureFlaggedRoute\";\nimport { TelemetryErrorBoundary } from \"./components/TelemetryErrorBoundary\";\nimport { SectionNav } from \"./components/SectionNav\";\nimport { useDevportal } from \"./providers/DevportalProvider\";\n\n/**\n * Catch-all redirect target for the unmatched `*` route. Uses the\n * DevportalProvider's `basePath` and `navigate` so the redirect works\n * regardless of the integration mode (shell or standalone). Falls back to a\n * relative Navigate when neither is wired, which is the standalone/test path.\n */\nfunction CatchAllRedirect() {\n const { basePath, navigate } = useDevportal();\n useEffect(() => {\n if (basePath && navigate) {\n const target = basePath.endsWith(\"/\") ? basePath.slice(0, -1) : basePath;\n navigate(target || \"/\");\n }\n }, [basePath, navigate]);\n if (basePath && navigate) return null;\n return <Navigate to=\"..\" replace />;\n}\n\n/**\n * Wrap a page element with the per-route feature flag gate and a\n * telemetry-emitting error boundary. The flag name follows\n * `devportal.<page-slug>` convention; when disabled the user sees a\n * graceful fallback instead of a route-level crash.\n *\n * Per `dev/platform/context/feature-flags` and spec\n * `microfrontends/47-FRONTEND-EVENT-BUS.md` (error.boundary emission).\n */\nfunction gated(slug: string, element: ReactNode): ReactNode {\n return (\n <TelemetryErrorBoundary scope={slug}>\n <FeatureFlaggedRoute flag={`devportal.${slug}`}>\n {element}\n </FeatureFlaggedRoute>\n </TelemetryErrorBoundary>\n );\n}\n\n// Eager load the main dashboard page\nimport { DashboardPage } from \"./pages/DashboardPage\";\n\n// Lazy load all other pages\nconst OrganizationsPage = lazy(() =>\n import(\"./pages/OrganizationsPage\").then((m) => ({\n default: m.OrganizationsPage,\n })),\n);\nconst OrganizationDetailPage = lazy(() =>\n import(\"./pages/OrganizationDetailPage\").then((m) => ({\n default: m.OrganizationDetailPage,\n })),\n);\nconst CreateOrganizationPage = lazy(() =>\n import(\"./pages/CreateOrganizationPage\").then((m) => ({\n default: m.CreateOrganizationPage,\n })),\n);\nconst OrganizationMembersPage = lazy(() =>\n import(\"./pages/OrganizationMembersPage\").then((m) => ({\n default: m.OrganizationMembersPage,\n })),\n);\nconst RevenueRedirectPage = lazy(() =>\n import(\"./pages/RevenueRedirectPage\").then((m) => ({\n default: m.RevenueRedirectPage,\n })),\n);\nconst ApplicationsPage = lazy(() =>\n import(\"./pages/ApplicationsPage\").then((m) => ({\n default: m.ApplicationsPage,\n })),\n);\nconst ApplicationDetailPage = lazy(() =>\n import(\"./pages/ApplicationDetailPage\").then((m) => ({\n default: m.ApplicationDetailPage,\n })),\n);\nconst CreateApplicationPage = lazy(() =>\n import(\"./pages/CreateApplicationPage\").then((m) => ({\n default: m.CreateApplicationPage,\n })),\n);\nconst EditApplicationPage = lazy(() =>\n import(\"./pages/EditApplicationPage\").then((m) => ({\n default: m.EditApplicationPage,\n })),\n);\nconst ApplicationVersionsPage = lazy(() =>\n import(\"./pages/ApplicationVersionsPage\").then((m) => ({\n default: m.ApplicationVersionsPage,\n })),\n);\nconst OAuthClientsPage = lazy(() =>\n import(\"./pages/OAuthClientsPage\").then((m) => ({\n default: m.OAuthClientsPage,\n })),\n);\nconst CreateOAuthClientPage = lazy(() =>\n import(\"./pages/CreateOAuthClientPage\").then((m) => ({\n default: m.CreateOAuthClientPage,\n })),\n);\nconst OAuthClientDetailPage = lazy(() =>\n import(\"./pages/OAuthClientDetailPage\").then((m) => ({\n default: m.OAuthClientDetailPage,\n })),\n);\nconst ApiKeysPage = lazy(() =>\n import(\"./pages/ApiKeysPage\").then((m) => ({ default: m.ApiKeysPage })),\n);\nconst CreateApiKeyPage = lazy(() =>\n import(\"./pages/CreateApiKeyPage\").then((m) => ({\n default: m.CreateApiKeyPage,\n })),\n);\nconst WebhooksPage = lazy(() =>\n import(\"./pages/WebhooksPage\").then((m) => ({ default: m.WebhooksPage })),\n);\nconst CreateWebhookPage = lazy(() =>\n import(\"./pages/CreateWebhookPage\").then((m) => ({\n default: m.CreateWebhookPage,\n })),\n);\nconst WebhookDetailPage = lazy(() =>\n import(\"./pages/WebhookDetailPage\").then((m) => ({\n default: m.WebhookDetailPage,\n })),\n);\nconst AnalyticsDashboardPage = lazy(() =>\n import(\"./pages/AnalyticsDashboardPage\").then((m) => ({\n default: m.AnalyticsDashboardPage,\n })),\n);\nconst DocumentationPage = lazy(() =>\n import(\"./pages/DocumentationPage\").then((m) => ({\n default: m.DocumentationPage,\n })),\n);\nconst ResourcesPage = lazy(() =>\n import(\"./pages/ResourcesPage\").then((m) => ({ default: m.ResourcesPage })),\n);\nconst SettingsPage = lazy(() =>\n import(\"./pages/SettingsPage\").then((m) => ({ default: m.SettingsPage })),\n);\nconst PublishPage = lazy(() =>\n import(\"./pages/PublishPage\").then((m) => ({ default: m.PublishPage })),\n);\nconst AppLogsPage = lazy(() =>\n import(\"./pages/AppLogsPage\").then((m) => ({ default: m.AppLogsPage })),\n);\nconst DelegationsPage = lazy(() =>\n import(\"./pages/DelegationsPage\").then((m) => ({\n default: m.DelegationsPage,\n })),\n);\nconst ListingPreviewPage = lazy(() =>\n import(\"./pages/ListingPreviewPage\").then((m) => ({\n default: m.ListingPreviewPage,\n })),\n);\nconst StoreSubmissionPage = lazy(() =>\n import(\"./pages/StoreSubmissionPage\").then((m) => ({\n default: m.StoreSubmissionPage,\n })),\n);\nconst PublisherProfilePage = lazy(() =>\n import(\"./pages/PublisherProfilePage\").then((m) => ({\n default: m.PublisherProfilePage,\n })),\n);\n\n/**\n * Inner routes component - renders actual page routes\n */\nfunction InnerRoutes() {\n return (\n <>\n <SectionNav />\n <Routes>\n {/* Dashboard */}\n <Route index element={gated(\"dashboard\", <DashboardPage />)} />\n\n {/* Organizations */}\n <Route\n path=\"organizations\"\n element={gated(\"organizations\", <OrganizationsPage />)}\n />\n <Route\n path=\"organizations/new\"\n element={gated(\"organizations.create\", <CreateOrganizationPage />)}\n />\n <Route\n path=\"organizations/:orgId\"\n element={gated(\"organizations.detail\", <OrganizationDetailPage />)}\n />\n <Route\n path=\"organizations/:orgId/members\"\n element={gated(\"organizations.members\", <OrganizationMembersPage />)}\n />\n <Route\n path=\"organizations/:orgId/revenue\"\n element={gated(\"organizations.revenue\", <RevenueRedirectPage />)}\n />\n\n {/* Applications */}\n <Route path=\"apps\" element={gated(\"apps\", <ApplicationsPage />)} />\n <Route\n path=\"apps/new\"\n element={gated(\"apps.create\", <CreateApplicationPage />)}\n />\n <Route\n path=\"apps/:appId\"\n element={gated(\"apps.detail\", <ApplicationDetailPage />)}\n />\n <Route\n path=\"apps/:appId/edit\"\n element={gated(\"apps.edit\", <EditApplicationPage />)}\n />\n <Route\n path=\"apps/:appId/versions\"\n element={gated(\"apps.versions\", <ApplicationVersionsPage />)}\n />\n <Route\n path=\"apps/:appId/publish\"\n element={gated(\"apps.publish\", <PublishPage />)}\n />\n <Route\n path=\"apps/:appId/store-submission\"\n element={gated(\"apps.storeSubmission\", <StoreSubmissionPage />)}\n />\n <Route\n path=\"apps/:appId/listing\"\n element={gated(\"apps.listing\", <ListingPreviewPage />)}\n />\n <Route\n path=\"apps/:appId/logs\"\n element={gated(\"apps.logs\", <AppLogsPage />)}\n />\n\n {/* OAuth Clients — user-scoped via auth-svc (no app nesting) */}\n <Route path=\"oauth\" element={gated(\"oauth\", <OAuthClientsPage />)} />\n <Route\n path=\"oauth/new\"\n element={gated(\"oauth.create\", <CreateOAuthClientPage />)}\n />\n <Route\n path=\"oauth/:clientId\"\n element={gated(\"oauth.detail\", <OAuthClientDetailPage />)}\n />\n\n {/* API Keys — user-scoped via auth-svc (no app nesting) */}\n <Route path=\"api-keys\" element={gated(\"apiKeys\", <ApiKeysPage />)} />\n <Route\n path=\"api-keys/new\"\n element={gated(\"apiKeys.create\", <CreateApiKeyPage />)}\n />\n\n {/* Webhooks (App-specific) */}\n <Route\n path=\"apps/:appId/webhooks\"\n element={gated(\"apps.webhooks\", <WebhooksPage />)}\n />\n <Route\n path=\"apps/:appId/webhooks/new\"\n element={gated(\"apps.webhooks.create\", <CreateWebhookPage />)}\n />\n <Route\n path=\"apps/:appId/webhooks/:webhookId\"\n element={gated(\"apps.webhooks.detail\", <WebhookDetailPage />)}\n />\n\n {/* App Analytics */}\n <Route\n path=\"apps/:appId/analytics\"\n element={gated(\"apps.analytics\", <AnalyticsDashboardPage />)}\n />\n\n {/* Delegations */}\n <Route\n path=\"delegations\"\n element={gated(\"delegations\", <DelegationsPage />)}\n />\n\n {/* Global Webhooks views */}\n <Route\n path=\"webhooks/new\"\n element={gated(\"webhooks.create\", <CreateWebhookPage />)}\n />\n <Route path=\"webhooks\" element={gated(\"webhooks\", <WebhooksPage />)} />\n\n {/* Analytics & Revenue */}\n <Route\n path=\"analytics\"\n element={gated(\"analytics\", <AnalyticsDashboardPage />)}\n />\n <Route\n path=\"revenue\"\n element={gated(\"revenue\", <RevenueRedirectPage />)}\n />\n\n {/* Documentation & Resources */}\n <Route path=\"docs\" element={gated(\"docs\", <DocumentationPage />)} />\n <Route\n path=\"resources\"\n element={gated(\"resources\", <ResourcesPage />)}\n />\n\n {/* Admin surfaces (e.g. /admin/reviews) live in admin-app via\n AdminDevportalRoot — intentionally not mounted in user shells. */}\n\n {/* Publisher */}\n <Route\n path=\"publisher/profile\"\n element={gated(\"publisher.profile\", <PublisherProfilePage />)}\n />\n\n {/* Settings */}\n <Route path=\"settings\" element={gated(\"settings\", <SettingsPage />)} />\n\n {/* Catch-all redirect to dashboard */}\n <Route path=\"*\" element={<CatchAllRedirect />} />\n </Routes>\n </>\n );\n}\n\n/**\n * Developer Portal Routes\n *\n * Defines all the routes for the developer portal microfrontend.\n * Uses lazy loading for all pages except the dashboard for optimal performance.\n *\n * When integrated into a shell (basePath provided), the shell already handles\n * the basePath route (e.g., /devportal/*), so this component should render\n * routes relative to that path - NOT nest them under basePath again.\n *\n * Example:\n * - Shell route: /devportal/*\n * - User navigates to: /devportal/organizations\n * - Inside DevportalRoutes, the path is: /organizations (relative to shell route)\n * - InnerRoutes matches: organizations -> OrganizationsPage\n */\nexport function DevportalRoutes() {\n // When basePath is provided, we're in shell integration mode.\n // The shell already matched the basePath route, so we render routes\n // relative to that - using wildcard to catch all sub-paths.\n // When no basePath (standalone mode), just render InnerRoutes at root.\n return (\n <Suspense fallback={<LoadingState message=\"Loading page...\" />}>\n <Routes>\n {/* Wildcard route to let InnerRoutes handle all paths */}\n <Route path=\"/*\" element={<InnerRoutes />} />\n </Routes>\n </Suspense>\n );\n}\n"],"mappings":";;;;;;;;;;AAcA,SAAS,IAAmB;CAC1B,IAAM,EAAE,aAAU,gBAAa,GAAc;AAQ7C,QAPA,QAAgB;AACd,EAAI,KAAY,KAEd,GADe,EAAS,SAAS,IAAI,GAAG,EAAS,MAAM,GAAG,GAAG,GAAG,MAC7C,IAAI;IAExB,CAAC,GAAU,EAAS,CAAC,EACpB,KAAY,IAAiB,OAC1B,kBAAC,GAAD;EAAU,IAAG;EAAK,SAAA;EAAU,CAAA;;AAYrC,SAAS,EAAM,GAAc,GAA+B;AAC1D,QACE,kBAAC,GAAD;EAAwB,OAAO;YAC7B,kBAAC,GAAD;GAAqB,MAAM,aAAa;aACrC;GACmB,CAAA;EACC,CAAA;;AAQ7B,IAAM,IAAoB,QACxB,OAAO,gCAA6B,MAAM,OAAO,EAC/C,SAAS,EAAE,mBACZ,EAAE,CACJ,EACK,IAAyB,QAC7B,OAAO,qCAAkC,MAAM,OAAO,EACpD,SAAS,EAAE,wBACZ,EAAE,CACJ,EACK,IAAyB,QAC7B,OAAO,qCAAkC,MAAM,OAAO,EACpD,SAAS,EAAE,wBACZ,EAAE,CACJ,EACK,IAA0B,QAC9B,OAAO,sCAAmC,MAAM,OAAO,EACrD,SAAS,EAAE,yBACZ,EAAE,CACJ,EACK,IAAsB,QAC1B,OAAO,kCAA+B,MAAM,OAAO,EACj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GAAO,MAAK;GAAO,SAAS,EAAM,QAAQ,kBAAC,GAAD,EAAqB,CAAA,CAAC;GAAI,CAAA;EACpE,kBAAC,GAAD;GACE,MAAK;GACL,SAAS,EAAM,aAAa,kBAAC,GAAD,EAAiB,CAAA,CAAC;GAC9C,CAAA;EAMF,kBAAC,GAAD;GACE,MAAK;GACL,SAAS,EAAM,qBAAqB,kBAAC,GAAD,EAAwB,CAAA,CAAC;GAC7D,CAAA;EAGF,kBAAC,GAAD;GAAO,MAAK;GAAW,SAAS,EAAM,YAAY,kBAAC,GAAD,EAAgB,CAAA,CAAC;GAAI,CAAA;EAGvE,kBAAC,GAAD;GAAO,MAAK;GAAI,SAAS,kBAAC,GAAD,EAAoB,CAAA;GAAI,CAAA;EAC1C,EAAA,CAAA,CACR,EAAA,CAAA;;AAoBP,SAAgB,IAAkB;AAKhC,QACE,kBAAC,GAAD;EAAU,UAAU,kBAAC,GAAD,EAAc,SAAQ,mBAAoB,CAAA;YAC5D,kBAAC,GAAD,EAAA,UAEE,kBAAC,GAAD;GAAO,MAAK;GAAK,SAAS,kBAAC,GAAD,EAAe,CAAA;GAAI,CAAA,EACtC,CAAA;EACA,CAAA"}
|
|
1
|
+
{"version":3,"file":"DevportalRoutes.js","names":[],"sources":["../../src/devportal/DevportalRoutes.tsx"],"sourcesContent":["import { Suspense, lazy, useEffect, type ReactNode } from \"react\";\nimport { Routes, Route, Navigate } from \"react-router-dom\";\nimport { LoadingState } from \"./components/LoadingState\";\nimport { FeatureFlaggedRoute } from \"./components/FeatureFlaggedRoute\";\nimport { TelemetryErrorBoundary } from \"./components/TelemetryErrorBoundary\";\nimport { SectionNav } from \"./components/SectionNav\";\nimport { useDevportal } from \"./providers/DevportalProvider\";\n\n/**\n * Catch-all redirect target for the unmatched `*` route. Uses the\n * DevportalProvider's `basePath` and `navigate` so the redirect works\n * regardless of the integration mode (shell or standalone). Falls back to a\n * relative Navigate when neither is wired, which is the standalone/test path.\n */\nfunction CatchAllRedirect() {\n const { basePath, navigate } = useDevportal();\n useEffect(() => {\n if (basePath && navigate) {\n const target = basePath.endsWith(\"/\") ? basePath.slice(0, -1) : basePath;\n navigate(target || \"/\");\n }\n }, [basePath, navigate]);\n if (basePath && navigate) return null;\n return <Navigate to=\"..\" replace />;\n}\n\n/**\n * Wrap a page element with the per-route feature flag gate and a\n * telemetry-emitting error boundary. The flag name follows\n * `devportal.<page-slug>` convention; when disabled the user sees a\n * graceful fallback instead of a route-level crash.\n *\n * Per `dev/platform/context/feature-flags` and spec\n * `microfrontends/47-FRONTEND-EVENT-BUS.md` (error.boundary emission).\n */\nfunction gated(slug: string, element: ReactNode): ReactNode {\n return (\n <TelemetryErrorBoundary scope={slug}>\n <FeatureFlaggedRoute flag={`devportal.${slug}`}>\n {element}\n </FeatureFlaggedRoute>\n </TelemetryErrorBoundary>\n );\n}\n\n// Eager load the main dashboard page\nimport { DashboardPage } from \"./pages/DashboardPage\";\n\n// Lazy load all other pages\nconst OrganizationsPage = lazy(() =>\n import(\"./pages/OrganizationsPage\").then((m) => ({\n default: m.OrganizationsPage,\n })),\n);\nconst OrganizationDetailPage = lazy(() =>\n import(\"./pages/OrganizationDetailPage\").then((m) => ({\n default: m.OrganizationDetailPage,\n })),\n);\nconst CreateOrganizationPage = lazy(() =>\n import(\"./pages/CreateOrganizationPage\").then((m) => ({\n default: m.CreateOrganizationPage,\n })),\n);\nconst OrganizationMembersPage = lazy(() =>\n import(\"./pages/OrganizationMembersPage\").then((m) => ({\n default: m.OrganizationMembersPage,\n })),\n);\nconst RevenueRedirectPage = lazy(() =>\n import(\"./pages/RevenueRedirectPage\").then((m) => ({\n default: m.RevenueRedirectPage,\n })),\n);\nconst ApplicationsPage = lazy(() =>\n import(\"./pages/ApplicationsPage\").then((m) => ({\n default: m.ApplicationsPage,\n })),\n);\nconst ApplicationDetailPage = lazy(() =>\n import(\"./pages/ApplicationDetailPage\").then((m) => ({\n default: m.ApplicationDetailPage,\n })),\n);\nconst CreateApplicationPage = lazy(() =>\n import(\"./pages/CreateApplicationPage\").then((m) => ({\n default: m.CreateApplicationPage,\n })),\n);\nconst EditApplicationPage = lazy(() =>\n import(\"./pages/EditApplicationPage\").then((m) => ({\n default: m.EditApplicationPage,\n })),\n);\nconst ApplicationVersionsPage = lazy(() =>\n import(\"./pages/ApplicationVersionsPage\").then((m) => ({\n default: m.ApplicationVersionsPage,\n })),\n);\nconst OAuthClientsPage = lazy(() =>\n import(\"./pages/OAuthClientsPage\").then((m) => ({\n default: m.OAuthClientsPage,\n })),\n);\nconst CreateOAuthClientPage = lazy(() =>\n import(\"./pages/CreateOAuthClientPage\").then((m) => ({\n default: m.CreateOAuthClientPage,\n })),\n);\nconst OAuthClientDetailPage = lazy(() =>\n import(\"./pages/OAuthClientDetailPage\").then((m) => ({\n default: m.OAuthClientDetailPage,\n })),\n);\nconst ApiKeysPage = lazy(() =>\n import(\"./pages/ApiKeysPage\").then((m) => ({ default: m.ApiKeysPage })),\n);\nconst CreateApiKeyPage = lazy(() =>\n import(\"./pages/CreateApiKeyPage\").then((m) => ({\n default: m.CreateApiKeyPage,\n })),\n);\nconst WebhooksPage = lazy(() =>\n import(\"./pages/WebhooksPage\").then((m) => ({ default: m.WebhooksPage })),\n);\nconst CreateWebhookPage = lazy(() =>\n import(\"./pages/CreateWebhookPage\").then((m) => ({\n default: m.CreateWebhookPage,\n })),\n);\nconst WebhookDetailPage = lazy(() =>\n import(\"./pages/WebhookDetailPage\").then((m) => ({\n default: m.WebhookDetailPage,\n })),\n);\nconst AnalyticsDashboardPage = lazy(() =>\n import(\"./pages/AnalyticsDashboardPage\").then((m) => ({\n default: m.AnalyticsDashboardPage,\n })),\n);\nconst DocumentationPage = lazy(() =>\n import(\"./pages/DocumentationPage\").then((m) => ({\n default: m.DocumentationPage,\n })),\n);\nconst ResourcesPage = lazy(() =>\n import(\"./pages/ResourcesPage\").then((m) => ({ default: m.ResourcesPage })),\n);\nconst SettingsPage = lazy(() =>\n import(\"./pages/SettingsPage\").then((m) => ({ default: m.SettingsPage })),\n);\nconst PublishPage = lazy(() =>\n import(\"./pages/PublishPage\").then((m) => ({ default: m.PublishPage })),\n);\nconst AppLogsPage = lazy(() =>\n import(\"./pages/AppLogsPage\").then((m) => ({ default: m.AppLogsPage })),\n);\nconst DelegationsPage = lazy(() =>\n import(\"./pages/DelegationsPage\").then((m) => ({\n default: m.DelegationsPage,\n })),\n);\nconst ListingPreviewPage = lazy(() =>\n import(\"./pages/ListingPreviewPage\").then((m) => ({\n default: m.ListingPreviewPage,\n })),\n);\nconst StoreSubmissionPage = lazy(() =>\n import(\"./pages/StoreSubmissionPage\").then((m) => ({\n default: m.StoreSubmissionPage,\n })),\n);\nconst PublisherProfilePage = lazy(() =>\n import(\"./pages/PublisherProfilePage\").then((m) => ({\n default: m.PublisherProfilePage,\n })),\n);\nconst SetupPage = lazy(() =>\n import(\"./pages/SetupPage\").then((m) => ({ default: m.SetupPage })),\n);\n\n/**\n * Inner routes component - renders actual page routes\n */\nfunction InnerRoutes() {\n return (\n <>\n <SectionNav />\n <Routes>\n {/* Dashboard */}\n <Route index element={gated(\"dashboard\", <DashboardPage />)} />\n\n {/* Organizations */}\n <Route\n path=\"organizations\"\n element={gated(\"organizations\", <OrganizationsPage />)}\n />\n <Route\n path=\"organizations/new\"\n element={gated(\"organizations.create\", <CreateOrganizationPage />)}\n />\n <Route\n path=\"organizations/:orgId\"\n element={gated(\"organizations.detail\", <OrganizationDetailPage />)}\n />\n <Route\n path=\"organizations/:orgId/members\"\n element={gated(\"organizations.members\", <OrganizationMembersPage />)}\n />\n <Route\n path=\"organizations/:orgId/revenue\"\n element={gated(\"organizations.revenue\", <RevenueRedirectPage />)}\n />\n\n {/* Applications */}\n <Route path=\"apps\" element={gated(\"apps\", <ApplicationsPage />)} />\n <Route\n path=\"apps/new\"\n element={gated(\"apps.create\", <CreateApplicationPage />)}\n />\n <Route\n path=\"apps/:appId\"\n element={gated(\"apps.detail\", <ApplicationDetailPage />)}\n />\n <Route\n path=\"apps/:appId/edit\"\n element={gated(\"apps.edit\", <EditApplicationPage />)}\n />\n <Route\n path=\"apps/:appId/versions\"\n element={gated(\"apps.versions\", <ApplicationVersionsPage />)}\n />\n <Route\n path=\"apps/:appId/publish\"\n element={gated(\"apps.publish\", <PublishPage />)}\n />\n <Route\n path=\"apps/:appId/store-submission\"\n element={gated(\"apps.storeSubmission\", <StoreSubmissionPage />)}\n />\n <Route\n path=\"apps/:appId/listing\"\n element={gated(\"apps.listing\", <ListingPreviewPage />)}\n />\n <Route\n path=\"apps/:appId/logs\"\n element={gated(\"apps.logs\", <AppLogsPage />)}\n />\n\n {/* OAuth Clients — user-scoped via auth-svc (no app nesting) */}\n <Route path=\"oauth\" element={gated(\"oauth\", <OAuthClientsPage />)} />\n <Route\n path=\"oauth/new\"\n element={gated(\"oauth.create\", <CreateOAuthClientPage />)}\n />\n <Route\n path=\"oauth/:clientId\"\n element={gated(\"oauth.detail\", <OAuthClientDetailPage />)}\n />\n\n {/* API Keys — user-scoped via auth-svc (no app nesting) */}\n <Route path=\"api-keys\" element={gated(\"apiKeys\", <ApiKeysPage />)} />\n <Route\n path=\"api-keys/new\"\n element={gated(\"apiKeys.create\", <CreateApiKeyPage />)}\n />\n\n {/* Webhooks (App-specific) */}\n <Route\n path=\"apps/:appId/webhooks\"\n element={gated(\"apps.webhooks\", <WebhooksPage />)}\n />\n <Route\n path=\"apps/:appId/webhooks/new\"\n element={gated(\"apps.webhooks.create\", <CreateWebhookPage />)}\n />\n <Route\n path=\"apps/:appId/webhooks/:webhookId\"\n element={gated(\"apps.webhooks.detail\", <WebhookDetailPage />)}\n />\n\n {/* App Analytics */}\n <Route\n path=\"apps/:appId/analytics\"\n element={gated(\"apps.analytics\", <AnalyticsDashboardPage />)}\n />\n\n {/* Delegations */}\n <Route\n path=\"delegations\"\n element={gated(\"delegations\", <DelegationsPage />)}\n />\n\n {/* Global Webhooks views */}\n <Route\n path=\"webhooks/new\"\n element={gated(\"webhooks.create\", <CreateWebhookPage />)}\n />\n <Route path=\"webhooks\" element={gated(\"webhooks\", <WebhooksPage />)} />\n\n {/* Analytics & Revenue */}\n <Route\n path=\"analytics\"\n element={gated(\"analytics\", <AnalyticsDashboardPage />)}\n />\n <Route\n path=\"revenue\"\n element={gated(\"revenue\", <RevenueRedirectPage />)}\n />\n\n {/* Documentation & Resources */}\n <Route path=\"docs\" element={gated(\"docs\", <DocumentationPage />)} />\n <Route\n path=\"resources\"\n element={gated(\"resources\", <ResourcesPage />)}\n />\n\n {/* Admin surfaces (e.g. /admin/reviews) live in admin-app via\n AdminDevportalRoot — intentionally not mounted in user shells. */}\n\n {/* Publisher */}\n <Route\n path=\"publisher/profile\"\n element={gated(\"publisher.profile\", <PublisherProfilePage />)}\n />\n\n {/* Settings */}\n <Route path=\"settings\" element={gated(\"settings\", <SettingsPage />)} />\n\n {/* First-time setup wizard */}\n <Route path=\"setup\" element={gated(\"setup\", <SetupPage />)} />\n\n {/* Catch-all redirect to dashboard */}\n <Route path=\"*\" element={<CatchAllRedirect />} />\n </Routes>\n </>\n );\n}\n\n/**\n * Developer Portal Routes\n *\n * Defines all the routes for the developer portal microfrontend.\n * Uses lazy loading for all pages except the dashboard for optimal performance.\n *\n * When integrated into a shell (basePath provided), the shell already handles\n * the basePath route (e.g., /devportal/*), so this component should render\n * routes relative to that path - NOT nest them under basePath again.\n *\n * Example:\n * - Shell route: /devportal/*\n * - User navigates to: /devportal/organizations\n * - Inside DevportalRoutes, the path is: /organizations (relative to shell route)\n * - InnerRoutes matches: organizations -> OrganizationsPage\n */\nexport function DevportalRoutes() {\n // When basePath is provided, we're in shell integration mode.\n // The shell already matched the basePath route, so we render routes\n // relative to that - using wildcard to catch all sub-paths.\n // When no basePath (standalone mode), just render InnerRoutes at root.\n return (\n <Suspense fallback={<LoadingState message=\"Loading page...\" />}>\n <Routes>\n {/* Wildcard route to let InnerRoutes handle all paths */}\n <Route path=\"/*\" element={<InnerRoutes />} />\n </Routes>\n </Suspense>\n );\n}\n"],"mapp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EAAM,YAAY,kBAAC,GAAD,EAAgB,CAAA,CAAC;GAAI,CAAA;EAGvE,kBAAC,GAAD;GAAO,MAAK;GAAQ,SAAS,EAAM,SAAS,kBAAC,GAAD,EAAa,CAAA,CAAC;GAAI,CAAA;EAG9D,kBAAC,GAAD;GAAO,MAAK;GAAI,SAAS,kBAAC,GAAD,EAAoB,CAAA;GAAI,CAAA;EAC1C,EAAA,CAAA,CACR,EAAA,CAAA;;AAoBP,SAAgB,IAAkB;AAKhC,QACE,kBAAC,GAAD;EAAU,UAAU,kBAAC,GAAD,EAAc,SAAQ,mBAAoB,CAAA;YAC5D,kBAAC,GAAD,EAAA,UAEE,kBAAC,GAAD;GAAO,MAAK;GAAK,SAAS,kBAAC,GAAD,EAAe,CAAA;GAAI,CAAA,EACtC,CAAA;EACA,CAAA"}
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import "../../generated/global-operations.js";
|
|
2
2
|
import { CombinedGraphQLErrors as e } from "../../node_modules/@apollo/client/errors/CombinedGraphQLErrors.js";
|
|
3
3
|
import { ServerError as t } from "../../node_modules/@apollo/client/errors/ServerError.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { getMainDefinition as n } from "../../node_modules/@apollo/client/utilities/internal/getMainDefinition.js";
|
|
5
|
+
import { GraphQLWsLink as r } from "../../node_modules/@apollo/client/link/subscriptions/index.js";
|
|
6
|
+
import { createClient as i } from "../../node_modules/graphql-ws/dist/client.js";
|
|
7
|
+
import { ApolloClient as a, InMemoryCache as o, createHttpLink as s, from as c, split as l } from "@apollo/client/core";
|
|
8
|
+
import { setContext as u } from "@apollo/client/link/context";
|
|
9
|
+
import { onError as d } from "@apollo/client/link/error";
|
|
10
|
+
import { isAuthNetworkError as f, redirectToLogin as p } from "@burdenoff/fe-libs/shared/utils";
|
|
8
11
|
//#region src/devportal/hooks/useGraphQL.ts
|
|
9
|
-
function
|
|
12
|
+
function m(e = []) {
|
|
10
13
|
return e.some((e) => {
|
|
11
14
|
let t = typeof e.extensions?.code == "string" ? e.extensions.code : "", n = typeof e.extensions?.errorCode == "string" ? e.extensions.errorCode : "", r = (e.message ?? "").toLowerCase();
|
|
12
15
|
return t === "UNAUTHENTICATED" || n === "TOKEN_EXPIRED" || r.includes("token_expired") || r.includes("token expired") || r.includes("session expired") || r.includes("unauthorized") || r.includes("unauthenticated") || r.includes("authentication required") || r.includes("workspace context missing");
|
|
13
16
|
});
|
|
14
17
|
}
|
|
15
|
-
var
|
|
18
|
+
var h = !1, g = h ? "/devportal-graphql" : "http://localhost:4015/graphql", _ = h ? "/auth-graphql" : "http://localhost:4011/graphql", v = new Set([
|
|
16
19
|
"CurrentUserApps",
|
|
17
20
|
"GetAuthApp",
|
|
18
21
|
"AppsActingAsCurrentUser",
|
|
@@ -33,28 +36,38 @@ var f = !1, p = f ? "/devportal-graphql" : "http://localhost:4015/graphql", m =
|
|
|
33
36
|
"RevokeAPIKeyAuth",
|
|
34
37
|
"RotateAPIKeyAuth",
|
|
35
38
|
"AuthenticateAPIKey"
|
|
36
|
-
]),
|
|
39
|
+
]), y = "dev-user-001", b = "user";
|
|
40
|
+
function x(e) {
|
|
41
|
+
return e.replace(/^https/, "wss").replace(/^http/, "ws");
|
|
42
|
+
}
|
|
43
|
+
var S = s({ uri: g }), C = l(({ operationName: e }) => e ? v.has(e) : !1, s({ uri: _ }), S), w = u((e, { headers: t }) => {
|
|
37
44
|
let n = typeof window < "u" ? localStorage.getItem("auth_token") : null, r = { ...t };
|
|
38
|
-
if (n && (r.authorization = `Bearer ${n}`),
|
|
39
|
-
let e = typeof window < "u" && localStorage.getItem("dev_actor_id") ||
|
|
45
|
+
if (n && (r.authorization = `Bearer ${n}`), h) {
|
|
46
|
+
let e = typeof window < "u" && localStorage.getItem("dev_actor_id") || y, t = typeof window < "u" && localStorage.getItem("dev_actor_type") || b;
|
|
40
47
|
r["x-actor-id"] = e, r["x-actor-type"] = t;
|
|
41
48
|
}
|
|
42
49
|
return { headers: r };
|
|
43
|
-
}),
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
50
|
+
}), T = d(({ error: e }) => {
|
|
51
|
+
if (e) {
|
|
52
|
+
if (m("errors" in e && Array.isArray(e.errors) ? e.errors : [])) {
|
|
53
|
+
p();
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
e instanceof Error && f(e) && p();
|
|
57
|
+
}
|
|
58
|
+
}), E = new a({
|
|
59
|
+
link: l(({ query: e }) => {
|
|
60
|
+
let t = n(e);
|
|
61
|
+
return t.kind === "OperationDefinition" && t.operation === "subscription";
|
|
62
|
+
}, new r(i({
|
|
63
|
+
url: x(g),
|
|
64
|
+
connectionParams: () => ({ authorization: "" })
|
|
65
|
+
})), c([
|
|
66
|
+
T,
|
|
67
|
+
w,
|
|
68
|
+
C
|
|
69
|
+
])),
|
|
70
|
+
cache: new o({ typePolicies: {
|
|
58
71
|
Query: { fields: {
|
|
59
72
|
developerOrganizations: {
|
|
60
73
|
keyArgs: [
|
|
@@ -178,7 +191,7 @@ var f = !1, p = f ? "/devportal-graphql" : "http://localhost:4015/graphql", m =
|
|
|
178
191
|
query: { fetchPolicy: "cache-first" }
|
|
179
192
|
}
|
|
180
193
|
});
|
|
181
|
-
function
|
|
194
|
+
function D(n) {
|
|
182
195
|
return n instanceof e ? n.errors.map((e) => ({
|
|
183
196
|
message: e.message,
|
|
184
197
|
code: e.extensions?.code,
|
|
@@ -195,22 +208,22 @@ function S(n) {
|
|
|
195
208
|
code: "UNKNOWN_ERROR"
|
|
196
209
|
}];
|
|
197
210
|
}
|
|
198
|
-
function
|
|
199
|
-
return
|
|
211
|
+
function O(e) {
|
|
212
|
+
return D(e).map((e) => e.message).join(", ");
|
|
200
213
|
}
|
|
201
|
-
function
|
|
202
|
-
return
|
|
214
|
+
function k(e) {
|
|
215
|
+
return D(e).some((e) => e.code === "UNAUTHENTICATED" || e.code === "FORBIDDEN");
|
|
203
216
|
}
|
|
204
|
-
function
|
|
205
|
-
return
|
|
217
|
+
function A(e) {
|
|
218
|
+
return D(e).some((e) => e.code === "BAD_USER_INPUT" || e.code === "VALIDATION_ERROR");
|
|
206
219
|
}
|
|
207
|
-
async function
|
|
208
|
-
await
|
|
220
|
+
async function j() {
|
|
221
|
+
await E.clearStore();
|
|
209
222
|
}
|
|
210
|
-
async function
|
|
211
|
-
await
|
|
223
|
+
async function M() {
|
|
224
|
+
await E.resetStore();
|
|
212
225
|
}
|
|
213
226
|
//#endregion
|
|
214
|
-
export {
|
|
227
|
+
export { E as apolloClient, j as clearApolloCache, O as getErrorMessage, k as isAuthError, A as isValidationError, D as parseGraphQLError, M as resetApolloStore };
|
|
215
228
|
|
|
216
229
|
//# sourceMappingURL=useGraphQL.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGraphQL.js","names":[],"sources":["../../../src/devportal/hooks/useGraphQL.ts"],"sourcesContent":["/**\n * Apollo Client hooks and utilities for DevPortal\n *\n * This file provides the GraphQL client setup and custom hooks for the Developer Portal.\n * It wraps the generated Apollo hooks with additional functionality like error handling,\n * loading states, and authentication context.\n */\n\nimport {\n ApolloClient,\n InMemoryCache,\n createHttpLink,\n from,\n split,\n} from \"@apollo/client/core\";\nimport { CombinedGraphQLErrors, ServerError } from \"@apollo/client/errors\";\nimport { setContext } from \"@apollo/client/link/context\";\nimport { onError } from \"@apollo/client/link/error\";\nimport {\n isAuthNetworkError,\n redirectToLogin,\n} from \"@burdenoff/fe-libs/shared/utils\";\n\nfunction hasSessionAuthErrors(\n errors: ReadonlyArray<{\n message?: string;\n extensions?: Record<string, unknown>;\n }> = [],\n): boolean {\n return errors.some((error) => {\n const code =\n typeof error.extensions?.code === \"string\" ? error.extensions.code : \"\";\n const errorCode =\n typeof error.extensions?.errorCode === \"string\"\n ? error.extensions.errorCode\n : \"\";\n const message = (error.message ?? \"\").toLowerCase();\n\n return (\n code === \"UNAUTHENTICATED\" ||\n errorCode === \"TOKEN_EXPIRED\" ||\n message.includes(\"token_expired\") ||\n message.includes(\"token expired\") ||\n message.includes(\"session expired\") ||\n message.includes(\"unauthorized\") ||\n message.includes(\"unauthenticated\") ||\n message.includes(\"authentication required\") ||\n message.includes(\"workspace context missing\")\n );\n });\n}\n\n// Re-export all generated hooks for direct use\nexport * from \"../../generated/global-operations\";\n\n// Vite environment variable declaration\ndeclare global {\n interface ImportMeta {\n readonly env: {\n readonly VITE_GRAPHQL_ENDPOINT?: string;\n readonly VITE_AUTH_GRAPHQL_ENDPOINT?: string;\n readonly VITE_DEV_ACTOR_ID?: string;\n readonly VITE_DEV_ACTOR_TYPE?: string;\n readonly DEV?: boolean;\n [key: string]: string | boolean | undefined;\n };\n }\n}\n\n// Development mode check\nconst isDevelopment =\n typeof import.meta !== \"undefined\" && import.meta.env?.DEV === true;\n\n// Default GraphQL endpoints - can be overridden via environment.\n// In standalone dev mode we route through same-origin Vite proxies to avoid CORS.\nconst DEFAULT_GRAPHQL_ENDPOINT =\n (typeof import.meta !== \"undefined\" &&\n import.meta.env?.VITE_GRAPHQL_ENDPOINT) ||\n (isDevelopment ? \"/devportal-graphql\" : \"http://localhost:4015/graphql\");\n\nconst DEFAULT_AUTH_GRAPHQL_ENDPOINT =\n (typeof import.meta !== \"undefined\" &&\n import.meta.env?.VITE_AUTH_GRAPHQL_ENDPOINT) ||\n (isDevelopment ? \"/auth-graphql\" : \"http://localhost:4011/graphql\");\n\nconst AUTH_OPERATION_NAMES = new Set([\n \"CurrentUserApps\",\n \"GetAuthApp\",\n \"AppsActingAsCurrentUser\",\n \"CreateAuthApp\",\n \"UpdateAuthApp\",\n \"DeactivateApp\",\n \"RotateAppSecret\",\n \"AuthenticateApp\",\n \"GenerateAppToken\",\n \"GenerateAppAsUserToken\",\n \"ExchangeToken\",\n \"CurrentUserDelegations\",\n \"CurrentUserGrantedDelegations\",\n \"GrantDelegation\",\n \"RevokeDelegation\",\n \"MyApiKeys\",\n \"GenerateAPIKey\",\n \"RevokeAPIKeyAuth\",\n \"RotateAPIKeyAuth\",\n \"AuthenticateAPIKey\",\n]);\n\n// Development actor ID - simulates gateway-injected headers\n// In production, the gateway adds these after JWT verification\nconst DEV_ACTOR_ID =\n (typeof import.meta !== \"undefined\" && import.meta.env?.VITE_DEV_ACTOR_ID) ||\n \"dev-user-001\";\n\nconst DEV_ACTOR_TYPE =\n (typeof import.meta !== \"undefined\" &&\n import.meta.env?.VITE_DEV_ACTOR_TYPE) ||\n \"user\";\n\n// Create the HTTP links\nconst devportalHttpLink = createHttpLink({\n uri: DEFAULT_GRAPHQL_ENDPOINT,\n});\n\nconst authHttpLink = createHttpLink({\n uri: DEFAULT_AUTH_GRAPHQL_ENDPOINT,\n});\n\nconst httpLink = split(\n ({ operationName }) => {\n if (!operationName) {\n return false;\n }\n\n return AUTH_OPERATION_NAMES.has(operationName);\n },\n authHttpLink,\n devportalHttpLink,\n);\n\n// Auth link to add authentication headers\nconst authLink = setContext((_, { headers }) => {\n // Get auth token from storage or context\n const token =\n typeof window !== \"undefined\" ? localStorage.getItem(\"auth_token\") : null;\n\n // Build headers\n const authHeaders: Record<string, string> = {\n ...headers,\n };\n\n if (token) {\n authHeaders[\"authorization\"] = `Bearer ${token}`;\n }\n\n // In development mode, add actor headers to simulate gateway behavior\n // In production, the API Gateway adds these headers after JWT verification\n if (isDevelopment) {\n // Use actor ID from localStorage (set by dev tools) or fall back to env/default\n const actorId =\n (typeof window !== \"undefined\" && localStorage.getItem(\"dev_actor_id\")) ||\n DEV_ACTOR_ID;\n const actorType =\n (typeof window !== \"undefined\" &&\n localStorage.getItem(\"dev_actor_type\")) ||\n DEV_ACTOR_TYPE;\n\n authHeaders[\"x-actor-id\"] = actorId;\n authHeaders[\"x-actor-type\"] = actorType;\n }\n\n return { headers: authHeaders };\n});\n\nconst errorLink = onError(({ error }) => {\n if (!error) return;\n\n const graphQLErrors =\n \"errors\" in error && Array.isArray(error.errors) ? error.errors : [];\n\n if (hasSessionAuthErrors(graphQLErrors)) {\n redirectToLogin();\n return;\n }\n\n if (error instanceof Error && isAuthNetworkError(error)) {\n redirectToLogin();\n }\n});\n\n// Create the Apollo Client instance\n// NOTE: defaultOptions.errorPolicy is intentionally omitted. Apollo Client v4\n// guards it behind a DeclareDefaultOptions module augmentation that does not\n// resolve reliably in CI's frozen install, so it is left at the v4 default\n// (\"none\"). Per-operation errorPolicy: \"all\" can be set on individual hooks\n// where partial-data-on-error handling is required.\nexport const apolloClient = new ApolloClient({\n link: from([errorLink, authLink, httpLink]),\n cache: new InMemoryCache({\n typePolicies: {\n Query: {\n fields: {\n // Pagination policies for connection types\n developerOrganizations: {\n keyArgs: [\"tier\", \"isVerified\", \"isCertified\", \"partnerTier\"],\n merge(existing, incoming, { args }) {\n if (!args?.offset || args.offset === 0) {\n return incoming;\n }\n return {\n ...incoming,\n edges: [...(existing?.edges || []), ...incoming.edges],\n };\n },\n },\n applications: {\n keyArgs: [\"status\", \"visibility\", \"developerId\"],\n merge(existing, incoming, { args }) {\n if (!args?.offset || args.offset === 0) {\n return incoming;\n }\n return {\n ...incoming,\n edges: [...(existing?.edges || []), ...incoming.edges],\n };\n },\n },\n developerOrgSales: {\n keyArgs: [\n \"organizationId\",\n \"applicationId\",\n \"status\",\n \"pricingModel\",\n \"isPaidOut\",\n ],\n merge(existing, incoming, { args }) {\n if (!args?.offset || args.offset === 0) {\n return incoming;\n }\n return {\n ...incoming,\n edges: [...(existing?.edges || []), ...incoming.edges],\n };\n },\n },\n developerOrgPayouts: {\n keyArgs: [\"organizationId\", \"status\"],\n merge(existing, incoming, { args }) {\n if (!args?.offset || args.offset === 0) {\n return incoming;\n }\n return {\n ...incoming,\n edges: [...(existing?.edges || []), ...incoming.edges],\n };\n },\n },\n developerOrgMembers: {\n keyArgs: [\"organizationId\", \"role\"],\n merge(existing, incoming, { args }) {\n if (!args?.offset || args.offset === 0) return incoming;\n return {\n ...incoming,\n edges: [...(existing?.edges || []), ...incoming.edges],\n };\n },\n },\n developerOrgInvitations: {\n keyArgs: [\"organizationId\", \"status\"],\n merge(existing, incoming, { args }) {\n if (!args?.offset || args.offset === 0) return incoming;\n return {\n ...incoming,\n edges: [...(existing?.edges || []), ...incoming.edges],\n };\n },\n },\n webhooks: {\n keyArgs: [\"applicationId\", \"status\"],\n merge(existing, incoming, { args }) {\n if (!args?.offset || args.offset === 0) return incoming;\n return {\n ...incoming,\n edges: [...(existing?.edges || []), ...incoming.edges],\n };\n },\n },\n webhookDeliveries: {\n keyArgs: [\"webhookId\", \"status\"],\n merge(existing, incoming, { args }) {\n if (!args?.offset || args.offset === 0) return incoming;\n return {\n ...incoming,\n edges: [...(existing?.edges || []), ...incoming.edges],\n };\n },\n },\n auditLogs: {\n keyArgs: [\"resource\", \"resourceId\", \"actorId\"],\n merge(existing, incoming, { args }) {\n if (!args?.offset || args.offset === 0) return incoming;\n return {\n ...incoming,\n edges: [...(existing?.edges || []), ...incoming.edges],\n };\n },\n },\n applicationVersions: {\n // TODO(phase1-backend): Switch to ApplicationVersionConnection cursor pagination\n // once backend ships connection type. See stability tracker.\n keyArgs: [\"applicationId\"],\n merge(existing, incoming, { args }) {\n if (!args?.offset || args.offset === 0) return incoming;\n if (Array.isArray(incoming) && Array.isArray(existing)) {\n return [...existing, ...incoming];\n }\n return incoming;\n },\n },\n },\n },\n WebhookDelivery: {\n keyFields: [\"id\"],\n },\n ApplicationVersion: {\n keyFields: [\"id\"],\n },\n DeveloperOrganization: {\n keyFields: [\"id\"],\n },\n Application: {\n keyFields: [\"id\"],\n },\n DeveloperOrgMember: {\n keyFields: [\"id\"],\n },\n DeveloperOrgInvitation: {\n keyFields: [\"id\"],\n },\n Webhook: {\n keyFields: [\"id\"],\n },\n ApiKey: {\n keyFields: [\"id\"],\n },\n OAuthClient: {\n keyFields: [\"id\"],\n },\n },\n }),\n defaultOptions: {\n watchQuery: {\n fetchPolicy: \"cache-and-network\",\n },\n query: {\n fetchPolicy: \"cache-first\",\n },\n },\n});\n\n/**\n * Error handling utilities\n */\nexport interface GraphQLErrorInfo {\n message: string;\n code?: string;\n path?: readonly (string | number)[];\n}\n\n// Type for Apollo errors (can be CombinedGraphQLErrors, ServerError, or Error)\nexport type ApolloErrorLike = Error & {\n graphQLErrors?: readonly {\n message: string;\n extensions?: { code?: string };\n path?: readonly (string | number)[];\n }[];\n networkError?: Error | null;\n};\n\nexport function parseGraphQLError(error: ApolloErrorLike): GraphQLErrorInfo[] {\n if (error instanceof CombinedGraphQLErrors) {\n return error.errors.map((err) => ({\n message: err.message,\n code: err.extensions?.code as string | undefined,\n path: err.path,\n }));\n }\n\n if (error.graphQLErrors && error.graphQLErrors.length > 0) {\n return error.graphQLErrors.map((err) => ({\n message: err.message,\n code: err.extensions?.code as string | undefined,\n path: err.path,\n }));\n }\n\n if (error instanceof ServerError || error.networkError) {\n return [\n {\n message: \"Network error. Please check your connection and try again.\",\n code: \"NETWORK_ERROR\",\n },\n ];\n }\n\n return [\n {\n message: error.message || \"An unexpected error occurred\",\n code: \"UNKNOWN_ERROR\",\n },\n ];\n}\n\n/**\n * Get a user-friendly error message from an Apollo error\n */\nexport function getErrorMessage(error: ApolloErrorLike): string {\n const errors = parseGraphQLError(error);\n return errors.map((e) => e.message).join(\", \");\n}\n\n/**\n * Check if an error is an authentication error\n */\nexport function isAuthError(error: ApolloErrorLike): boolean {\n const errors = parseGraphQLError(error);\n return errors.some(\n (e) => e.code === \"UNAUTHENTICATED\" || e.code === \"FORBIDDEN\",\n );\n}\n\n/**\n * Check if an error is a validation error\n */\nexport function isValidationError(error: ApolloErrorLike): boolean {\n const errors = parseGraphQLError(error);\n return errors.some(\n (e) => e.code === \"BAD_USER_INPUT\" || e.code === \"VALIDATION_ERROR\",\n );\n}\n\n/**\n * Clear Apollo cache (useful for logout)\n */\nexport async function clearApolloCache(): Promise<void> {\n await apolloClient.clearStore();\n}\n\n/**\n * Reset Apollo store and refetch queries\n */\nexport async function resetApolloStore(): Promise<void> {\n await apolloClient.resetStore();\n}\n"],"mappings":";;;;;;;;AAuBA,SAAS,EACP,IAGK,EAAE,EACE;AACT,QAAO,EAAO,MAAM,MAAU;EAC5B,IAAM,IACJ,OAAO,EAAM,YAAY,QAAS,WAAW,EAAM,WAAW,OAAO,IACjE,IACJ,OAAO,EAAM,YAAY,aAAc,WACnC,EAAM,WAAW,YACjB,IACA,KAAW,EAAM,WAAW,IAAI,aAAa;AAEnD,SACE,MAAS,qBACT,MAAc,mBACd,EAAQ,SAAS,gBAAgB,IACjC,EAAQ,SAAS,gBAAgB,IACjC,EAAQ,SAAS,kBAAkB,IACnC,EAAQ,SAAS,eAAe,IAChC,EAAQ,SAAS,kBAAkB,IACnC,EAAQ,SAAS,0BAA0B,IAC3C,EAAQ,SAAS,4BAA4B;GAE/C;;AAqBJ,IAAM,IACkC,IAIlC,IAGH,IAAgB,uBAAuB,iCAEpC,IAGH,IAAgB,kBAAkB,iCAE/B,IAAuB,IAAI,IAAI;CACnC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC,EAII,IAEJ,gBAEI,IAGJ,QAGI,IAAoB,EAAe,EACvC,KAAK,GACN,CAAC,EAMI,IAAW,GACd,EAAE,uBACI,IAIE,EAAqB,IAAI,EAAc,GAHrC,IAPQ,EAAe,EAClC,KAAK,GACN,CAAC,EAWA,EACD,EAGK,IAAW,GAAY,GAAG,EAAE,iBAAc;CAE9C,IAAM,IACJ,OAAO,SAAW,MAAc,aAAa,QAAQ,aAAa,GAAG,MAGjE,IAAsC,EAC1C,GAAG,GACJ;AAQD,KANI,MACF,EAAY,gBAAmB,UAAU,MAKvC,GAAe;EAEjB,IAAM,IACH,OAAO,SAAW,OAAe,aAAa,QAAQ,eAAe,IACtE,GACI,IACH,OA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D,QADe,EAAkB,EAAM,CACzB,KAAK,MAAM,EAAE,QAAQ,CAAC,KAAK,KAAK;;AAMhD,SAAgB,EAAY,GAAiC;AAE3D,QADe,EAAkB,EAAM,CACzB,MACX,MAAM,EAAE,SAAS,qBAAqB,EAAE,SAAS,YACnD;;AAMH,SAAgB,EAAkB,GAAiC;AAEjE,QADe,EAAkB,EAAM,CACzB,MACX,MAAM,EAAE,SAAS,oBAAoB,EAAE,SAAS,mBAClD;;AAMH,eAAsB,IAAkC;AACtD,OAAM,EAAa,YAAY;;AAMjC,eAAsB,IAAkC;AACtD,OAAM,EAAa,YAAY"}
|
|
1
|
+
{"version":3,"file":"useGraphQL.js","names":[],"sources":["../../../src/devportal/hooks/useGraphQL.ts"],"sourcesContent":["/**\n * Apollo Client hooks and utilities for DevPortal\n *\n * This file provides the GraphQL client setup and custom hooks for the Developer Portal.\n * It wraps the generated Apollo hooks with additional functionality like error handling,\n * loading states, and authentication context.\n */\n\nimport {\n ApolloClient,\n InMemoryCache,\n createHttpLink,\n from,\n split,\n} from \"@apollo/client/core\";\nimport { CombinedGraphQLErrors, ServerError } from \"@apollo/client/errors\";\nimport { setContext } from \"@apollo/client/link/context\";\nimport { onError } from \"@apollo/client/link/error\";\nimport { GraphQLWsLink } from \"@apollo/client/link/subscriptions\";\nimport { getMainDefinition } from \"@apollo/client/utilities\";\nimport { createClient as createWsClient } from \"graphql-ws\";\nimport {\n isAuthNetworkError,\n redirectToLogin,\n} from \"@burdenoff/fe-libs/shared/utils\";\n\nfunction hasSessionAuthErrors(\n errors: ReadonlyArray<{\n message?: string;\n extensions?: Record<string, unknown>;\n }> = [],\n): boolean {\n return errors.some((error) => {\n const code =\n typeof error.extensions?.code === \"string\" ? error.extensions.code : \"\";\n const errorCode =\n typeof error.extensions?.errorCode === \"string\"\n ? error.extensions.errorCode\n : \"\";\n const message = (error.message ?? \"\").toLowerCase();\n\n return (\n code === \"UNAUTHENTICATED\" ||\n errorCode === \"TOKEN_EXPIRED\" ||\n message.includes(\"token_expired\") ||\n message.includes(\"token expired\") ||\n message.includes(\"session expired\") ||\n message.includes(\"unauthorized\") ||\n message.includes(\"unauthenticated\") ||\n message.includes(\"authentication required\") ||\n message.includes(\"workspace context missing\")\n );\n });\n}\n\n// Re-export all generated hooks for direct use\nexport * from \"../../generated/global-operations\";\n\n// Vite environment variable declaration\ndeclare global {\n interface ImportMeta {\n readonly env: {\n readonly VITE_GRAPHQL_ENDPOINT?: string;\n readonly VITE_AUTH_GRAPHQL_ENDPOINT?: string;\n readonly VITE_DEV_ACTOR_ID?: string;\n readonly VITE_DEV_ACTOR_TYPE?: string;\n readonly DEV?: boolean;\n [key: string]: string | boolean | undefined;\n };\n }\n}\n\n// Development mode check\nconst isDevelopment =\n typeof import.meta !== \"undefined\" && import.meta.env?.DEV === true;\n\n// Default GraphQL endpoints - can be overridden via environment.\n// In standalone dev mode we route through same-origin Vite proxies to avoid CORS.\nconst DEFAULT_GRAPHQL_ENDPOINT =\n (typeof import.meta !== \"undefined\" &&\n import.meta.env?.VITE_GRAPHQL_ENDPOINT) ||\n (isDevelopment ? \"/devportal-graphql\" : \"http://localhost:4015/graphql\");\n\nconst DEFAULT_AUTH_GRAPHQL_ENDPOINT =\n (typeof import.meta !== \"undefined\" &&\n import.meta.env?.VITE_AUTH_GRAPHQL_ENDPOINT) ||\n (isDevelopment ? \"/auth-graphql\" : \"http://localhost:4011/graphql\");\n\nconst AUTH_OPERATION_NAMES = new Set([\n \"CurrentUserApps\",\n \"GetAuthApp\",\n \"AppsActingAsCurrentUser\",\n \"CreateAuthApp\",\n \"UpdateAuthApp\",\n \"DeactivateApp\",\n \"RotateAppSecret\",\n \"AuthenticateApp\",\n \"GenerateAppToken\",\n \"GenerateAppAsUserToken\",\n \"ExchangeToken\",\n \"CurrentUserDelegations\",\n \"CurrentUserGrantedDelegations\",\n \"GrantDelegation\",\n \"RevokeDelegation\",\n \"MyApiKeys\",\n \"GenerateAPIKey\",\n \"RevokeAPIKeyAuth\",\n \"RotateAPIKeyAuth\",\n \"AuthenticateAPIKey\",\n]);\n\n// Development actor ID - simulates gateway-injected headers\n// In production, the gateway adds these after JWT verification\nconst DEV_ACTOR_ID =\n (typeof import.meta !== \"undefined\" && import.meta.env?.VITE_DEV_ACTOR_ID) ||\n \"dev-user-001\";\n\nconst DEV_ACTOR_TYPE =\n (typeof import.meta !== \"undefined\" &&\n import.meta.env?.VITE_DEV_ACTOR_TYPE) ||\n \"user\";\n\nfunction toWsUrl(httpUrl: string): string {\n return httpUrl.replace(/^https/, \"wss\").replace(/^http/, \"ws\");\n}\n\n// Create the HTTP links\nconst devportalHttpLink = createHttpLink({\n uri: DEFAULT_GRAPHQL_ENDPOINT,\n});\n\nconst authHttpLink = createHttpLink({\n uri: DEFAULT_AUTH_GRAPHQL_ENDPOINT,\n});\n\nconst httpLink = split(\n ({ operationName }) => {\n if (!operationName) {\n return false;\n }\n\n return AUTH_OPERATION_NAMES.has(operationName);\n },\n authHttpLink,\n devportalHttpLink,\n);\n\n// Auth link to add authentication headers\nconst authLink = setContext((_, { headers }) => {\n // Get auth token from storage or context\n const token =\n typeof window !== \"undefined\" ? localStorage.getItem(\"auth_token\") : null;\n\n // Build headers\n const authHeaders: Record<string, string> = {\n ...headers,\n };\n\n if (token) {\n authHeaders[\"authorization\"] = `Bearer ${token}`;\n }\n\n // In development mode, add actor headers to simulate gateway behavior\n // In production, the API Gateway adds these headers after JWT verification\n if (isDevelopment) {\n // Use actor ID from localStorage (set by dev tools) or fall back to env/default\n const actorId =\n (typeof window !== \"undefined\" && localStorage.getItem(\"dev_actor_id\")) ||\n DEV_ACTOR_ID;\n const actorType =\n (typeof window !== \"undefined\" &&\n localStorage.getItem(\"dev_actor_type\")) ||\n DEV_ACTOR_TYPE;\n\n authHeaders[\"x-actor-id\"] = actorId;\n authHeaders[\"x-actor-type\"] = actorType;\n }\n\n return { headers: authHeaders };\n});\n\nconst errorLink = onError(({ error }) => {\n if (!error) return;\n\n const graphQLErrors =\n \"errors\" in error && Array.isArray(error.errors) ? error.errors : [];\n\n if (hasSessionAuthErrors(graphQLErrors)) {\n redirectToLogin();\n return;\n }\n\n if (error instanceof Error && isAuthNetworkError(error)) {\n redirectToLogin();\n }\n});\n\nconst wsLink = new GraphQLWsLink(\n createWsClient({\n url: toWsUrl(DEFAULT_GRAPHQL_ENDPOINT),\n connectionParams: () => {\n // Grab the auth token from the auth link's context builder for WS handshake\n return { authorization: \"\" }; // token injected server-side from cookie/session\n },\n }),\n);\n\nconst splitLink = split(\n ({ query }) => {\n const definition = getMainDefinition(query);\n return (\n definition.kind === \"OperationDefinition\" &&\n definition.operation === \"subscription\"\n );\n },\n wsLink,\n from([errorLink, authLink, httpLink]),\n);\n\n// Create the Apollo Client instance\n// NOTE: defaultOptions.errorPolicy is intentionally omitted. Apollo Client v4\n// guards it behind a DeclareDefaultOptions module augmentation that does not\n// resolve reliably in CI's frozen install, so it is left at the v4 default\n// (\"none\"). Per-operation errorPolicy: \"all\" can be set on individual hooks\n// where partial-data-on-error handling is required.\nexport const apolloClient = new ApolloClient({\n link: splitLink,\n cache: new InMemoryCache({\n typePolicies: {\n Query: {\n fields: {\n // Pagination policies for connection types\n developerOrganizations: {\n keyArgs: [\"tier\", \"isVerified\", \"isCertified\", \"partnerTier\"],\n merge(existing, incoming, { args }) {\n if (!args?.offset || args.offset === 0) {\n return incoming;\n }\n return {\n ...incoming,\n edges: [...(existing?.edges || []), ...incoming.edges],\n };\n },\n },\n applications: {\n keyArgs: [\"status\", \"visibility\", \"developerId\"],\n merge(existing, incoming, { args }) {\n if (!args?.offset || args.offset === 0) {\n return incoming;\n }\n return {\n ...incoming,\n edges: [...(existing?.edges || []), ...incoming.edges],\n };\n },\n },\n developerOrgSales: {\n keyArgs: [\n \"organizationId\",\n \"applicationId\",\n \"status\",\n \"pricingModel\",\n \"isPaidOut\",\n ],\n merge(existing, incoming, { args }) {\n if (!args?.offset || args.offset === 0) {\n return incoming;\n }\n return {\n ...incoming,\n edges: [...(existing?.edges || []), ...incoming.edges],\n };\n },\n },\n developerOrgPayouts: {\n keyArgs: [\"organizationId\", \"status\"],\n merge(existing, incoming, { args }) {\n if (!args?.offset || args.offset === 0) {\n return incoming;\n }\n return {\n ...incoming,\n edges: [...(existing?.edges || []), ...incoming.edges],\n };\n },\n },\n developerOrgMembers: {\n keyArgs: [\"organizationId\", \"role\"],\n merge(existing, incoming, { args }) {\n if (!args?.offset || args.offset === 0) return incoming;\n return {\n ...incoming,\n edges: [...(existing?.edges || []), ...incoming.edges],\n };\n },\n },\n developerOrgInvitations: {\n keyArgs: [\"organizationId\", \"status\"],\n merge(existing, incoming, { args }) {\n if (!args?.offset || args.offset === 0) return incoming;\n return {\n ...incoming,\n edges: [...(existing?.edges || []), ...incoming.edges],\n };\n },\n },\n webhooks: {\n keyArgs: [\"applicationId\", \"status\"],\n merge(existing, incoming, { args }) {\n if (!args?.offset || args.offset === 0) return incoming;\n return {\n ...incoming,\n edges: [...(existing?.edges || []), ...incoming.edges],\n };\n },\n },\n webhookDeliveries: {\n keyArgs: [\"webhookId\", \"status\"],\n merge(existing, incoming, { args }) {\n if (!args?.offset || args.offset === 0) return incoming;\n return {\n ...incoming,\n edges: [...(existing?.edges || []), ...incoming.edges],\n };\n },\n },\n auditLogs: {\n keyArgs: [\"resource\", \"resourceId\", \"actorId\"],\n merge(existing, incoming, { args }) {\n if (!args?.offset || args.offset === 0) return incoming;\n return {\n ...incoming,\n edges: [...(existing?.edges || []), ...incoming.edges],\n };\n },\n },\n applicationVersions: {\n // TODO(phase1-backend): Switch to ApplicationVersionConnection cursor pagination\n // once backend ships connection type. See stability tracker.\n keyArgs: [\"applicationId\"],\n merge(existing, incoming, { args }) {\n if (!args?.offset || args.offset === 0) return incoming;\n if (Array.isArray(incoming) && Array.isArray(existing)) {\n return [...existing, ...incoming];\n }\n return incoming;\n },\n },\n },\n },\n WebhookDelivery: {\n keyFields: [\"id\"],\n },\n ApplicationVersion: {\n keyFields: [\"id\"],\n },\n DeveloperOrganization: {\n keyFields: [\"id\"],\n },\n Application: {\n keyFields: [\"id\"],\n },\n DeveloperOrgMember: {\n keyFields: [\"id\"],\n },\n DeveloperOrgInvitation: {\n keyFields: [\"id\"],\n },\n Webhook: {\n keyFields: [\"id\"],\n },\n ApiKey: {\n keyFields: [\"id\"],\n },\n OAuthClient: {\n keyFields: [\"id\"],\n },\n },\n }),\n defaultOptions: {\n watchQuery: {\n fetchPolicy: \"cache-and-network\",\n },\n query: {\n fetchPolicy: \"cache-first\",\n },\n },\n});\n\n/**\n * Error handling utilities\n */\nexport interface GraphQLErrorInfo {\n message: string;\n code?: string;\n path?: readonly (string | number)[];\n}\n\n// Type for Apollo errors (can be CombinedGraphQLErrors, ServerError, or Error)\nexport type ApolloErrorLike = Error & {\n graphQLErrors?: readonly {\n message: string;\n extensions?: { code?: string };\n path?: readonly (string | number)[];\n }[];\n networkError?: Error | null;\n};\n\nexport function parseGraphQLError(error: ApolloErrorLike): GraphQLErrorInfo[] {\n if (error instanceof CombinedGraphQLErrors) {\n return error.errors.map((err) => ({\n message: err.message,\n code: err.extensions?.code as string | undefined,\n path: err.path,\n }));\n }\n\n if (error.graphQLErrors && error.graphQLErrors.length > 0) {\n return error.graphQLErrors.map((err) => ({\n message: err.message,\n code: err.extensions?.code as string | undefined,\n path: err.path,\n }));\n }\n\n if (error instanceof ServerError || error.networkError) {\n return [\n {\n message: \"Network error. Please check your connection and try again.\",\n code: \"NETWORK_ERROR\",\n },\n ];\n }\n\n return [\n {\n message: error.message || \"An unexpected error occurred\",\n code: \"UNKNOWN_ERROR\",\n },\n ];\n}\n\n/**\n * Get a user-friendly error message from an Apollo error\n */\nexport function getErrorMessage(error: ApolloErrorLike): string {\n const errors = parseGraphQLError(error);\n return errors.map((e) => e.message).join(\", \");\n}\n\n/**\n * Check if an error is an authentication error\n */\nexport function isAuthError(error: ApolloErrorLike): boolean {\n const errors = parseGraphQLError(error);\n return errors.some(\n (e) => e.code === \"UNAUTHENTICATED\" || e.code === \"FORBIDDEN\",\n );\n}\n\n/**\n * Check if an error is a validation error\n */\nexport function isValidationError(error: ApolloErrorLike): boolean {\n const errors = parseGraphQLError(error);\n return errors.some(\n (e) => e.code === \"BAD_USER_INPUT\" || e.code === \"VALIDATION_ERROR\",\n );\n}\n\n/**\n * Clear Apollo cache (useful for logout)\n */\nexport async function clearApolloCache(): Promise<void> {\n await apolloClient.clearStore();\n}\n\n/**\n * Reset Apollo store and refetch queries\n */\nexport async function resetApolloStore(): Promise<void> {\n await apolloClient.resetStore();\n}\n"],"mappings":";;;;;;;;;;;AA0BA,SAAS,EACP,IAGK,EAAE,EACE;AACT,QAAO,EAAO,MAAM,MAAU;EAC5B,IAAM,IACJ,OAAO,EAAM,YAAY,QAAS,WAAW,EAAM,WAAW,OAAO,IACjE,IACJ,OAAO,EAAM,YAAY,aAAc,WACnC,EAAM,WAAW,YACjB,IACA,KAAW,EAAM,WAAW,IAAI,aAAa;AAEnD,SACE,MAAS,qBACT,MAAc,mBACd,EAAQ,SAAS,gBAAgB,IACjC,EAAQ,SAAS,gBAAgB,IACjC,EAAQ,SAAS,kBAAkB,IACnC,EAAQ,SAAS,eAAe,IAChC,EAAQ,SAAS,kBAAkB,IACnC,EAAQ,SAAS,0BAA0B,IAC3C,EAAQ,SAAS,4BAA4B;GAE/C;;AAqBJ,IAAM,IACkC,IAIlC,IAGH,IAAgB,uBAAuB,iCAEpC,IAGH,IAAgB,kBAAkB,iCAE/B,IAAuB,IAAI,IAAI;CACnC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC,EAII,IAEJ,gBAEI,IAGJ;AAEF,SAAS,EAAQ,GAAyB;AACxC,QAAO,EAAQ,QAAQ,UAAU,MAAM,CAAC,QAAQ,SAAS,KAAK;;AAIhE,IAAM,IAAoB,EAAe,EACvC,KAAK,GACN,CAAC,EAMI,IAAW,GACd,EAAE,uBACI,IAIE,EAAq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