import { ArcGISIdentityManager } from "@esri/arcgis-rest-request";
import type { IArcGISContext } from "./types/IArcGISContext";
import { IUserHubSettings } from "./utils/IUserHubSettings";
import type { IArcGISContextManagerOptions } from "./types/IArcGISContextManagerOptions";
import { HubServiceStatus } from "./core/types/ISystemStatus";
/**
 * The manager exposes context (`IArcGISContext`), which combines a `ArcGISIdentityManager` with
 * the `portal/self` and `user/self` responses to provide a central lookup for platform
 * information, api urls, and other useful properties for developers such as IRequestOptions
 * IUserRequestOptions, IHubRequestOptions etc.
 *
 * The context is exposed on gthe `.context` property, and as the authentication changes
 * the `.context` is re-created. This is done to allow web frameworks to watch for
 * changes on that single property, instead of having to leverage observers or events
 * for change detection.
 *
 * Please see the [ArcGISContext Guide](/hub.js/guides/context) for additional information.
 *
 */
export declare class ArcGISContextManager {
    /**
     * Random identifier useful for debugging issues
     * where race-conditions can result in multiple
     * contexts getting created
     */
    id: number;
    private _context;
    private _authentication;
    private _portalUrl;
    private _properties;
    private _hubUrl;
    private _portal;
    private _portalSettings;
    private _currentUser;
    private _serviceStatus;
    private _featureFlags;
    private _serviceFlags;
    private _trustedOrgIds;
    private _trustedOrgs;
    private _resourceConfigs;
    private _userResourceTokens;
    private _userHubSettings;
    /**
     * Private constructor. Use `ArcGISContextManager.create(...)` to
     * instantiate an instance
     * @param opts
     */
    private constructor();
    /**
     * Used to create a new instance of the ArcGISContext class.
     *
     * ```js
     * const ctxMgr = await ArcGISContextManager.create();
     * ```
     *
     * @param opts
     * @returns
     */
    static create(opts?: IArcGISContextManagerOptions): Promise<ArcGISContextManager>;
    /**
     * Create a new instance of the ArcGISContextManager from a serialized
     * string. This is useful when you want to store the context in a
     * browser's local storage or server side session.
     * @param serializedContext
     * @returns
     */
    static deserialize(serializedContext: string): Promise<ArcGISContextManager>;
    /**
     * Serialize the context into a string that can be stored
     * and re-hydrated
     * @returns
     */
    serialize(): string;
    /**
     * Set the Authentication (ArcGISIdentityManager) for the context.
     * This should be called when a user signs into a running
     * application.
     * @param auth
     */
    setAuthentication(auth: ArcGISIdentityManager): Promise<void>;
    /**
     * Set the properties hash and re-create the context
     * @param properties
     */
    setProperties(properties: Record<string, unknown>): void;
    /**
     * Clear the Authentication (ArcGISIdentityManager). This should be
     * called when a user signs out of an application, but
     * the application continues running
     */
    clearAuthentication(): void;
    /**
     * Return a reference to the current state.
     * When `.setAuthentication()` or `.clearAuthenentication()` are
     * called, the state will be re-created. This is done so frameworks
     * like React or Ember can detect changes.
     */
    get context(): IArcGISContext;
    /**
     * Update the User's Hub Settings
     * Stores in the user-app-resource associated with the `hubforarcgis` clientId
     * and updates the context
     * @param settings
     */
    updateUserHubSettings(settings: IUserHubSettings): Promise<void>;
    /**
     * If we have a ArcGISIdentityManager, fetch other resources to populate the context
     */
    private initialize;
    /**
     * Getter to streamline the creation of updated Context instances
     */
    private get contextOpts();
}
export declare const HUB_SERVICE_STATUS: HubServiceStatus;
export declare const ENTERPRISE_SITES_SERVICE_STATUS: HubServiceStatus;
export declare const ALPHA_ORGS: string[];
