import { ConfigInterface } from '../../config'; import { OpenAPIDocumentData } from '../../types/openapi'; import { ErrorBoundaryFallbackRenderer } from '../../components/ErrorBoundary'; import { ErrorInfo, ReactNode } from 'react'; export interface IOpenAPIProps { /** A pre-resolved OpenAPI 3.0/3.1 document object, or one that still contains `$ref`s. */ openapi: OpenAPIDocumentData; /** UI configuration: theme, which sections to show, sidebar options, and more. */ config?: ConfigInterface; /** Promise that `openapi` is already fully dereferenced upstream. Verified rather than trusted: `$ref`s left in place are still resolved either way, with a console warning that the promise was false. */ kind?: "resolved"; /** Custom UI shown if rendering this document throws. Defaults to a built-in fallback. */ errorFallback?: ReactNode | ErrorBoundaryFallbackRenderer; /** Called once when a render error is caught, e.g. to report it to your own logging/telemetry. */ onError?: (error: Error, errorInfo: ErrorInfo) => void; } /** * Renders a full OpenAPI documentation page: sidebar navigation, search, * servers, endpoints, and schemas. Pass a pre-resolved (or `$ref`-carrying) * document object; for raw YAML/JSON strings, use `OpenAPIRenderer` instead, * which parses first. */ declare const OpenAPI: (props: IOpenAPIProps) => import("react").JSX.Element; export default OpenAPI;