import { Observable, BehaviorSubject } from 'rxjs';
import { HttpResponseWithHeaders } from '@mkeen/rxhttp';
import { AuthorizationBehavior, CouchDBCredentials, CouchDBSessionInfo, CouchDBUserContext } from './types';
export declare class CouchDBSession {
    authorizationBehavior: AuthorizationBehavior;
    sessionUrl: string;
    private credentials?;
    authenticated: BehaviorSubject<boolean>;
    loginAttemptMade: BehaviorSubject<boolean>;
    userSession: BehaviorSubject<CouchDBSessionInfo | null>;
    cookie: BehaviorSubject<string>;
    context: BehaviorSubject<CouchDBUserContext | null>;
    private lastCredentials;
    constructor(authorizationBehavior: AuthorizationBehavior, sessionUrl?: string, credentials?: Observable<CouchDBCredentials> | undefined);
    authenticate(providedCredentials?: CouchDBCredentials): Observable<boolean>;
    reauthenticate(): Observable<boolean>;
    get(): Observable<CouchDBSessionInfo>;
    saveCookie: (access_token?: any) => (httpResponse: HttpResponseWithHeaders<any>) => void;
    extractResponse: (httpResponse: HttpResponseWithHeaders<any>) => any;
    private attemptNewAuthentication;
    private httpRequest;
    private httpRequestOptions;
    private cookieForRequestHeader;
    destroy(): any;
}
