import { AxiosInstance } from "axios"; import { Entity } from "../../types/entity"; /** * Create the authentication module * @param client HTTP client * @param appId Application ID * @param serverUrl Server URL * @returns Authentication module */ export declare function createAuthModule(client: AxiosInstance, appId: string | number, serverUrl: string): { /** * Get the current authenticated user * @returns Promise resolving to the user entity */ me: () => Promise; /** * Update the current authenticated user * @param data Updated user data * @returns Promise resolving to the updated user entity */ updateMe: (data: Record) => Promise; /** * Redirect to the login page * @param nextUrl Optional URL to redirect to after successful login */ login(nextUrl?: string): void; /** * Log out the current user * @param redirectUrl Optional URL to redirect to after logout * @returns Promise that resolves when logout is complete */ logout(redirectUrl?: string): Promise; /** * Set the authentication token * @param token Authentication token * @param saveToStorage Whether to save the token to localStorage */ setToken(token: string, saveToStorage?: boolean): void; /** * Check if the user is authenticated * @returns Promise resolving to authentication status */ isAuthenticated(): Promise; };