import type { MiddlewareHandler } from 'hono'; import type { Store } from './store.js'; export interface ErrorHookBody { message?: string; code?: string; errors?: Array<{ field: string; code: string; message?: string; }>; } export interface ErrorHook { id: string; method: string; path: string; status: number; body?: ErrorHookBody; count?: number; rateLimit?: { maxRequests: number; windowMs: number; }; } export type ErrorHookInput = Omit; export declare function getErrorHooks(store: Store): ErrorHook[]; export declare function setErrorHooks(store: Store, hooks: ErrorHook[]): void; export declare function addErrorHook(store: Store, input: ErrorHookInput): ErrorHook; export declare function removeErrorHook(store: Store, id: string): boolean; export declare function errorHooksMiddleware(store: Store): MiddlewareHandler;