import { ApiClient } from '../utils/api'; export declare class AuthService { private apiClient; private isBrowser; private isLocalStorageAvailable; private sessionTokenKey; constructor(apiClient: ApiClient); /** * Check if localStorage is available in the current environment * @returns Boolean indicating if localStorage is available */ private checkLocalStorageAvailability; /** * Initialize the game server by verifying the game ID and API key * @param gameId Game ID to initialize * @param apiKey API key for authentication * @returns Promise resolving to a boolean indicating success */ initializeGameServer(gameId: string, apiKey: string): Promise; /** * Authenticate a request using the API key * @param apiKey API key to validate * @returns Promise resolving to a boolean indicating if the API key is valid */ authenticateRequest(apiKey: string): Promise; /** * Store the session token in localStorage (browser) or memory (node) * @param token Session token to store */ private storeSessionToken; /** * Get the stored session token from localStorage (browser) or memory (node) * @returns The stored session token or null if not found */ getSessionToken(): string | null; /** * Get detailed session information including user association status * @returns Promise resolving to session information including user ID if associated */ getSessionInfo(): Promise<{ isValid: boolean; hasUserId: boolean; }>; /** * Get the user ID associated with the current session * @returns Promise resolving to the user ID if available, null otherwise */ getUserId(): Promise; /** * Clear the stored session token and user ID */ clearSession(): void; /** * Generate a login URL for user authentication and session association * * The login page is hosted on the same base URL as the API, so we derive the base * URL directly from the underlying ApiClient instead of the store URL. * * @param options Login URL options including sessionToken and gameId * @returns The generated login URL */ generateLoginURL(options: { sessionToken: string; gameId: string; redirectUrl?: string; }): string; } //# sourceMappingURL=AuthService.d.ts.map