import type { Context } from "hono"; import { type ZodType } from "zod"; export declare class ApiHttpError extends Error { readonly status: number; readonly code?: string; readonly details?: Record; constructor(message: string, options: { status: number; code?: string; details?: Record; }); } /** * Identifies an {@link ApiHttpError} across module copies. Prefer this over * `error instanceof ApiHttpError` anywhere the error may have been thrown by a * different bundle of `@voyant-travel/hono` — notably any framework-wide error * boundary. Subclasses inherit the brand through `super()`. */ export declare function isApiHttpError(error: unknown): error is ApiHttpError; export declare class RequestValidationError extends ApiHttpError { constructor(message: string, details?: Record); } export declare class UnauthorizedApiError extends ApiHttpError { constructor(message?: string); } export declare class ForbiddenApiError extends ApiHttpError { constructor(message?: string); } export declare function parseJsonBody(c: Context, schema: ZodType, options?: { invalidJsonMessage?: string; invalidBodyMessage?: string; maxBytes?: number; }): Promise; export declare function parseOptionalJsonBody(c: Context, schema: ZodType, options?: { defaultValue?: unknown; invalidBodyMessage?: string; maxBytes?: number; }): Promise; export declare function parseQuery(c: Context, schema: ZodType, options?: { invalidQueryMessage?: string; }): T; export declare function normalizeValidationError(error: unknown): ApiHttpError | undefined;