import { Session } from "./session";
import { Redirection } from "./redirection";
import { TTLManagerRedis } from "./ttl-manager";
import { RepositoryProxy } from "../../infra/redis-om";
import { SessionUser } from "./session-user";
interface KeycloakTokenManagerProps {
    issuerUrl?: string;
    clientId?: string;
    clientSecret?: string;
}
declare class KeycloakTokenManager {
    issuerUrl: any;
    clientId: any;
    clientSecret: any;
    constructor({ issuerUrl, clientId, clientSecret, }: KeycloakTokenManagerProps);
    refresh({ refreshToken, scopes, client }?: {
        refreshToken: any;
        scopes: string[];
        client: any;
    }): Promise<{
        accessToken: any;
        refreshToken: any;
    }>;
    introspect({ accessToken, client }: {
        accessToken: any;
        client: any;
    }): Promise<{
        accessToken: any;
        refreshToken: any;
        active: any;
    }>;
    verify({ accessToken }: {
        accessToken: any;
    }): Promise<any>;
}
interface SessionManagerProps {
    idGenerator?: any;
    tokenManager?: KeycloakTokenManager;
    redirectionRepo?: RepositoryProxy<Redirection>;
    sessionUserRepo?: RepositoryProxy<SessionUser>;
    sessionRepo?: RepositoryProxy<Session>;
    dateTimeSystem?: any;
    ttlManager?: TTLManagerRedis;
    userInfoMapper?: any;
}
declare class SessionManager {
    idGenerator: any;
    tokenManager: KeycloakTokenManager;
    redirectionRepo: RepositoryProxy<Redirection>;
    sessionUserRepo: RepositoryProxy<SessionUser>;
    sessionRepo: RepositoryProxy<Session>;
    dateTimeSystem: any;
    ttlManager: TTLManagerRedis;
    userInfoMapper: any;
    scopes: string;
    flowConfig: any;
    clientMapper: any;
    constructor({ idGenerator, tokenManager, redirectionRepo, sessionUserRepo, sessionRepo, dateTimeSystem, ttlManager, userInfoMapper, }?: SessionManagerProps);
    init(): Promise<void>;
    createSession({ accessToken, refreshToken, flow, clientId, additionalInfo, userId, }: {
        accessToken: any;
        refreshToken: any;
        flow: any;
        clientId: any;
        additionalInfo: any;
        userId: any;
    }): Promise<Session>;
    getSession(id: string): Promise<Session>;
    renewSession(id: string): Promise<Session | null>;
    getUpdatedSession(id: string): Promise<Session | null>;
    removeSession(id: string): Promise<void>;
    updateSession(id: string, session: Session): Promise<Session>;
    introspectSession(id: string): Promise<Session | null>;
    verifySession(id: string): Promise<Session | null>;
    getUserInfo(sessionId: string): Promise<any>;
    mapUserInfo(userInfo: any): {
        user_id: any;
        additional_info: any;
        source_client: any;
    };
    saveRedirectionOf(clientId: string): Promise<Redirection | null>;
    getRedirection(redirectId: string): Promise<Redirection | null>;
    getDestinationClientOf(clientId: string): Promise<any>;
    setAdditionalInfo(sessionId: string, additionalInfo: any): Promise<Session>;
    clearAllSession(userId: string, flow: string): Promise<void>;
    getSessionUser(userId: string, flow: string): Promise<SessionUser>;
    updateSessionUser(userId: string, flow: string): Promise<SessionUser | null>;
}
export default SessionManager;
