import { StoreSdk } from '@api-client/core/build/browser.js';
import { IConfigEnvironment } from '../lib/config/Config.js';
export interface ISessionInitInfo {
    /**
     * The user access token to the store.
     */
    token: string;
    /**
     * When the token expires, if ever.
     */
    expires?: number;
    /**
     * Whether a new token was generated or the stored token is valid.
     */
    new: boolean;
}
/**
 * The client (web) side store.
 */
export declare class HttpStore {
    sdk: StoreSdk;
    url: string;
    env?: IConfigEnvironment;
    /**
     * @deprecated Use the `constructor(env: IConfigEnvironment)` constructor.
     * @param env The store environment to use.
     */
    static fromEnvironment(env: IConfigEnvironment): HttpStore;
    /**
     * @deprecated Use the `constructor(env: IConfigEnvironment)` constructor.
     * @param url The store URL.
     */
    constructor(url: string);
    constructor(env: IConfigEnvironment);
    /**
     * Checks whether the environment has the token and whether this token
     * can make requests to the store.
     *
     * @param env Optional environment. By default is uses the one defined on the class.
     */
    isAuthenticated(env?: IConfigEnvironment | undefined): Promise<boolean>;
    /**
     * Creates a session in the store and authenticates the user when needed.
     * @param env Optional environment to authenticate if should be different than the current
     * @param force Forces logging in even when the token is valid.
     */
    getStoreSessionToken(env?: IConfigEnvironment | undefined, force?: boolean): Promise<ISessionInitInfo>;
    /**
     * Authenticates the user in the store.
     * Note, it opens the browser to the login endpoint.
     */
    authenticateStore(): Promise<void>;
}
//# sourceMappingURL=HttpStore.d.ts.map