import type { NormalizedOpenApiSpec, PageMeta } from "./types.js"; export { buildEndpointDoc } from "./openapi-rendering.js"; import type { AllowlistEntry, OperationDescriptor } from "./openapi-types.js"; /** Default base route segment for the generated API reference section. */ export declare const DEFAULT_API_BASE_SLUG = "api-reference"; /** * Slugifies a single route/anchor segment: lowercase, collapse any run of * non-alphanumerics to a single dash, trim edge dashes. Never returns "" and * never contains a slash, so each segment is exactly one path/anchor part. * (Distinct from `generateSlug`, which preserves "/" for nested MDX routes.) */ export declare function slugifySegment(input: string): string; /** * Deterministic anchor id for a parameter, shared verbatim with the runtime * component so deep links resolve. Top-level: `param-{in}-{name}`; nested schema * properties append their parent path: `param-body-user-address-city`. */ export declare function buildParamAnchor(name: string, location: string, parentPath?: string[]): string; export declare function isLocalOpenApiPath(reference: string): boolean; /** * Parses one or more OpenAPI specs and exposes everything the generator needs: * the operation descriptors, lookup indices for the MDX frontmatter path, * synthetic sidebar/sitemap `PageMeta` objects, per-endpoint markdown bodies * (for llms output), and the request-execution allowlist. * * `load()` is transactional: every configured spec must parse and process * successfully before the current registry is replaced. A failed reload throws * and leaves the last-known-good state available to callers. */ export declare class OpenApiRegistry { private operations; private byOperationId; private byMethodPath; private pages; private bodies; private allowlistEntries; private sourceFilePaths; private sourceFingerprintValue; get all(): OperationDescriptor[]; get isEmpty(): boolean; get sourceFiles(): readonly string[]; get sourceFingerprint(): string; load(specs: NormalizedOpenApiSpec[], rootDir: string, apiBaseSlug?: string): Promise; /** Fresh copies of the synthetic pages (caller may mutate/spread safely). */ syntheticPages(): PageMeta[]; bodyForSlug(slug: string): string | undefined; allowlist(): AllowlistEntry[]; /** Looks up an operation by `operationId` or by `"METHOD /path"`. */ lookup(ref: string): OperationDescriptor | undefined; private ingest; private uniqueSlug; private addAllowlist; }