import type { PublicSchema } from '@mastra/core/schema';
import type { ApiRoute } from '@mastra/core/server';
import type { JSONSchema7 } from '@mastra/schema-compat';
import type { ServerRoute } from './routes/index.js';
interface RouteOpenAPIConfig {
    method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
    path: string;
    summary?: string;
    description?: string;
    tags?: string[];
    pathParamSchema?: PublicSchema<unknown>;
    queryParamSchema?: PublicSchema<unknown>;
    bodySchema?: PublicSchema<unknown>;
    responseSchema?: PublicSchema<unknown>;
    deprecated?: boolean;
}
export interface OpenAPIRoute {
    summary?: string;
    description?: string;
    tags?: string[];
    deprecated?: boolean;
    requestParams?: {
        path?: PublicSchema<unknown>;
        query?: PublicSchema<unknown>;
    };
    requestBody?: {
        content: {
            'application/json': {
                schema: PublicSchema<unknown>;
            };
        };
    };
    responses: {
        [statusCode: string]: {
            description: string;
            content?: {
                'application/json': {
                    schema: PublicSchema<unknown>;
                };
            };
        };
    };
}
/**
 * Generates OpenAPI specification for a single route
 * Extracts path parameters, query parameters, request body, and response schemas
 */
export declare function generateRouteOpenAPI({ method, path, summary, description, tags, pathParamSchema, queryParamSchema, bodySchema, responseSchema, deprecated, }: RouteOpenAPIConfig): OpenAPIRoute;
/**
 * Helper to convert any PublicSchema to JSON Schema for OpenAPI
 */
export declare function schemaToJsonSchema(schema: PublicSchema<unknown>): JSONSchema7;
/**
 * Generates a complete OpenAPI 3.1.0 document from server routes
 * @param routes - Array of ServerRoute objects with OpenAPI specifications
 * @param info - API metadata (title, version, description)
 * @returns Complete OpenAPI 3.1.0 document
 */
export declare function generateOpenAPIDocument(routes: readonly ServerRoute[], info: {
    title: string;
    version: string;
    description?: string;
}): any;
/**
 * Converts custom API routes with DescribeRouteOptions to OpenAPI path entries.
 * The DescribeRouteOptions from hono-openapi extends OpenAPIV3_1.OperationObject,
 * so it already has the standard OpenAPI structure (parameters, requestBody, responses, etc.).
 *
 * @param routes - Array of ApiRoute objects with optional openapi specifications
 * @returns OpenAPI paths object to be merged into the main spec
 */
export declare function convertCustomRoutesToOpenAPIPaths(routes: ApiRoute[]): Record<string, any>;
export {};
//# sourceMappingURL=openapi-utils.d.ts.map