import type { UserModel as OrmUserModel } from '@stacksjs/orm'; /** * Get the currently authenticated user * * This is the primary way to get the authenticated user in your application. * It first checks if the user was already set by the auth middleware, * then falls back to validating the bearer token. * * @example * import { authUser } from '@stacksjs/auth' * * const user = await authUser() * if (user) { * console.log('Logged in as:', user.email) * } */ export declare function authUser(): Promise; export declare function check(): Promise; export declare function id(): Promise; export declare function email(): Promise; export declare function name(): Promise; export declare function isAuthenticated(): Promise; export declare function logout(): Promise; export declare function refresh(): Promise; // Local aliases — keep the existing `UserModel` / `UserJsonResponse` symbols // in this module while sourcing the underlying type from the ORM. declare type UserModel = OrmUserModel; declare type UserJsonResponse = OrmUserModel; export type AuthUser = UserJsonResponse;