import { ApiSettings } from "./index";
import { User } from "./loadUser";
declare type Action<T> = (t: T) => void;
declare type UserUpdater = Action<User | null>;
export interface SessionControl {
    user: {
        subscribe(fn: UserUpdater): () => void;
        set(user: User | null): void;
    };
    validUser: {
        subscribe(fn: UserUpdater): () => void;
    };
    isLoggedIn(): boolean;
    logIn(): void;
    logIn(email: string, password: string): Promise<void>;
    logOut(): void;
    renew(password: string): Promise<void>;
    requestPasswordReset(password: string): Promise<any>;
}
export declare function session(settings: ApiSettings): SessionControl;
export {};
