import { n as User } from "./User-D4__w1I1.mjs";
import { permissions } from "virtual:wcz-layout";
import { z as z$1 } from "zod";
//#region src/middleware/authMiddleware.d.ts
/**
 * Puts the caller in `context.user` — Bearer or cookie, `null` when anonymous —
 * without requiring one. Deliberately a single instance, not a factory:
 * `flattenMiddlewares` dedupes by object identity, so every middleware that
 * declares this one as a dependency shares one resolution per request.
 */
export declare const userMiddleware: import("@tanstack/start-client-core").RequestMiddlewareAfterServer<{}, undefined, {
  user: User | null;
}>;
/**
 * Server-function guard, the counterpart to `requireAuth` on routes.
 *
 * - `authMiddleware()` — 401 unless a user is signed in (cookie or Bearer).
 * - `authMiddleware("admin")` — also 403 unless they hold that permission.
 */
export declare const authMiddleware: (permissionKey?: keyof typeof permissions) => import("@tanstack/start-client-core").RequestMiddlewareAfterServer<{}, readonly [import("@tanstack/start-client-core").RequestMiddlewareAfterServer<{}, undefined, {
  user: User | null;
}>], {
  user: User;
}>;
//#endregion
//#region src/middleware/validationMiddleware.d.ts
export declare const validationMiddleware: <T>(schema: z$1.ZodType<T>) => import("@tanstack/start-client-core").RequestMiddlewareAfterServer<{}, undefined, {
  data: T;
}>;
//#endregion
//#region src/middleware/csrfMiddleware.d.ts
export declare const csrfMiddleware: import("@tanstack/start-client-core").RequestMiddlewareAfterServer<{}, undefined, undefined>;
//#endregion
//# sourceMappingURL=middleware.d.mts.map