/** * Token Refresh Mutex * * Implements a "Singleflight" pattern for token refreshes. * Ensures that for a given user, only ONE token refresh request happens at a time. * All other concurrent requests for that user will await the same refresh promise. */ export declare class TokenRefreshMutex { private refreshPromises; /** * Execute a refresh function with a lock for the given userId. * If a refresh is already in progress for this user, returns the existing promise. * * @param userId The user ID to lock on * @param refreshFn The actual refresh logic to execute */ withLock(userId: string, refreshFn: () => Promise): Promise; } export declare const tokenMutex: TokenRefreshMutex; //# sourceMappingURL=token-mutex.d.ts.map