import { B as Bindings, V as Variables } from '../shared/hive.DW0H1Mo_.js'; import { S as Selector } from '../shared/hive.DlaRxYsk.js'; import * as hono_types0 from 'hono/types'; import '../sdk/logger.js'; import 'hono/factory'; import '../sdk/auth.js'; import '../sdk/transaction.js'; import 'zod'; import '../streams/index.js'; //#region src/middleware.d.ts /** * Middleware to set the API version both on the request context as well as the * response headers. */ declare const version: hono_types0.MiddlewareHandler<{ Bindings: Bindings; Variables: Variables; }, string, {}, Response>; interface AuthMiddlewareConfig { /** * `Selector` object for the Resource that is being accessed or `null` if * root-level access is required. */ resource: Selector | null; } /** * Middleware resolving an access token from the request. * * Parses the token from the `Cookie` header and the `Authorization` header. * If both are present, the `Authorization` header takes precedence. * * @returns The resolved token or `null` if no token was found. */ declare const token: hono_types0.MiddlewareHandler<{ Bindings: Bindings; Variables: Variables; }, string, {}, Response>; /** * Middleware to use for validating access to a Resource. */ declare const auth: ({ resource }: AuthMiddlewareConfig) => hono_types0.MiddlewareHandler<{ Bindings: Bindings; Variables: Variables; }, string, {}, Response>; /** * Middleware used to log basic information about a request. */ declare const logging: () => hono_types0.MiddlewareHandler<{ Bindings: Bindings; Variables: Variables; }, string, {}, Response>; /** * Middleware which ensures that every incoming request is assigned * a `Trace`. */ declare const tracing: () => hono_types0.MiddlewareHandler<{ Bindings: Bindings; Variables: Variables; }, string, {}, Response>; /** * Middleware to use for extracting a `Selector` from a `key` contained in the * request path. */ declare const resource: () => hono_types0.MiddlewareHandler<{ Bindings: Bindings; Variables: Variables; }, string, {}, Response>; export { auth, logging, resource, token, tracing, version };