wcz-layout
Version:
33 lines • 1.72 kB
text/typescript
import { t as User } from "./User-1gKoYJvW.mjs";
import { permissions } from "virtual:wcz-layout";
import { z as z$1 } from "zod";
//#region src/middleware/authMiddleware.d.ts
declare const requiredAuthenticationMiddleware: import("@tanstack/start-client-core").RequestMiddlewareAfterServer<{}, undefined, {
user: User;
}>;
declare const publicAuthenticationMiddleware: import("@tanstack/start-client-core").RequestMiddlewareAfterServer<{}, undefined, {
user: User | null;
}>;
declare function authenticationMiddleware(options?: {
optional?: false;
}): typeof requiredAuthenticationMiddleware;
declare function authenticationMiddleware(options: {
optional: true;
}): typeof publicAuthenticationMiddleware;
declare function authenticationMiddleware(options: {
optional: boolean;
}): typeof requiredAuthenticationMiddleware | typeof publicAuthenticationMiddleware;
declare const authorizationMiddleware: (permissionKey: keyof typeof permissions) => import("@tanstack/start-client-core").RequestMiddlewareAfterServer<{}, readonly [import("@tanstack/start-client-core").RequestMiddlewareAfterServer<{}, undefined, {
user: User;
}>], undefined>;
//#endregion
//#region src/middleware/validationMiddleware.d.ts
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
declare const csrfMiddleware: import("@tanstack/start-client-core").RequestMiddlewareAfterServer<{}, undefined, undefined>;
//#endregion
export { authenticationMiddleware, authorizationMiddleware, csrfMiddleware, validationMiddleware };
//# sourceMappingURL=middleware.d.mts.map