import { Scope } from '../gen/graphql';
export type AuthConfig = (AuthorizationCodeConfig | ClientCredentialsConfig) & {
    checkSession?: boolean;
    enableLogging?: boolean;
    authFlow?: AuthenticationFlow;
    useStorage?: boolean;
    autoLogin?: boolean;
};
export type AuthorizationCodeConfig = {
    clientId: string;
    scopes?: Scope[];
    authUrl: string;
};
export type ClientCredentialsConfig = {
    clientId: string;
    secret: string;
    scopes?: Scope[];
    authUrl: string;
};
export type Tokens = {
    accessToken?: string;
    expiresIn?: number;
    sessionToken?: string;
    refreshToken?: string;
    idToken?: string;
    clientId?: string;
    profile?: {
        id: string;
        name: string;
        email: string;
        locale: string;
    };
};
export type LoginOptions = {
    redirectUrl: string;
    action?: 'register' | 'login';
};
export declare enum AuthenticationFlow {
    CLIENT_CREDENTIALS = "client-credentials",
    AUTHORIZATION_CODE = "authorization-code"
}
export interface Authentication {
    getTokens(): Promise<Tokens | undefined>;
    getAccessToken(): Promise<string | undefined>;
    login(options?: LoginOptions): Promise<Tokens | undefined>;
    getLoginUrl(options?: LoginOptions): Promise<string | undefined>;
    renew(): Promise<void>;
    logout(): Promise<void>;
}
