import { OpenApiInfo, OpenApiExample, OpenApiExternalDocumentation, OpenApiParameter, OpenApiSchema, OpenApiServer } from './common'; export interface OpenApiComponents { schemas?: Record; responses?: Record; parameters?: Record; examples?: Record; requestBodies?: Record; headers?: Record; securitySchemes?: Record; links?: Record; callbacks?: Record>; pathItems?: Record; } export interface OpenApiDocument { openapi: string; info: OpenApiInfo; jsonSchemaDialect?: string; servers?: OpenApiServer[]; paths?: OpenApiPaths; webhooks?: Record; components?: OpenApiComponents; security?: Record; tags?: OpenApiTag[]; externalDocs?: OpenApiExternalDocumentation; } export type OpenApiHeader = Omit; export interface OpenApiLink { operationRef?: string; operationId?: string; parameters?: Record; requestBody?: unknown; description?: string; server?: OpenApiServer; } export interface OpenApiSecurityScheme { type: 'apiKey' | 'http' | 'mutualTLS' | 'oauth2' | 'openIdConnect'; description?: string; name?: string; in?: 'query' | 'header' | 'cookie'; scheme?: string; bearerFormat?: string; flows?: OpenApiOAuthFlows; openIdConnectUrl?: string; } export interface OpenApiOAuthFlows { implicit?: OpenApiOAuthFlow; password?: OpenApiOAuthFlow; clientCredentials?: OpenApiOAuthFlow; authorizationCode?: OpenApiOAuthFlow; } export interface OpenApiOAuthFlow { authorizationUrl: string; tokenUrl: string; refreshUrl?: string; scopes: Record; } export declare function isOpenApiDocument(document: unknown): document is OpenApiDocument; export declare const openApiHttpMethods: readonly ["get", "put", "post", "delete", "options", "head", "patch", "trace"]; export type OpenApiHttpMethod = (typeof openApiHttpMethods)[number]; export type OpenApiPaths = Record; export type OpenApiPathItem = { summary?: string; description?: string; parameters?: OpenApiParameter[]; servers?: OpenApiServer[]; } & { [K in OpenApiHttpMethod]?: OpenApiOperation; }; export interface OpenApiMediaType { schema?: OpenApiSchema; example?: unknown; examples?: Record; encoding?: Record; } export interface OpenApiEncoding { contentType?: string; headers?: Record; style?: 'matrix' | 'label' | 'form' | 'simple' | 'spaceDelimited' | 'pipeDelimited' | 'deepObject'; explode?: boolean; allowReserved?: boolean; } export interface OpenApiRequestBody { description?: string; content: Record; required?: boolean; } export interface OpenApiResponse { description?: string; headers?: Record; content?: Record; links?: Record; } export interface OpenApiOperation { tags?: string[]; summary?: string; description?: string; externalDocs?: OpenApiExternalDocumentation; operationId?: string; parameters?: OpenApiParameter[]; requestBody?: OpenApiRequestBody; responses?: Record; callbacks?: Record; deprecated?: boolean; security?: Record; servers?: OpenApiServer[]; } export interface OpenApiTag { name: string; description?: string; externalDocs?: OpenApiExternalDocumentation; } export declare function processOpenApiDocument(document: unknown): OpenApiDocument;