wcz-layout
Version:
33 lines (32 loc) • 1.78 kB
TypeScript
import { t as User } from "./User-C21DoZOa.js";
import { permissions, scopes } from "virtual:wcz-layout";
import { z } from "zod";
import * as _$_tanstack_start_client_core0 from "@tanstack/start-client-core";
//#region src/middleware/authMiddleware.d.ts
declare const requiredAuthenticationMiddleware: _$_tanstack_start_client_core0.RequestMiddlewareAfterServer<{}, undefined, {
user: User;
}>;
declare const publicAuthenticationMiddleware: _$_tanstack_start_client_core0.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) => _$_tanstack_start_client_core0.RequestMiddlewareAfterServer<{}, readonly [_$_tanstack_start_client_core0.RequestMiddlewareAfterServer<{}, undefined, {
user: User;
}>], undefined>;
declare const serverFnAccessTokenMiddleware: (scopeKey: keyof typeof scopes) => _$_tanstack_start_client_core0.FunctionMiddlewareAfterClient<{}, unknown, undefined, undefined, undefined>;
//#endregion
//#region src/middleware/validationMiddleware.d.ts
declare const validationMiddleware: <T>(schema: z.ZodType<T>) => _$_tanstack_start_client_core0.RequestMiddlewareAfterServer<{}, undefined, {
data: T;
}>;
//#endregion
export { authenticationMiddleware, authorizationMiddleware, serverFnAccessTokenMiddleware, validationMiddleware };
//# sourceMappingURL=middleware.d.ts.map