@accounter/server
Version:
Accounter GraphQL server
31 lines (30 loc) • 1.17 kB
TypeScript
import type { Environment } from '../../../shared/types/index.js';
export declare class Auth0ManagementProvider {
private env;
private client;
private profileCache;
private readonly PROFILE_CACHE_TTL_MS;
constructor(env: Environment);
private initializeClient;
private getClient;
getUserByEmail(email: string): Promise<string | null>;
getUserEmailById(auth0UserId: string): Promise<{
email: string | null;
emailVerified: boolean;
} | null>;
/**
* Fetch the display identity (email + name) for an Auth0 user.
* Returns null when the lookup fails so callers can degrade gracefully
* instead of failing the whole request.
*/
getUserProfileById(auth0UserId: string): Promise<{
email: string | null;
name: string | null;
} | null>;
createBlockedUser(email: string, password?: string): Promise<string>;
unblockUser(auth0UserId: string): Promise<void>;
blockUser(auth0UserId: string): Promise<void>;
deleteUser(auth0UserId: string): Promise<void>;
sendPasswordResetEmail(auth0UserId: string): Promise<string>;
private generateTemporaryPassword;
}