import type { Context, Handler, MiddlewareHandler } from '../_types/hono/dist/types/index.d.ts';
import type { DescribeRouteOptions } from '../_types/hono-openapi/dist/index.d.ts';
import type { Mastra } from '../mastra/index.js';
import type { RequestContext } from '../request-context/index.js';
import type { ApiRoute, ApiRouteHandler, MastraAuthConfig, Methods } from './types.js';
export type { MastraAuthConfig, A2AAgentCardSigningConfig, A2AConfig, ContextWithMastra, CorsOptions, ApiRoute, ApiRouteHandler, HttpLoggingConfig, ValidationErrorContext, ValidationErrorResponse, ValidationErrorHook, StudioConfig, Middleware, } from './types.js';
export { MastraAuthProvider } from './auth.js';
export type { IMastraAuthProvider, MastraAuthProviderOptions } from './auth.js';
export type { HonoRequestLike, MastraAuthRequest } from './request-types.js';
export { getRequestHeader, getWebRequest } from './request-types.js';
export { CompositeAuth } from './composite-auth.js';
export { MastraServerBase } from './base.js';
export { SimpleAuth } from './simple-auth.js';
export type { SimpleAuthOptions } from './simple-auth.js';
type ParamsFromPath<P extends string> = {
    [K in P extends `${string}:${infer Param}/${string}` | `${string}:${infer Param}` ? Param : never]: string;
};
/**
 * Variables available in the Hono context for custom API route handlers.
 * These are set by the server middleware and available via c.get().
 */
type CustomRouteVariables = {
    mastra: Mastra;
    requestContext: RequestContext;
};
type RegisterApiRouteOptions<P extends string> = {
    method: Methods;
    openapi?: DescribeRouteOptions;
    handler?: Handler<{
        Variables: CustomRouteVariables;
    }, P, ParamsFromPath<P>>;
    createHandler?: (c: Context) => Promise<ApiRouteHandler>;
    middleware?: MiddlewareHandler | MiddlewareHandler[];
    /**
     * Route-specific CORS configuration.
     */
    cors?: ApiRoute['cors'];
    /**
     * When false, skips Mastra auth for this route (defaults to true)
     */
    requiresAuth?: boolean;
    /**
     * Explicit RBAC permission for the route.
     */
    requiresPermission?: ApiRoute['requiresPermission'];
    /**
     * Optional FGA configuration for resource-level authorization.
     */
    fga?: ApiRoute['fga'];
};
export declare function registerApiRoute<P extends string>(path: P, options: RegisterApiRouteOptions<P>): ApiRoute;
export declare function defineAuth<TUser>(config: MastraAuthConfig<TUser>): MastraAuthConfig<TUser>;
//# sourceMappingURL=index.d.ts.map