import { Observable } from 'rxjs';
import * as GQL from '../backend/graphqlschema';
/**
 * Fetches all users.
 */
export declare function fetchAllUsers(args: {
    first?: number;
    query?: string;
}): Observable<GQL.IUserConnection>;
/**
 * Fetches all organizations.
 */
export declare function fetchAllOrganizations(args: {
    first?: number;
    query?: string;
}): Observable<GQL.IOrgConnection>;
interface RepositoryArgs {
    first?: number;
    query?: string;
    enabled?: boolean;
    disabled?: boolean;
    cloned?: boolean;
    cloneInProgress?: boolean;
    notCloned?: boolean;
    indexed?: boolean;
    notIndexed?: boolean;
}
export declare function fetchAllRepositoriesAndPollIfAnyCloning(args: RepositoryArgs): Observable<GQL.IRepositoryConnection>;
/**
 * Add a repository. See the GraphQL documentation for Mutation.addRepository.
 */
export declare function addRepository(name: string): Observable<{
    /** The ID of the newly added repository (or the existing repository, if it already existed). */
    id: GQL.ID;
}>;
export declare function setRepositoryEnabled(repository: GQL.ID, enabled: boolean): Observable<void>;
export declare function setAllRepositoriesEnabled(enabled: boolean): Observable<void>;
export declare function updateMirrorRepository(args: {
    repository: GQL.ID;
}): Observable<void>;
export declare function updateAllMirrorRepositories(): Observable<void>;
export declare function checkMirrorRepositoryConnection(args: {
    repository: GQL.ID;
} | {
    name: string;
}): Observable<GQL.ICheckMirrorRepositoryConnectionResult>;
export declare function deleteRepository(repository: GQL.ID): Observable<void>;
/**
 * Fetches usage analytics for all users.
 *
 * @return Observable that emits the list of users and their usage data
 */
export declare function fetchUserAnalytics(args: {
    activePeriod?: GQL.UserActivePeriod;
    query?: string;
    first?: number;
}): Observable<GQL.IUserConnection>;
/**
 * Fetches site-wide usage analytics.
 *
 * @return Observable that emits the list of users and their usage data
 */
export declare function fetchSiteAnalytics(): Observable<GQL.ISiteActivity>;
/**
 * Fetches the site and its configuration.
 *
 * @return Observable that emits the site
 */
export declare function fetchSite(): Observable<GQL.ISite>;
/**
 * Updates the site's configuration.
 *
 * @returns An observable indicating whether or not a service restart is
 * required for the update to be applied.
 */
export declare function updateSiteConfiguration(input: string): Observable<boolean>;
/**
 * Reloads the site.
 */
export declare function reloadSite(): Observable<void>;
export declare function setUserIsSiteAdmin(userID: GQL.ID, siteAdmin: boolean): Observable<void>;
export declare function randomizeUserPassword(user: GQL.ID): Observable<GQL.IRandomizeUserPasswordResult>;
export declare function deleteUser(user: GQL.ID): Observable<void>;
export declare function createUser(username: string, email: string | undefined): Observable<GQL.ICreateUserResult>;
export declare function deleteOrganization(organization: GQL.ID): Observable<void>;
export declare function fetchSiteUpdateCheck(): Observable<{
    buildVersion: string;
    productVersion: string;
    updateCheck: GQL.IUpdateCheck;
}>;
/**
 * Fetches all known language server's information.
 *
 * @return Observable that emits the list of language servers.
 */
export declare function fetchLangServers(): Observable<GQL.ILangServer[]>;
/**
 * Enables the language server for the given language.
 */
export declare function enableLangServer(language: string): Observable<void>;
/**
 * Disables the language server for the given language.
 */
export declare function disableLangServer(language: string): Observable<void>;
/**
 * Restarts the language server for the given language.
 */
export declare function restartLangServer(language: string): Observable<void>;
/**
 * Updates the language server for the given language.
 */
export declare function updateLangServer(language: string): Observable<void>;
export {};
//# sourceMappingURL=backend.d.ts.map