import { Observable, ReplaySubject } from 'rxjs';
import * as GQL from './backend/graphqlschema';
/**
 * Always represents the latest
 * state of the currently authenticated user.
 *
 * Note that currentUser is not designed to survive across changes in the
 * currently authenicated user. Sign in, sign out, and account changes are
 * all expected to refresh the app.
 */
export declare const currentUser: ReplaySubject<GQL.IUser | null>;
/**
 * refreshCurrentUser can be called to fetch the current user, orgs, and config
 * state from the remote. Emits no items, completes when done.
 */
export declare function refreshCurrentUser(): Observable<never>;
/**
 * Whether auth is required to perform any action.
 *
 * If an HTTP request might be triggered by an unauthenticated user on a server with auth.public ==
 * false, the caller must first check authRequired. If authRequired is true, then the component must
 * not initiate the HTTP request. This prevents the browser's devtools console from showing HTTP 401
 * errors, which mislead the user into thinking there is a problem (and make debugging any actual
 * issue much harder).
 */
export declare const authRequired: Observable<boolean>;
//# sourceMappingURL=auth.d.ts.map