import { ConfigurationSubject, SubjectConfigurationContents } from '@sourcegraph/extensions-client-common/lib/settings';
import { BehaviorSubject, Observable, ReplaySubject } from 'rxjs';
import * as GQL from '../backend/graphqlschema';
import { Settings } from '../schema/settings.schema';
/**
 * Represents the configs from various subjects from GraphQL (user, orgs, and global).
 */
export declare const gqlConfigurationCascade: ReplaySubject<GQL.IConfigurationCascade>;
/**
 * Represents the client configuration (e.g. from the browser extension).
 */
export declare const clientConfiguration: BehaviorSubject<string | undefined>;
/**
 * Always represents the entire configuration cascade; i.e., it contains the
 * individual configs from the various config subjects (client, user, orgs, and
 * global).
 */
export declare const configurationCascade: Observable<Override<GQL.IConfigurationCascade, 'subjects', (IClient | GQL.IUser | GQL.IOrg | GQL.ISite)[]>>;
declare type IClient = ConfigurationSubject & SubjectConfigurationContents & {
    latestSettings: {
        id: number;
    };
};
declare type Override<T, K extends keyof T, V> = Pick<T, Exclude<keyof T, K>> & {
    [P in K]: V;
};
/**
 * Always represents the latest merged configuration for the current user
 * or visitor. Callers should cast the value to their own configuration type.
 */
export declare const currentConfiguration: Observable<Settings>;
/**
 * Parses the JSON input using the error-tolerant parser used for site config and settings.
 */
export declare function parseJSON(text: string): any;
export declare function toGQLKeyPath(keyPath: (string | number)[]): GQL.IKeyPathSegment[];
export {};
//# sourceMappingURL=configuration.d.ts.map