import type { ApiItem, ApiStore } from '@redocly/api-docs'; /** The api-docs payload the portal publishes as shared page data on API reference pages. */ export type ApiDocsPageData = { items: ApiItem[]; store: ApiStore; baseSlug: string; }; export type PageVersion = { label?: string; version?: string; active?: boolean; }; /** Everything the tool builders need from the running page. */ export type ToolContext = { /** Current route pathname, path prefix included. */ pathname: string; pageTitle?: string; locale: string; product?: string; versions: PageVersion[]; /** The site's navigation tree, already filtered by what this reader may see. */ sidebarItems: unknown[]; /** Client-side navigation that resolves once the new page has loaded. */ navigate: (to: string) => Promise; /** Absolute URL for a route that already carries the path prefix. */ routeUrl: (route: string) => string; /** Absolute URL for a root-relative path that still needs the path prefix. */ sitePathUrl: (path: string) => string; /** Applies the site's path prefix to a link that the page data stores un-prefixed. */ withPrefix: (path: string) => string; /** `feedback.hide` is set, so the site publishes no feedback tool. */ feedbackHidden: boolean; /** Present only on API reference pages. */ apiDocs?: ApiDocsPageData; }; //# sourceMappingURL=types.d.ts.map