import type { OntologyConfig, ResolverContext, EnvironmentConfig, AuthResult } from "../../config/types.js"; /** * Normalize auth function result to AuthResult format. * Supports both legacy string[] format and new AuthResult object. */ export declare function normalizeAuthResult(result: string[] | AuthResult): AuthResult; /** * Context variables added by middleware */ export interface OntologyVariables { resolverContext: ResolverContext; accessGroups: string[]; authResult: AuthResult; } /** * Create auth middleware that calls the user's auth function * and sets the access groups on the context */ export declare function createAuthMiddleware(config: OntologyConfig): import("hono").MiddlewareHandler<{ Variables: OntologyVariables; }, string, {}, Response>; /** * Create context middleware that builds the ResolverContext */ export declare function createContextMiddleware(env: string, envConfig: EnvironmentConfig): import("hono").MiddlewareHandler<{ Variables: OntologyVariables; }, string, {}, Response>; /** * Create access control middleware for a specific function */ export declare function createAccessControlMiddleware(requiredAccess: string[]): import("hono").MiddlewareHandler<{ Variables: OntologyVariables; }, string, {}, Response>; /** * Error handling middleware */ export declare function errorHandler(): import("hono").MiddlewareHandler)>;