export declare class AIMS extends AlBaseAPIClient {
    constructor();
    /**
     * Create a user
     * POST /aims/v1/:account_id/users?one_time_password=:one_time_password
     */
    createUser(accountId: string, name: string, email: string, mobilePhone: string): Promise<AIMSUser>;
    /**
     * Create a user with details
     * POST /aims/v1/:account_id/users
     */
    createUserWithDetails(accountId: string, userDetails: AIMSUserDetails): Promise<AIMSUser>;
    /**
     * Update user details
     * POST /aims/v1/:account_id/users/:user_id
     */
    updateUserDetails(accountId: string, userId: string, data: AIMSUserDetails): Promise<AIMSUser>;
    /**
     * Delete a user
     * DELETE /aims/v1/:account_id/users/:user_id
     */
    deleteUser(accountId: string, userId: string): Promise<unknown>;
    /**
     * Get user details
     * GET /aims/v1/:account_id/users/:user_id
     */
    getUserDetailsById(accountId: string, userId: string): Promise<AIMSUser>;
    getUserDetailsByUserId(userId: string): Promise<AIMSUser>;
    /**
     * Get user permissions
     * GET /aims/v1/:account_id/users/:user_id/permissions
     */
    getUserPermissions(accountId: string, userId: string): Promise<unknown>;
    /**
     * Get Account Details
     * GET /aims/v1/:account_id/account
     */
    getAccountDetails(accountId: string): Promise<AIMSAccount>;
    /**
     * List account IDs, by relationship can be managing, managed and bills_to
     * GET /aims/v1/:account_id/account_ids/:relationship
     */
    getAccountIdsByRelationship(accountId: string, relationship: string, queryParams?: any): Promise<string[]>;
    /**
     * List accounts, by relationship can be managing, managed and bills_to
     * GET /aims/v1/:account_id/accounts/:relationship
     */
    getAccountsByRelationship(accountId: string, relationship: string, queryParams?: any): Promise<AIMSAccount[]>;
    /**
     *  Retrieve a union of user records corresponding to a managed relationship hierarchy between two accounts.
     *  This is a placeholder for a better implementation based on a relationship topology endpoint from AIMS.0
     *  @deprecated use getAccountsIdsByRelationship in conjunction with getUsersFromAccounts
     */
    getUsersFromManagedRelationship(leafAccountId: string, terminalAccountId?: string, failOnError?: boolean): Promise<AIMSUser[]>;
    /**
     * Update account MFA requirements
     * POST /aims/v1/:account_id/account
     */
    requireMFA(accountId: string, mfaRequired: boolean): Promise<AIMSAccount>;
    /**
     * Update account session idle expiration
     * POST /aims/v1/:account_id/account
     */
    setAccountIdleThreshold(accountId: string, seconds: number | null): Promise<void>;
    /**
     * Change a user's password
     * POST /aims/v1/change_password
     */
    changePassword(email: string, password: string, newPassword: string): Promise<void>;
    /**
     * Obtain Authentication Token Information for a specific access token
     * GET /aims/v1/token_info
     */
    getTokenInfo(accessToken: string): Promise<AIMSAuthenticationTokenInfo>;
    /**
     * Initiate the password reset process for a user
     * POST /aims/v1/reset_password
     */
    initiateReset(email: string, returnTo: string): Promise<unknown>;
    /**
     * Reset a user's password using a token
     * PUT /aims/v1/reset_password/:token
     */
    resetWithToken(token: string, password: string): Promise<unknown>;
    /**
     * Create a role
     * POST /aims/v1/:account_id/roles
     */
    createRole(accountId: string, name: string, permissions: any): Promise<unknown>;
    /**
     * Delete a role
     * DELETE /aims/v1/:account_id/roles/:role_id
     */
    deleteRole(accountId: string, roleId: string): Promise<unknown>;
    /**
     * Grant a role
     * PUT /aims/v1/:account_id/users/:user_id/roles/:role_id
     */
    grantRole(accountId: string, userId: string, roleId: string): Promise<unknown>;
    /**
     * Revoke a role
     * DELETE /aims/v1/:account_id/users/:user_id/roles/:role_id
     */
    revokeRole(accountId: string, userId: string, roleId: string): Promise<unknown>;
    /**
     * Get global role, a role that is shared among accounts.
     * GET /aims/v1/roles/:role_id
     */
    getGlobalRole(roleId: string): Promise<unknown>;
    /**
     * Get role
     * GET /aims/v1/:account_id/roles/:role_id
     */
    getAccountRole(accountId: string, roleId: string): Promise<unknown>;
    /**
     * Get assigned roles
     * GET /aims/v1/:account_id/users/:user_id/roles
     */
    getAssignedRoles(accountId: string, userId: string): Promise<AIMSRole[]>;
    /**
     * List global roles, roles that are shared among all accounts.
     * GET /aims/v1/roles
     */
    getGlobalRoles(): Promise<AIMSRole[]>;
    /**
     * List roles for an account. Global roles are included in the list.
     * GET /aims/v1/:account_id/roles
     */
    getAccountRoles(accountId: string): Promise<AIMSRole[]>;
    /**
     * Update Role Name and Permissions
     * POST /aims/v1/:account_id/roles/:role_id
     */
    updateRole(accountId: string, name: string, permissions: any): Promise<unknown>;
    /**
     * Update Role Name
     * POST /aims/v1/:account_id/roles/:role_id
     */
    updateRoleName(accountId: string, name: string): Promise<unknown>;
    /**
     * Update Role Permissions
     * POST /aims/v1/:account_id/roles/:role_id
     */
    updateRolePermissions(accountId: string, permissions: any): Promise<AIMSRole>;
    /**
     * Enroll an MFA device for a user
     * POST /aims/v1/user/mfa/enroll
     */
    enrollMFA(uri: string, sessionToken: string, codes: string[]): Promise<unknown>;
    /**
     * Enroll an MFA device for a user (when no AIMS token available).
     * POST /aims/v1/user/mfa/enroll
     */
    enrollMFAWithoutAIMSToken(mfaUriString: string, codes: string[], email: string, password: string): Promise<unknown>;
    /**
     * Remove a user's MFA device
     * DELETE /aims/v1/user/mfa/:email
     */
    deleteMFA(email: string): Promise<unknown>;
    getUserDetails(accountId: string, userId: string, queryParams?: {
        include_role_ids?: boolean;
        include_user_credential?: boolean;
    }): Promise<AIMSUser>;
    /**
     * List Users
     * GET /aims/v1/:account_id/users
     */
    getUsers(accountId: string, queryParams?: {
        include_role_ids?: boolean;
        include_user_credential?: boolean;
    }): Promise<AIMSUser[]>;
    /**
     * Create Access Key
     * POST /aims/v1/:account_id/users/:user_id/access_keys
     */
    createAccessKey(accountId: string, userId: string, label: string): Promise<AIMSAccessKey>;
    /**
     * Update Access Key
     * POST /aims/v1/access_keys/:access_key_id
     */
    updateAccessKey(accessKeyId: string, label: string): Promise<AIMSAccessKey>;
    /**
     * Get Access Key
     * GET /aims/v1/access_keys/:access_key_id
     */
    getAccessKey(accessKeyId: string): Promise<AIMSAccessKey>;
    /**
     * List Access Keys
     * GET /aims/v1/:account_id/users/:user_id/access_keys?out=:out
     */
    getAccessKeys(accountId: string, userId: string, ttl?: number): Promise<AIMSAccessKey[]>;
    /**
     * Delete Access Key
     * DELETE /aims/v1/:account_id/users/:user_id/access_keys/:access_key_id
     */
    deleteAccessKey(accountId: string, userId: string, accessKeyId: string): Promise<unknown>;
    /**
     * Retrieve linked organization
     */
    getAccountOrganization(accountId: string): Promise<AIMSOrganization>;
    /**
     * This endpoint render's an accounts related accounts topologically by adding a :relationship field to the account object,
     * which contains an array of accounts that are directly related to it.
     * GET /aims/v1/:account_id/accounts/:relationship/topology
     * @param accountId {string}
     * @param relationship {'managed' | 'managing'}
     * @param queryParms {Object}
     */
    getAccountRelationshipTopology(accountId: string, relationship: 'managed' | 'managing', queryParams?: any): Promise<AIMSTopology>;
    /**
     * Returns the ids of the accounts to which an account is related.
     * The related accounts that are returned depend oonf the :relationship param.
     * If using a "managed" relationship, this returns all accounts that the current account manages.
     * If using a "managing" relationship, this returns all accounts that managing the current account.
     * @param accountId {string}
     * @param relationship {'managed' | 'managing'}
     * @param addCurrentId {boolean} [addCurrentId=true] true if wants add the current id to the return
     */
    getAccountsIdsByRelationship(accountId: string, relationship: 'managed' | 'managing', addCurrentId?: boolean): Promise<string[]>;
    /**
     * Returns all users associated with a list of accounts
     * @param accountList {string[]}
     */
    getUsersFromAccounts(accountList: string[]): Promise<AIMSUser[]>;
}

export declare interface AIMSAccessKey {
    access_key_id: string;
    user_id: string;
    account_id: string;
    label: string;
    last_login?: number;
    created?: AlChangeStamp;
    modified?: AlChangeStamp;
    secret_key?: string;
}

export declare interface AIMSAccount {
    id?: string;
    name: string;
    active: boolean;
    version?: number;
    accessible_locations: string[];
    default_location: string;
    mfa_required?: boolean;
    federated_login_required?: boolean;
    idle_session_timeout?: number;
    created: AlChangeStamp;
    modified: AlChangeStamp;
}

export declare interface AIMSAuthentication {
    user: AIMSUser;
    account: AIMSAccount;
    token: string;
    token_expiration: number;
}

export declare interface AIMSAuthenticationTokenInfo extends AIMSAuthentication {
    entity_id?: string;
    entity_type?: string;
    requester_id?: string;
    roles?: AIMSRole[];
}

export declare class AIMSEnrollURI {
    type: string;
    issuer: string;
    algorithm: string;
    email: string;
    secret: string;
    constructor(email: string, secret: string);
    toString(): string;
}

export declare interface AIMSOrganization {
    account_id: string;
    location_id: string;
    id: string;
    version: number;
    created: AlChangeStamp;
    modified: AlChangeStamp;
    url: string;
}

export declare interface AIMSRole {
    id: string;
    account_id: string;
    name: string;
    permissions: {
        [key: string]: string;
    };
    legacy_permissions: any[];
    version: number;
    global?: boolean;
    created?: AlChangeStamp;
    modified?: AlChangeStamp;
}

export declare interface AIMSSessionDescriptor {
    authentication: AIMSAuthentication;
    acting?: AIMSAccount;
    boundLocationId?: string;
    profileId?: string;
    fortraSession?: FortraSession;
}

export declare interface AIMSTopology extends AIMSAccount {
    id: string;
    managing?: AIMSTopology[];
    managed?: AIMSTopology[];
}

export declare interface AIMSUser {
    account_id?: string;
    id?: string;
    name: string;
    email: string;
    active?: boolean;
    locked?: boolean;
    version?: number;
    created: AlChangeStamp;
    modified: AlChangeStamp;
    linked_users: any[];
}

export declare interface AIMSUserDetails {
    name?: string;
    password?: string;
    email?: string;
    active?: boolean;
    mobile_phone?: string;
    phone?: string;
    webhook_url?: string;
    notifications_only?: boolean;
}

/**
 * No particular client -- trickery for prototype evaluation.  DO NOT use this class directly.
 */
export declare abstract class AlAbstractClient {
    static registeredAPIClients: {
        [apiClientId: string]: Function;
    };
    static registerAPIClient(apiClientId: string, factory: Function): void;
}

/**
 * AlActingAccountChangedEvent is broadcast by an AlSessionInstance whenever the acting account is initially changed.
 * This event should be regarded as the *beginning* of the account change process, and provides attentive services to opportunity to
 * flush any account-specific stateful data and any views to evaluate whether they are still valid.
 */
export declare class AlActingAccountChangedEvent extends AlTriggeredEvent<void> {
    previousAccount: AIMSAccount;
    actingAccount: AIMSAccount;
    constructor(previousAccount: AIMSAccount, actingAccount: AIMSAccount);
}

/**
 * AlActingAccountResolvedEvent is broadcast by an AlSessionInstance whenever the acting account has been changed
 * and its roles, entitlements (acting and primary), and other state data have been retrieved from their respective services.
 * This event is the second half of the process whose beginning is indicated by AlActingAccountChangedEvent.
 */
export declare class AlActingAccountResolvedEvent extends AlTriggeredEvent<void> {
    actingAccount: AIMSAccount;
    entitlements: AlEntitlementCollection;
    primaryEntitlements: AlEntitlementCollection;
    constructor(actingAccount: AIMSAccount, entitlements: AlEntitlementCollection, primaryEntitlements: AlEntitlementCollection);
}

/**
 * AlActiveDatacenterChangedEvent is broadcast by an AlSessionInstance whenever the active datacenter has been changed.
 */
export declare class AlActiveDatacenterChangedEvent extends AlTriggeredEvent<void> {
    insightLocationId: string;
    residency: string;
    metadata: unknown;
    constructor(insightLocationId: string, residency: string, metadata: unknown);
}

export declare class AlAfterNetworkRequest extends AlTriggeredEvent<void> {
    request: AlNetworkRequestDescriptor;
    response: AlNetworkResponse;
    constructor(request: AlNetworkRequestDescriptor, response: AlNetworkResponse);
}

export declare type AlApiClient = RootClient;

/**
 * @public
 *
 * This error should be used when an HTTP 5xx response (or other general error) is received
 * from an internal API.
 */
export declare class AlAPIServerError extends AlError {
    serviceName: string;
    statusCode: number;
    constructor(message: string, serviceName: string, statusCode: number, origin?: AlNetworkResponse | any);
}

/**
 * Each of these is a possible outcome of an authentication attempt.
 */
export declare enum AlAuthenticationResult {
    Unauthenticated = "unauthenticated",
    Authenticated = "authenticated",
    AccountLocked = "account_locked",
    AccountUnavailable = "account_unavailable",
    PasswordResetRequired = "password_expired",
    MFAEnrollmentRequired = "mfa_enrollment_required",
    MFAVerificationRequired = "mfa_verification_required",
    TOSAcceptanceRequired = "eula_acceptance_required",
    TOSReacceptanceRequired = "eula_reacceptance_required",
    InvalidCredentials = "failed"
}

export declare interface AlAuthenticationState {
    /**
     * The result of an authentication attempt.  Please don't access this directly; use AlAuthenticationUtility's
     * `getResult()` method to be assured of the correct value.
     */
    result?: AlAuthenticationResult;
    /**
     * MFA and TOS authentication criteria will both provide the user with a temporary "session token" (passed to AIMS as an
     * X-AIMS-Session-Token header.
     */
    sessionToken?: string;
    /**
     * Password reset requires a username parameter
     */
    userName?: string;
    /**
     * TOS authentication criteria will provide a URL where the current terms of service can be retrieved.
     */
    termsOfServiceURL?: string;
    /**
     * TOS api will provide the deferral to accept the terms.
     */
    deferralTOSPeriodEnd?: string;
}

export declare class AlAuthenticationUtility extends AlBaseAPIClient {
    context: AlExecutionContext;
    state: AlAuthenticationState;
    constructor(state?: AlAuthenticationState, context?: AlExecutionContext);
    /**
     * Primary authentication method -- attempts to authenticate using a username and password.
     */
    authenticate(userName: string, passPhrase: string): Promise<AlAuthenticationResult>;
    /**
     * Authenticate against AIMS using a fortra IdP-provided access token.
     */
    authenticateFromFortraSession(fortraSession: FortraSession): Promise<AlAuthenticationResult>;
    /**
     * Performs authentication using a session token (which must be separately populated into `this.state.sessionToken`) and
     * an MFA verification code.
     */
    validateMfaCode(verificationCode: string): Promise<AlAuthenticationResult>;
    /**
     * Performs authentication using a session token (which must be separately populated into `this.state.sessionToken`).
     */
    acceptTermsOfService(acceptTOS?: boolean): Promise<AlAuthenticationResult>;
    authenticateWithAccessToken(accessToken: string): Promise<AlAuthenticationResult>;
    /**
     * Retrieves the last authentication result, if any; defaults to `AlAuthenticationResult.Unauthenticated`.
     */
    getResult(): AlAuthenticationResult;
    /**
     * Retrieves the session token provided in response to the last authentication attempt, if any.
     */
    getSessionToken(): string;
    /**
     * Retrieves the TOS URL provided in response to the last authentication attempt, if any.
     */
    getTermsOfServiceURL(): string;
    /**
     * Retrieves the TOS Deadline provided in response to the last authentication attempt, if any.
     */
    getDeferralTOSPeriodEnd(): string;
    /**
     * "Normalizes" a return URL -- internally, this merely checks the URL against a whitelist of target domains.
     */
    filterReturnURL(returnURL: string, defaultReturnURL?: string): string;
    /**
     * Obtain Authentication Token Information for a specific access token
     */
    protected getTokenInfo(accessToken: string): Promise<AIMSAuthenticationTokenInfo>;
    /**
     * Given a session descriptor, persists that session to AlSession and conduit and then sets the authentication
     * result to `Authenticated`.
     */
    protected finalizeSession(session: AIMSSessionDescriptor): Promise<AlAuthenticationResult>;
    protected handleAuthenticationFailure(error: Error | any): boolean;
    protected requiresMfaCode(response: AlNetworkResponse<any>): boolean;
    protected requiresMfaEnrollment(response: AlNetworkResponse<any>): boolean;
    protected requiresPasswordReset(response: AlNetworkResponse<any>): boolean;
    protected requiresTOSAcceptance(response: AlNetworkResponse<any>): boolean;
    protected requiresTOSReacceptance(response: AlNetworkResponse<any>): boolean;
    /**
     * Normal Authentication - username and password (or key/secret key)
     *
     * Uses HTTP Basic Auth
     * Optionally supply an mfa code if the user account is enrolled for Multi-Factor Authentication
     *
     * There are two variants of this method: one which executes directly against AIMS, and the other which
     * is levied against a gestalt lambda proxied through console.account.
     *
     * Under ordinary circumstances, you should *not* be calling this directly -- instead, you should use the top-level
     * `authenticate` method on @al/session's ALSession instance.
     */
    protected authenticateViaAIMS(user: string, pass: string): Promise<AIMSSessionDescriptor>;
    protected authenticateViaGestalt(user: string, pass: string): Promise<AIMSSessionDescriptor>;
    /**
     * Fortra-Derived Authentication - use a fortra identity to authenticate against AIMS
     */
    protected authenticateViaAIMSFromFortra(fortraSession: FortraSession): Promise<AIMSSessionDescriptor>;
    protected authenticateViaGestaltFromFortra(fortraSession: FortraSession): Promise<AIMSSessionDescriptor>;
    /**
     * Authenticate with an mfa code and a temporary session token.
     * Used when a user inputs correct username:password but does not include mfa code when they are enrolled for Multi-Factor Authentication
     * The session token can be used to complete authentication without re-entering the username and password, but must be used within 3 minutes (token expires)
     *
     * There are two variants of this method: one which executes directly against AIMS, and the other which
     * is levied against a gestalt lambda proxied through console.account.
     *
     * Under ordinary circumstances, you should *not* be calling this directly -- instead, you should use the top-level
     * `authenticateWithMFASessionToken` method on @al/session's ALSession instance.
     */
    protected mfaViaAIMS(sessionToken: string, mfaCode: string): Promise<AIMSSessionDescriptor>;
    protected mfaViaGestalt(sessionToken: string, mfaCode: string): Promise<AIMSSessionDescriptor>;
    protected acceptTOSViaAIMS(sessionToken: string, acceptTOS?: boolean): Promise<AIMSSessionDescriptor>;
    protected acceptTOSViaGestalt(sessionToken: string, acceptTOS?: boolean): Promise<AIMSSessionDescriptor>;
}

/**
 * @public
 *
 * Used to indicate that an upstream service has failed to complete a request in the expected fashion.
 */
export declare class AlBadGatewayError extends AlError {
    upstreamService: string;
    requestDescriptor: unknown;
    httpResponseCode: number;
    constructor(message: string, upstreamService: string, requestDescriptor: unknown);
}

/**
 * @public
 *
 * Used to indicate an invalid request to a service or API.
 *
 * @param message - The description of the error
 * @param inputType - Which type of input was malformed (e.g., query parameter, header, data)
 * @param inputProperty - Which data element was malformed (e.g., "filter", "X-AIMS-Auth-Token", ".data.accounts.id")
 * @param description - Additional descriptive content.
 */
export declare class AlBadRequestError extends AlError {
    inputType?: string;
    inputProperty?: string;
    description?: string;
    httpResponseCode: number;
    constructor(message: string, inputType?: string, inputProperty?: string, description?: string);
}

/**
 * Base class for Alert Logic API clients.
 */
export declare class AlBaseAPIClient extends AlAbstractClient {
    /**
     * The following list of services are the ones whose endpoints will be resolved by default.  Added globally/commonly used services here for optimized API performance.
     */
    protected static defaultServiceList: string[];
    /**
     * The following list of services are the ones whose endpoints will need to be determined for the current context active residency location.
     */
    protected static resolveByResidencyServiceList: string[];
    /**
     * List of api stacks that should utilize "automatic" endpoints resolution by default
     */
    protected static endpointsStackWhitelist: string[];
    protected static endpointsGuard: AlMutex;
    protected static defaultResidency: string;
    context: AlContextProvider;
    constructor();
    get endpointCache(): AlEndpointsDictionary;
    normalize(config: ValidRequestSpecifier, method?: string, data?: any, queryParams?: {
        [param: string]: string | number | boolean | null;
    }): Promise<AlNetworkRequestDescriptor>;
    /**
     * Resolves accumulated endpoints data for the given account.
     *
     * Update Feb 2021
     * ---------------
     * This has been overhauled to deal with services whose endpoints now must be determined for the current context residency (selected datacenter location in UI).
     * The reason for this is to cater for scenarios where a parent account manages children that are located across different geographical locations to one another and therefore
     * any data retrieval for views in the UI where child account roll-ups exist must be fetched from the appropriate location.
     * The previous implementation ALWAYS calculated service endpoints for the default location of the primary account for the logged in user and so any roll ups for views for child accounts never worked eva!!!
     *
     */
    resolveDefaultEndpoints(accountId: string, serviceList: string[]): Promise<AlEndpointsDictionary>;
    resolveResidencyAwareEndpoints(accountId: string, serviceList: string[]): Promise<AlEndpointsDictionary>;
    lookupDefaultServiceEndpoint(accountId: string, serviceName: string): string;
    protected get<ResponseType>(config: ValidRequestSpecifier, queryParams?: {
        [parameterName: string]: string | number | boolean | undefined;
    }): Promise<ResponseType>;
    protected post<ResponseType>(config: ValidRequestSpecifier, data?: any, queryParams?: {
        [parameterName: string]: string | number | boolean | undefined;
    }): Promise<ResponseType>;
    protected put<ResponseType>(config: ValidRequestSpecifier, data?: any, queryParams?: {
        [parameterName: string]: string | number | boolean | undefined;
    }): Promise<ResponseType>;
    protected delete<ResponseType>(config: ValidRequestSpecifier): Promise<ResponseType>;
    protected rawGet<ResponseType>(config: ValidRequestSpecifier, queryParams?: {
        [parameterName: string]: string | number | boolean | undefined;
    }): Promise<AlNetworkResponse<ResponseType>>;
    protected rawPost<ResponseType>(config: ValidRequestSpecifier, data?: any, queryParams?: {
        [parameterName: string]: string | number | boolean | undefined;
    }): Promise<AlNetworkResponse<ResponseType>>;
    protected rawPut<ResponseType>(config: ValidRequestSpecifier, data?: any, queryParams?: {
        [parameterName: string]: string | number | boolean | undefined;
    }): Promise<AlNetworkResponse<ResponseType>>;
    protected rawDelete<ResponseType>(config: ValidRequestSpecifier): Promise<AlNetworkResponse<ResponseType>>;
    protected handleRequest<ResponseType>(method: string, config: ValidRequestSpecifier, data?: any, queryParams?: {
        [parameterName: string]: string | number | boolean | undefined;
    }): Promise<AlNetworkResponse<ResponseType>>;
    protected normalizeRequest(method: string, config: ValidRequestSpecifier, data?: any, queryParams?: {
        [parameterName: string]: string | number | boolean | undefined;
    }): Promise<AlNetworkRequestDescriptor>;
    protected calculateEndpointTarget(request: AlNetworkRequestDescriptor): Promise<AlNetworkRequestDescriptor>;
    /**
     * This converts an axios-based request configuration into the representation we use internally.
     */
    protected importLegacyRequestConfig(config: APIRequestParams): AlNetworkRequestDescriptor;
    /**
     * This method (and its partner, getServiceEndpoints) uses running promise sequences to retrieve endpoints (using the multiple endpoint lookup action)
     * in such a way that
     *    a) most basic services will be retrieved in a single call
     *    b) the initial call is guaranteed to included the service a request is being formed for
     *    c) only one outstanding call to the endpoints service will be issued, per account, at a given time
     *
     * @returns The resolved base URL of the given endpoint.
     */
    protected prepare(requestParams: AlEndpointDescriptor): Promise<string>;
    /**
     * Flushes the cache keys corresponding to a given URL or request specifier
     */
    protected flushCache(target: string | ValidRequestSpecifier): Promise<void>;
    /**
     * Normalize query parameters from config api request.
     */
    private normalizeQueryParams;
}

export declare class AlBeforeNetworkRequest extends AlTriggeredEvent<void> {
    request: AlNetworkRequestDescriptor;
    constructor(request: AlNetworkRequestDescriptor);
}

/**
 *  Author: Big Red <knielsen@alertlogic.com>
 *  Copyright 2019 Alert Logic, Inc.
 */
/**
 * @public
 *
 *  AlBehaviorPromise is a simple extension of Promise that replicates the functionality provided by RxJS's BehaviorSubject.
 *  Promises already provide multicasting functionality, but it can be deucedly inconvenient to provide an inline
 *  executor, and rather obtuse to change the resolved value.
 *
 *  This class exposes the basic surface area of a Promise -- it is `then`able -- but allows the resolved value to change
 *  if necessary.
 */
export declare class AlBehaviorPromise<ResultType = any> {
    protected promise: Promise<ResultType>;
    protected resolver?: {
        (result: ResultType): void;
    };
    protected rejector?: {
        (error: any): void;
    };
    protected fulfilled: boolean;
    protected value: ResultType | null;
    constructor(initialValue?: ResultType | null);
    /**
     * Attaches a resolve/reject listener to the underlying promise.
     */
    then<TResult1 = ResultType, TResult2 = never>(callback?: ((value: ResultType) => TResult1 | PromiseLike<TResult1>) | undefined | null, error?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
    /**
     * Resolves the underlying promise with the given value.
     */
    resolve(result: ResultType): void;
    /**
     * Rejects the underlying promise with the given reason.
     */
    reject(reason: any): void;
    /**
     * Resets the promise back into an unfulfilled state.
     */
    rescind(): void;
    /**
     * Gets the last resolved value.
     */
    getValue(): ResultType | null;
    /**
     * Gets the fulfilled/pending state of the underlying promise.
     */
    isFulfilled(): boolean;
}

export declare interface AlBundledContentDescriptor {
    resourceId: string;
    modified: string;
    contentType: string;
    content: any;
}

/**
 * @public
 *
 * AlCabinet provides a simple, generic interface for caching arbitrary data.  It supports optional serialization to localStorage
 * and sessionStorage, where available, but will gracefully fallback to in-memory-cache mode in their absence.
 */
export declare class AlCabinet {
    name: string;
    data: any;
    type: number;
    /**
     * The following three constants indicate which type of storage should be used for a given Cabinet.
     */
    static LOCAL: number;
    static EPHEMERAL: number;
    static PERSISTENT: number;
    static openCabinets: {
        [cabinetName: string]: AlCabinet;
    };
    syncronizer?: AlStopwatch;
    noStorage: boolean;
    constructor(name: string, data?: any, type?: number);
    /**
     *  Instantiates a persistent information cache (uses localStorage), deserializing data from the provided name if it exists.
     *
     *  @param rawName - The name of the data cluster.
     *
     *  @returns A cabinet instance that can be used to interrogate/update the data.
     */
    static persistent(rawName: string): AlCabinet;
    /**
     *  Instantiates a temporary information cache (uses sessionStorage), deserializing data from the provided name if it exists.
     *
     *  @param rawName - The name of the data cluster.
     *
     *  @returns A cabinet instance that can be used to interrogate/update the data.
     */
    static ephemeral(rawName: string): AlCabinet;
    /**
     *  Instantiates a local cache (uses no storage or persistence).
     *
     *  @param name - The name of the data cluster
     *
     *  @returns A cabinet instance that can be used just to hold arbitrary data.
     */
    static local(name: string): AlCabinet;
    /**
     *  Retrieves a property from the cabinet.
     *
     *  @param property - The name of the property.
     *  @param defaultValue - The value to return if the property doesn't exist (defaults to `null`).
     *  @param disableExpiration - Indicates whether or not time-based expiration rules should be honored.
     *
     *  @returns The value of the property (or provided default)
     */
    get(property: string, defaultValue?: any, disableExpiration?: boolean): any;
    /**
     *  Checks to see if a property is present in the cabinet.
     *
     *  @param property - The name of the property.
     *
     *  @returns `true` if the property exists, `false` otherwise.
     */
    exists(property: string): boolean;
    /**
     *  Checks to see if a given property is expired.
     *
     *  @param property - The name of the property to check expiration for.
     *
     *  @returns `true` if the property either does not exist or has expired, `false` otherwise.
     */
    expired(property: string): boolean;
    /**
     *  Sets a property in the cabinet (and schedules synchronization)
     *
     *  @param property - The name of the property.
     *  @param value - The value to set it to.
     *  @param ttl - The number of seconds the data should be retained for.  Defaults to `0` (indefinite).
     *
     *  @returns A reference to the cabinet instance, so that calls to it may be chained.
     */
    set(property: string, value: any, ttl?: number): this;
    /**
     * Touches a property in the cabinet (and schedules synchronization), effectively extending the
     * cached item's TTL.
     *
     * @param property - The property to touch.
     * @param ttl Number of seconds the data should be retained for.
     */
    touch(property: string, ttl?: number): void;
    /**
     *  Deletes a property in the cabinet (and schedules synchronization)
     *
     *  @param property - The property to be deleted.
     *
     *  @returns A reference to the cabinet instance, so that calls to it may be chained.
     */
    delete(property: string): this;
    /**
     *  Destroys the current cabinet, discarding any contents it may have.
     */
    destroy(): void;
    /**
     *  Synchronizes data back into the storage facility after performing a garbage collection run.
     *
     *  @returns The class instance.
     */
    synchronize: () => this;
}

export declare interface AlChangeStamp {
    at: number;
    by: string;
}

/**
 * Annotation for an API client class that handles interaction with an Alert Logic API
 */
export declare function AlClient(definition: AlClientDefinition): (ctor: Function) => void;

export declare interface AlClientDefinition {
    name: string;
    version: number;
    configurations: {
        [configId: string]: AlEndpointDescriptor;
    };
    defaultConfiguration?: string;
}

export declare interface AlContentBundle {
    resources: {
        [resourceId: string]: AlBundledContentDescriptor;
    };
}

/**
 * Describes the data and functionality that an execution context will provide to other services
 */
export declare interface AlContextProvider {
    environment: string;
    residency: string;
    locationId?: string;
    accessibleLocationIds?: string[];
    defaultAccountId?: string;
    resolveURL: (locationId: string, path?: string, queryParams?: {
        [paramerId: string]: string | number | boolean | null;
    }, context?: any) => string;
    getAIMSToken: () => string | undefined;
    getDataItem<Type>(itemName: string, defaultValue?: any | {
        (): any;
    }): Type;
    setDataItem<Type>(itemName: string, value: Type, persistFor?: number): any;
    setOption<Type>(option: ConfigOption, value: Type): void;
    getOption<Type = any>(option: ConfigOption, defaultValue?: Type): Type;
    target(environment?: string, residency?: "US" | "EMEA" | string, locationId?: string, accessibleLocationIds?: string[]): void;
    handleRequest<YieldType>(request: AlNetworkRequestDescriptor): Promise<AlNetworkResponse<YieldType>>;
    base64Encode(data: string): string;
    base64Decode(data: string): string;
}

/**
 * AlDatacenterSessionError event is used to indicate when there is a problem establishing or persisting a session in an external datacenter.
 */
export declare class AlDatacenterSessionErrorEvent extends AlTriggeredEvent<void> {
    insightLocationId: string;
    errorType: string;
    errorDetails: unknown;
    constructor(insightLocationId: string, errorType: string, errorDetails: unknown);
}

/**
 * AlDatacenterSessionAvailable event is used by navigation layer to indicate when a given datacenter is ready to interact with.
 */
export declare class AlDatacenterSessionEstablishedEvent extends AlTriggeredEvent<void> {
    insightLocationId: string;
    constructor(insightLocationId: string);
}

/**
 * @public
 *
 * The AlDataValidationError is intended to alert of unexpected responses from an internal API.
 * These responses need to be identified separately from other errors so that the relevant
 * system health checks or communication with an appropriate backend team can be organized in response.
 * Please note that this should NOT be used to handler general server-side failures; please see AlAPIServerError
 * for that error condition.
 *
 * @param message - Descriptive error text
 * @param data - a reference to the data that is invalid
 * @param schemaId - The top level schema that was used to validate the data
 * @param validationErrors - Unstructured information about specific response validation issues
 * @param request - A reference to the request from which the data was retrieved (if applicable)
 */
export declare class AlDataValidationError extends AlError {
    data: unknown;
    schemaId: string;
    validationErrors: any[];
    request?: AlNetworkRequestDescriptor;
    constructor(message: string, data: unknown, schemaId: string, validationErrors?: any[], request?: AlNetworkRequestDescriptor);
}

export declare let AlDefaultClient: RootClient;

export declare interface AlDynamicFormControlElement<Type = any> {
    type: string;
    property: string;
    label?: string;
    secret?: boolean;
    description?: string;
    value?: Type;
    defaultValue?: Type;
    optional?: boolean;
    options?: {
        label: string;
        value: Type;
        disabled?: boolean;
    }[];
    /**
     * Deprecation alert!  These properties will go away in the future, so try not to use them :)
     */
    title?: string;
    disabled?: boolean;
    dataType?: string;
    updateNotAllowed?: boolean;
    validationPattern?: string;
    editorOptions?: any;
    responderOptions?: any;
    placeholder?: string;
    aboveDescription?: string;
    belowDescription?: string;
    patternError?: string;
    requiredError?: string;
    minLengthError?: string;
    maxLengthError?: string;
    joinExpression?: string;
    joinExpresion?: string;
    splitExpression?: RegExp | string;
    splitExpresion?: RegExp | string;
    multiSelectOptions?: any;
    treeSelectOptions?: any;
    minLength?: number;
    maxLength?: number;
    minValue?: number;
    maxValue?: number;
    onNodeSelected?: any;
    onNodeUnselected?: any;
    columns?: any;
    cssClass?: string;
}

/**
 * Please see README before adding properties here :)
 */
export declare type AlDynamicFormControlElementOptions = any;

export declare type AlDynamicFormControlInputResponderOptions = any;

export declare interface AlEndpointDescriptor {
    method?: string;
    data?: any;
    debug?: boolean;
    credentialed?: boolean;
    configuration?: string;
    stack?: string;
    prefix?: string;
    service?: string;
    version?: string | number;
    residency?: string;
    accountId?: string;
    path?: string;
    contextualAccountId?: string;
    targetEndpoint?: string;
    noAutoResolution?: boolean;
    noDevImplementation?: boolean;
    aimsAuthHeader?: boolean;
}

/**
 *  A dictionary of resolved endpoints, keyed by environment, account, service, and residency.
 *  Residency may be US, EMEA, or default (which corresponds with the legacy "infer from primary account's default location" logic.
 */
declare type AlEndpointsDictionary = {
    [environment: string]: {
        [accountId: string]: {
            [serviceId: string]: {
                [residency: string]: string;
            };
        };
    };
};

/**
 *  AlEntitlementCollection manages groups of entitlement records, and makes it easy (and safe) to interrogate them.
 */
export declare class AlEntitlementCollection {
    /**
     * This static list of "known" entitlements is derived from actually interrogating production entitlements for all
     * active accounts.  It will need to be updated with new entitlements periodically to prevent unnecessary warning messages.
     */
    static KnownEntitlements: string[];
    protected collection: {
        [productId: string]: AlEntitlementRecord;
    };
    protected evaluationCache: {
        [expression: string]: boolean;
    };
    constructor(entitlements?: AlEntitlementRecord[]);
    /**
     * Static method to import an AlEntitlementCollection from a raw API response.
     */
    static import(rawData: any, internalUser?: boolean): AlEntitlementCollection;
    /**
     * Convenience method to generate a working collection from a simple list of productIds/entitlement keys.
     */
    static fromArray(entitlementKeys: string[]): AlEntitlementCollection;
    /**
     * Converts an entitlement collection to an array of entitlement keys
     */
    toArray(): string[];
    /**
     *  Merges a set of entitlement records into the collection, using the following rules:
     *      -   Active entitlements for a given product supersede inactive entitlements
     *      -   Latest active expiration supercedes earlier expirations
     */
    merge(entitlements: AlEntitlementRecord[]): this;
    /**
     *  This accessor GUARANTEES a record, even if there isn't a matching record in the collection.
     */
    getProduct(productId: string): AlEntitlementRecord;
    /**
     * Determines whether or not a given product is active or not.
     */
    isEntitlementActive(productId: string): boolean;
    /**
     * Evaluates a logic expression about entitlements, returning true if the entitlements match the expression or false otherwise.
     *
     *  @param {string} entitlementExpression should be a string that expresses a specific combination of product families
     *                  with a | separated list of product families (see subscriptions service API documentation for available
     *                  product families).
     *  @returns {boolean} Indicating whether ANY of the product families in the entitlement expression
     *                  are active.
     *
     *  Example entitlement expressions:
     *
     *      threat_manager&log_manager&!cloud_insight                       <-- TM and LM and NOT Cloud Insight
     *      cloud_insight&!cloud_defender|threat_manager|log_manager        <-- Cloud Insight && NOT ( Cloud Defender | Log Manager | Threat Manager )
     */
    evaluateExpression(entitlementExpression: string): boolean;
    /**
     * Returns an array of all of the entitlement keys that are active in the managed collection.
     */
    getActiveEntitlementKeys(): string[];
    /**
     * Implements ALConditionalSubject.getPropertyValue, allowing entitlement collections to be tested using standardized queries.
     * Namespace is assumed to be managed by a parent object, and is ignored.
     *
     * The special property `$` refers to the entire collection of *active* entitlements, as strings.
     */
    getPropertyValue(property: string, ns: string): any;
}

/**
 *  A container for various subscription and entitlement types.
 *      AlEntitlementRecord describes a single entitlement exposed in the subscription API's entitlement endpoint.
 *      AlEntitlementCollection is a manager for a group of entitlement records.
 *
 *  @author McNielsen <knielsen@alertlogic.com>
 *  @copyright Alert Logic, Inc 2019
 */
/**
 *  AlEntitlementRecord describes the basic properties of an entitlement.
 *  This may not represent the complete entitlement record, but excluded fields are generally not of interest outside of very specific use cases.
 */
export declare interface AlEntitlementRecord {
    productId: string;
    active: boolean;
    expires: Date;
    value_type?: string;
    value?: number;
}

/**
 * A collection of classed error types.
 *
 * Author: Kevin Nielsen <knielsen@alertlogic.com>
 * Copyright 2K*

 /**
 * @public
 *
 * A base error class used to provide consistent prototype chaining.
 */
export declare class AlError extends Error {
    __proto__: Error;
    static upstream?: {
        (error: AlError): void;
    };
    /**
     * Optional reference to underlying Error, network request, or <any>thing that triggered this error.
     */
    origin?: Error | AlError | unknown;
    details?: {
        [key: string]: any;
    };
    constructor(message?: string, derivedFrom?: Error | AlError | any, details?: {
        [key: string]: any;
    });
    /**
     *  Logs a normalized error message to the console.
     *
     *  @param error Can be an AxiosResponse, Error, string, or anything else (although "anything else" will be handled with a generic error message).
     */
    static log(error: AlNetworkResponse | AlError | Error | string | any, commentary?: string, ...details: any[]): void;
    /**
     * Reports an error to an external error reporting service.
     */
    static report(error: AlNetworkResponse | AlError | Error | string | any, commentary?: string, ...details: any[]): void;
    /**
     * Normalizes anything into an AlError.
     *
     * @param error Can be an AlNetworkResponse (in which case the method will return an AlAPIServerError),
     *              any other Error or derived class, string, or anything really.
     * @returns AlError of the appropriate flavor.
     */
    static normalize(error: AlNetworkResponse | AlError | Error | string | any, commentary?: string, ...details: any[]): AlError;
}

export declare class AlEventStream {
    events: AlTriggerStream;
    dispatch<EventType extends AlTriggeredEvent>(event: EventType): Promise<EventType>;
    on<EventType extends AlTriggeredEvent>(eventType: Function, callback: AlTriggeredEventCallback<EventType>): AlTriggerSubscription<EventType>;
}

export declare abstract class AlExecutionContext extends AlEventStream implements AlContextProvider {
    protected static defaultContext?: AlExecutionContext;
    get environment(): string;
    get residency(): string;
    get locationId(): string;
    get accessibleLocationIds(): string[];
    defaultAccountId?: string;
    protected defaultOptions: {
        [optionKey: string]: string | number | boolean | unknown;
    };
    protected options: {
        [optionKey: string]: string | number | boolean | unknown;
    };
    protected paramPreservationZones: {
        [zoneKey: string]: AlParamPreservationRule;
    };
    protected clientInstances: {
        [clientId: string]: AlAbstractClient;
    };
    protected data: {
        [item: string]: any;
    };
    protected locatorService?: AlLocatorMatrix;
    protected sessionInstance?: AlSessionInstance;
    protected context: {
        environment: string;
        residency: string;
        locationId: any;
        accessibleLocationIds: any[];
    };
    protected provisionalToken?: string;
    constructor(options?: {
        [optionKey: string]: string | number | boolean | unknown;
    });
    static getOption<ValueType = any>(option: ConfigOption, defaultValue?: ValueType): ValueType | undefined;
    static setOption<ValueType = any>(option: ConfigOption, value: ValueType): AlExecutionContext;
    static findParamPreservationRule(path: string): AlParamPreservationRule | null;
    static on<EventType extends AlTriggeredEvent>(eventType: Function, callback: AlTriggeredEventCallback<EventType>): AlTriggerSubscription<EventType>;
    static resolveURL(locationId: string, path?: string, queryParams?: {
        [parameterId: string]: string | number | boolean | null;
    }, context?: AlLocationContext): string;
    static resolveNodeByURI(uri: string): AlLocationDescriptor | undefined;
    static resolveNode(locationTypeId: string): AlLocationDescriptor | undefined;
    static get environment(): string;
    static get residency(): string;
    static get locationId(): string;
    static get accessibleLocationIds(): string[];
    static target(environment?: string | AlLocationContext, residency?: "US" | "EMEA" | string, locationId?: string, accessibleLocationIds?: string[]): void;
    static reset(): void;
    static get locator(): AlLocatorMatrix;
    static get session(): AlSessionInstance;
    static get default(): AlExecutionContext;
    static client<ClientType extends AlAbstractClient>(clientClass: new () => ClientType): ClientType;
    resolveNode(locationTypeId: string): AlLocationDescriptor | undefined;
    resolveNodeByURI(uri: string): AlLocationDescriptor | undefined;
    resolveURL(locationId: string, path?: string, queryParams?: {
        [parameterId: string]: string | number | boolean | null;
    }, context?: AlLocationContext): string;
    setProvisionalToken(token: string): void;
    clearProvisionalToken(): void;
    getAIMSToken(): string | undefined;
    get locator(): AlLocatorMatrix;
    get session(): AlSessionInstance;
    getDataItem<Type = any>(itemName: string, defaultValue?: Type | {
        (): Type;
    }): Type;
    setDataItem<Type = any>(itemName: string, value: Type | {
        (): Type;
    }, persistFor?: number): void;
    /**
     * Focuses the context around a specific environment.
     */
    target(envContextOrURL?: string | AlLocationContext, residency?: "US" | "EMEA" | string, locationId?: string, accessibleLocationIds?: string[]): void;
    setOption<ValueType = any>(option: ConfigOption, value: ValueType): AlExecutionContext;
    setOptions(options?: {
        [optionKey: string]: string | number | boolean | unknown;
    }): void;
    getOption<ValueType = any>(option: ConfigOption, defaultValue?: ValueType): ValueType | undefined;
    getOptions(): {
        [optionKey: string]: unknown;
    };
    reset(): void;
    useLocalContent(assetBasePath?: string): AlExecutionContext;
    /**
     * Sets the map of parameter preservation rules for consumption by the navigation layer.
     */
    setParamPreservationRules(rulesMap: {
        [zoneKey: string]: AlParamPreservationRule;
    }): AlExecutionContext;
    /**
     * Saves a parameter preservation rule for consumption by the navigation layer.
     */
    addParamPreservationRule(zoneKey: string, rule: AlParamPreservationRule): this;
    /**
     * Removes a parameter preservation rule
     */
    removeParamPreservationRule(zoneKey: string): this;
    /**
     * Finds the parameter preservation rule that should apply to a given path (used by navigation layer)
     */
    findParamPreservationRule(path: string): AlParamPreservationRule | null;
    client<ClientType extends AlAbstractClient>(clientClass: new () => ClientType): ClientType;
    abstract base64Decode(input: string): string;
    abstract base64Encode(input: string): string;
    abstract handleRequest<YieldType = any>(request: AlNetworkRequestDescriptor): Promise<AlNetworkResponse<YieldType>>;
}

/**
 * AlExternalTrackableEvent is used to catch runtime metrics from embedded defender views and relay them to google analytics.
 */
export declare class AlExternalTrackableEvent extends AlTriggeredEvent<void> {
    data: unknown;
    constructor(data: unknown);
}

export declare class AlFrameMessageStream {
    frameURI: string;
    waitForMessage?: boolean;
    messagePrefix?: string;
    protected isReady: AlBehaviorPromise<boolean>;
    protected container: HTMLElement;
    protected handlers: {
        [messageType: string]: {
            (data: any, rawEvent?: any, stream?: AlFrameMessageStream): void;
        };
    };
    /**
     * Constructor
     *
     * @param frameURI: where the iframe should be pointed to
     * @param waitForMessage: if truthy, the `start()` method will not resolve until the first message is received from the frame.
     * @param messagePrefix: if provided, only messages whose bodies include a `type` property starting with this value will be handled.
     */
    constructor(frameURI: string, waitForMessage?: boolean, messagePrefix?: string);
    start(): Promise<void>;
    ready(): Promise<void>;
    stop(): void;
    on(messageType: string, handler: {
        (data: any, rawEvent?: any, stream?: AlFrameMessageStream): void;
    }): AlFrameMessageStream;
    private onReceiveMessage;
    private render;
}

/**
 * @public
 *
 * Used to indicate that an upstream service has failed to complete a request in a timely fashion.
 */
export declare class AlGatewayTimeoutError extends AlError {
    upstreamService: string;
    requestDescription: unknown;
    httpResponseCode: number;
    constructor(message: string, upstreamService: string, requestDescription: unknown);
}

/**
 * @public
 *
 * AlGlobalizer is a simple tool for exposing encapsulated code selectively in global scope,
 * and for ensuring that singleton instances are, in fact, singletons.  It is deprecated, so please don't use
 * it directly.
 */
export declare class AlGlobalizer {
    /**
     *  Exposes arbitrary data on a nested global property of `window`, using object merging to allow complex
     *  object composition or updates.
     *
     *  @param name - A period-delimited object path, e.g., `o3.state` or `al.navigation`.
     *  @param data - An object to be exposed at the given location.
     */
    static expose(name: string, data?: {
        [key: string]: any;
    }): any;
    /**
     * Instantiates an instance of a global singleton.  This is used primarily to avoid collisions.
     *
     * @param name - The symbolic name of the singleton.
     * @param factory - If the singleton hasn't already been instantiated, this method will be called to generate it.
     * @param collisionHandling - If the singleton has already been instantiated, indicates how the collision should be handled.
     *                  False will ignore the collision; true will generate a warning.  A string will cause an exception to be thrown.
     */
    static instantiate<InstanceType>(name: string, factory: {
        (): InstanceType;
    }, collisionHandling?: boolean | string): InstanceType;
}

/**
 * @public
 *
 * A dictionary of insight locations (as reported by AIMS and the locations service).
 */
export declare const AlInsightLocations: {
    [locationId: string]: ({
        residency: string;
        residencyCaption: string;
        alternatives?: string[];
        logicalRegion: string;
    });
};

/**
 * @public
 *
 * AlLocation is an enumeration of different location types, each corresponding to a specific application.
 * Each type is presumed to have a single unique instance inside a given environment and residency.
 */
export declare class AlLocation {
    /**
     * API Stacks.  A note for "MDR" APIs: please do not create new locations
     * for each individual API.  Instead, please use AlLocation.MDRAPI: this will use
     * a generic MDR base URL and inject the service name into the target domain instead of its
     * path, as with the IWS services.
     */
    static GlobalAPI: string;
    static InsightAPI: string;
    static EndpointsAPI: string;
    static GestaltAPI: string;
    static AETunerAPI: string;
    static IntegrationsAPI: string;
    static ResponderAPI: string;
    static ResponderWS: string;
    static DistributorAPI: string;
    static MDRAPI: string;
    static YARDAPI: string;
    /**
     * UI Nodes
     */
    static LegacyUI: string;
    static EmbeddedLegacyUI: string;
    static OverviewUI: string;
    static IntelligenceUI: string;
    static ConfigurationUI: string;
    static RemediationsUI: string;
    static IncidentsUI: string;
    static AccountsUI: string;
    static LandscapeUI: string;
    static IntegrationsUI: string;
    static EndpointsUI: string;
    static InsightBI: string;
    static HudUI: string;
    static IrisUI: string;
    static SearchUI: string;
    static HealthUI: string;
    static DisputesUI: string;
    static DashboardsUI: string;
    static ExposuresUI: string;
    static MagmaUI: string;
    /**
     * Miscellaneous/External Resources
     */
    static Fino: string;
    static SecurityContent: string;
    static SupportPortal: string;
    static Segment: string;
    static Auth0: string;
    static GoogleTagManager: string;
    static DatadogRum: string;
    static FortraPlatform: string;
    static FrontlineVM: string;
    /**
     * Generates location type definitions for residency-specific prod, integration, and dev versions of a UI
     */
    static uiNode(locTypeId: string, appCode: string, devPort: number, magmaRedirectPath?: string): AlLocationDescriptor[];
}

/**
 *  AlLocatorService is responsible for abstracting the locations of a network of interrelated sites
 *  in different environments, regions/data residency zones, and data centers.  It is not meant to be
 *  used directly, but by a core library that exposes cross-application URL resolution in a more
 *  application-friendly way.
 *
 *  Author: Kevin Nielsen <knielsen@alertlogic.com>
 *  Copyright 2019 Alert Logic, Inc.
 */
/**
 * @public
 *
 * AlLocationContext defines the context in which a specific location or set of locations may exist.
 *     - environment - development, integration, production?
 *     - residency - US or EMEA (or default)?
 *     - locationId - insight-us-virginia, insight-eu-ireland, defender-us-ashburn, defender-us-denver, defender-uk-newport
 *     - accessible - a list of accessible insight location IDs
 */
export declare interface AlLocationContext {
    environment?: string;
    residency?: string;
    locationId?: string;
    accessibleLocationIds?: string[];
}

/**
 * @public
 *
 * Describes a single instance of a location type (AlLocation).
 */
export declare interface AlLocationDescriptor {
    locTypeId: string;
    locationId?: string;
    uri: string;
    originalUri?: string;
    residency?: string;
    environment?: string;
    aliases?: string[];
    productType?: string;
    keyword?: string;
    weight?: number;
    uiCaption?: string;
    uiEntryPoint?: {
        locTypeId: string;
        path?: string;
    };
    data?: any;
    magmaRedirectPath?: string;
}

/**
 * @public
 *
 * A dictionary of public Alert Logic resource locations, subkeyed by residency and environment.
 */
export declare const AlLocationDictionary: AlLocationDescriptor[];

/**
 * @public
 *
 * This class accepts a list of location descriptors, an acting URL, and an optional context specification, and provides the ability
 * to calculate environment- and residency- specific target URLs.
 */
export declare class AlLocatorMatrix implements AlLocationContext {
    environment: string;
    residency: string;
    locationId?: string;
    accessibleLocationIds?: string[];
    debug: boolean;
    private actingUri;
    private actor;
    private uriMap;
    private nodeCache;
    private nodeDictionary;
    constructor(nodes?: AlLocationDescriptor[], actingUri?: string | boolean, initialContext?: AlLocationContext);
    reset(): void;
    target(context: AlLocationContext): void;
    /**
     * Arguably the only important general-purpose functionality of this service.
     * Calculates a URL from a location identifier and an optional path fragment.
     *
     * @returns The resulting URL.
     */
    resolveURL(locTypeId: string, path?: string, contextOverride?: AlLocationContext): string;
    /**
     *  Resolves a literal URI to a service node.
     */
    getNodeByURI(targetURI: string): AlLocationDescriptor | undefined;
    /**
     *  Gets the currently acting node.
     */
    getActingNode(): AlLocationDescriptor | undefined;
    /**
     *  @deprecated
     *
     *  Nested nodes (e.g., an application living inside another application) are official dead, making this method
     */
    resolveNodeURI(node: AlLocationDescriptor): string;
    /**
     *  Updates the locator matrix model with a set of service node descriptors.
     *
     *  @param nodes - A list of service node descriptors.
     */
    setLocations(nodes: AlLocationDescriptor[]): void;
    remapLocationToURI(locTypeId: string, uri: string, environment?: string, residency?: string): void;
    setActingUrl(actingUri: string | boolean | undefined, additionalContext?: AlLocationContext): void;
    search(filter: {
        (node: AlLocationDescriptor): boolean;
    }): AlLocationDescriptor[];
    findOne(filter: {
        (node: AlLocationDescriptor): boolean;
    }): AlLocationDescriptor | undefined;
    /**
     *  Gets a service node by ID, optionally using a context to refine its selection logic.  The context defaults
     *  to the locator matrix instance's current context; if the default is used, the result of the lookup will be stored
     *  for performance optimization.
     *
     *  @param locTypeId - The ID of the service node to select.  See al-service-identity.ts for constant values.
     *  @param context - Additional context to shape the selection logic.
     *
     *  @returns A node descriptor (or null, if no node matches).
     */
    getNode(locTypeId: string, contextOverride?: AlLocationContext): AlLocationDescriptor | null;
    describe(): void;
    /**
     * Escapes a domain pattern.
     *
     * All normal regex characters are escaped; * is converted to [a-zA-Z0-9_]+; and the whole expression is wrapped in ^....*$.
     */
    protected escapeLocationPattern(uri: string): string;
    /**
     * Chops off fragments, query strings, and any trailing slashes, and returns what *should* be just the base URL.
     * I make no promises about the quality of this code when confronted with incorrect or incomplete inputs.
     */
    protected getBaseUrl(uri: string): string;
    /**
     *  Sets the acting context (preferred environment, data residency, location attributes).
     *  This acts as a merge against existing context, so the caller can provide only fragmentary information without borking things.
     */
    protected setContext(context: AlLocationContext, reason?: string): void;
    protected timestamp(defaultValue: number): number;
}

export declare let AlLocatorService: AlLocatorMatrix;

/**
 *  An extremely simple mutual-exclusion mechanism for asynconrous activities.
 *  Only one operation can execute at a given time; subsequent operations will be triggered when their predecessors resolve, reject, or error.
 *  Each invocation of `run` returns a promise that will resolve when that particular action has finished executing (unless an error is
 *  caught), and will pass through the return value of the inner function.
 *  Rejection will not cancel the execution sequence, as in traditional promise chains.
 */
export declare class AlMutex {
    protected queue: {
        action: {
            (): Promise<any>;
        };
        resolve: {
            (v: any): void;
        };
        reject: {
            (e: any): void;
        };
    }[];
    protected running?: Promise<any>;
    /**
     * This is the only exposed method of a mutex instance.
     */
    run<ReturnType = any>(action: {
        (): Promise<ReturnType>;
    }): Promise<ReturnType>;
    protected exec(action: {
        (): Promise<any>;
    }, resolve: {
        (value: any): void;
    }, reject: {
        (error: any): void;
    }): Promise<void>;
    protected execNext(): void;
}

/**
 * Describes a network request
 */
export declare interface AlNetworkRequestDescriptor {
    method?: string;
    data?: any;
    debug?: boolean;
    credentialed?: boolean;
    url?: string;
    params?: {
        [parameterName: string]: string | number | boolean | undefined;
    };
    headers?: {
        [headerName: string]: string;
    };
    responseType?: "json" | "blob" | "arraybuffer" | "text";
    endpoint?: AlEndpointDescriptor;
}

/**
 * Abstract representation of a network response.
 */
export declare interface AlNetworkResponse<Type = any> {
    request: AlNetworkRequestDescriptor;
    status: number;
    statusText: string;
    headers: {
        [headerName: string]: string;
    };
    data: Type;
}

/**
 * @public
 *
 * Used to indicate that a resource does not exist.
 *
 * @param message - A general description of the error and error context.
 */
export declare class AlNotFoundError extends AlError {
    httpResponseCode: number;
    constructor(message: string);
}

/**
 * Describes a set of paths where specific query parameters should be preserved across navigation events, or removed when
 * navigation outside of the application area occurs.
 */
export declare interface AlParamPreservationRule {
    /**
     * One or more regexes describing logical paths to which these particular rules should be applied
     */
    applyTo: RegExp[];
    /**
     * Query parameters that should be preserved across requests
     */
    whitelist?: string[];
    /**
     * Query parameters that should be destroyed when navigating to a non-matching path
     */
    volatile?: string[];
}

/**
 * @deprecated
 *
 * The AlResponseValidationError is intended to alert of unexpected responses from an internal API.
 * These responses need to be identified separately from other errors so that the relevant
 * system health checks or communication with an appropriate backend team can be organized in response.
 * Please note that this should NOT be used to handler general server-side failures; please see AlAPIServerError
 * for that error condition.
 *
 * @param message - Descriptive error text
 * @param errors - Unstructured information about specific response validation issues
 */
export declare class AlResponseValidationError extends AlError {
    errors: any[];
    constructor(message: string, errors?: any[]);
}

/**
 * @public
 *
 * Used to indicate that an upstream service is unavailable.
 */
export declare class AlServiceUnavailableError extends AlError {
    upstreamService: string;
    requestDescription: unknown;
    httpResponseCode: number;
    constructor(message: string, upstreamService: string, requestDescription: unknown);
}

/**
 * These three globals are provided for compatibility with previous architecture.  Please do not use them directly;
 * instead, use the `session`, `locator`, and `rootClient` properties on `AlExecutionContext`.
 */
export declare let AlSession: AlSessionInstance;

/**
 * AlSessionEndedEvent is broadcast by an AlSessionInstance whenever an existing session is destroyed.
 */
export declare class AlSessionEndedEvent extends AlTriggeredEvent<void> {
    constructor();
}

/**
 * AlSessionInstance maintains session data for a specific session.
 */
export declare class AlSessionInstance {
    context: AlExecutionContext;
    get notifyStream(): AlTriggerStream;
    /**
     * Protected state properties
     */
    protected sessionIsActive: boolean;
    protected _session: AIMSSessionDescriptor;
    protected get session(): AIMSSessionDescriptor;
    protected subscriptions: AlSubscriptionGroup;
    /**
     * Tracks when the acting account is changing (measured as interval between AlActingAccountChangedEvent and AlActingAccountResolvedEvent)
     * and allows systematic access to the last set of resolved data.
     */
    protected resolvedAccount: AlActingAccountResolvedEvent;
    protected managedAccounts: AIMSAccount[];
    protected resolutionGuard: AlBehaviorPromise<boolean>;
    protected detectionGuard: AlBehaviorPromise<boolean>;
    protected activeDetectionCycles: number;
    protected storage: AlCabinet;
    /**
     * List of base locations ("stacks") that should automatically have X-AIMS-Auth-Token headers added.
     */
    protected authenticatedStacks: string[];
    constructor(context: AlExecutionContext);
    /**
     * Sets and persists session data and begins account metadata resolution.
     *
     * Successful completion of this action triggers an AlSessionStartedEvent so that non-causal elements of an application can respond to
     * the change of state.
     */
    setAuthentication(proposal: AIMSSessionDescriptor): Promise<AlActingAccountResolvedEvent>;
    /**
     * Sets the session's acting account.
     *
     * Successful completion of this action triggers an AlActingAccountChangedEvent so that non-causal elements of an application can respond to
     * the change of effective account and entitlements.
     *
     * @param account {string|AIMSAccount} The AIMSAccount object representating the account to focus on.
     *
     * @returns A promise that resolves
     */
    setActingAccount(account: string | AIMSAccount): Promise<AlActingAccountResolvedEvent>;
    /**
     * Sets the 'active' datacenter.  This provides a default residency and API stack to interact with.
     */
    setActiveDatacenter(insightLocationId: string): void;
    /**
     * Retrieves the 'active' datacenter, falling back on the acting account's or primary account's default_location
     * as necessary.
     */
    getActiveDatacenter(): string;
    /**
     * Convenience function to set token and expiry values
     * Modelled on /aims/v1/:account_id/account
     * To be called by AIMS Service
     */
    setTokenInfo(token: string, tokenExpiration: number): void;
    /**
     * Activate Session
     */
    activateSession(): boolean;
    /**
     * Deactivate Session
     */
    deactivateSession(): boolean;
    /**
     * Is the Session Active?
     */
    isActive(): boolean;
    /**
     * Get Session
     */
    getSession(): AIMSSessionDescriptor;
    /**
     * Get Authentication
     */
    getAuthentication(): AIMSAuthentication;
    getPrimaryAccountId(): string;
    getPrimaryAccount(): AIMSAccount;
    /**
     * Returns the last resolved account information snapshot
     */
    getResolvedAccount(): AlActingAccountResolvedEvent;
    /**
     * Get the ID of the acting account (account the user is currently working in)
     */
    getActingAccountId(): string;
    /**
     * Get acting Account Name - (account the user is currently working in)
     */
    getActingAccountName(): string;
    /**
     * Get Default Location for the acting account
     */
    getActingAccountDefaultLocation(): string;
    /**
     * Get Accessible Locations for the acting account
     */
    getActingAccountAccessibleLocations(): string[];
    /**
     * Get the acting account entity in its entirety
     */
    getActingAccount(): AIMSAccount;
    /**
     * Get Token
     */
    getToken(): string;
    /**
     * Get Token Expiry
     */
    getTokenExpiry(): number;
    getUser(): AIMSUser;
    /**
     * Get User ID
     */
    getUserId(): string;
    /**
     * Get User Name
     */
    getUserName(): string;
    /**
     * Get User Email
     */
    getUserEmail(): string;
    /**
     * @deprecated
     * Alias for getActingAccountId
     */
    getActingAccountID(): string;
    getUserID(): string;
    /**
     * @deprecated
     * Please use `getPrimaryAccountId()` instead
     */
    getUserAccountID(): string;
    /**
     * @deprecated
     * Get Accessible Locations for the users account
     */
    getUserAccessibleLocations(): string[];
    /**
     * Convenience method to defer logic until ALSession has reached a stable state.
     * For the purposes of this service, "ready" is defined as having completed one or more session detection
     * cycles AND ( user is unauthenticated OR acting account is resolved ).
     */
    ready(): Promise<void>;
    /**
     * Convenience method to wait until authentication status and metadata have been resolved.
     *
     * PLEASE NOTE: that this async function will not resolve until authentication is complete and subscriptions metadata
     * has been retrieved and collated; in an unauthenticated context, it will never resolve!
     */
    resolved(): Promise<void>;
    /**
     * Retrieves the primary account's entitlements, or null if there is no session.
     */
    getPrimaryEntitlementsSync(): AlEntitlementCollection | null;
    /**
     * Convenience method to retrieve the entitlements for the primary account.
     * See caveats for `AlSession.authenticated` method, which also apply to this method.
     */
    getPrimaryEntitlements(): Promise<AlEntitlementCollection>;
    /**
     * Sets primary entitlements.
     */
    setPrimaryEntitlements(collection: AlEntitlementCollection): void;
    /**
     * Retrieves the acting account's entitlements, or null if there is no session.
     */
    getEffectiveEntitlementsSync(): AlEntitlementCollection | null;
    /**
     * Convenience method to retrieve the entitlements for the current acting account.
     * See caveats for `AlSession.authenticated` method, which also apply to this method.
     */
    getEffectiveEntitlements(): Promise<AlEntitlementCollection>;
    /**
     * Sets effective entitlements.
     */
    setEffectiveEntitlements(collection: AlEntitlementCollection): void;
    /**
     * Convenience method to retrieve the array of accounts managed by the current acting account (or a specific
     * other account, if specified)..
     * See caveats for `AlSession.authenticated` method, which also apply to this method.
     */
    getManagedAccounts(accountId?: string): Promise<AIMSAccount[]>;
    /**
     * Allows an external mechanism to indicate that it is detecting a session.
     */
    startDetection(): void;
    /**
     * Allows an external mechanism to indicate that it is done detecting a session.
     */
    endDetection(): void;
    /**
     * Private Internal/Utility Methods
     */
    protected restoreSession(session: AIMSSessionDescriptor): Promise<void>;
    protected mergeSessionOptions(session: AIMSSessionDescriptor, options: AuthenticationOptions): Promise<void>;
    protected onBeforeRequest: (event: AlBeforeNetworkRequest) => void;
    /**
     * Get the current timestamp (seconds since the epoch)
     */
    protected getCurrentTimestamp(): number;
    /**
     * A utility method to resolve a partially populated AlActingAccountResolvedEvent instance.
     *
     * This method will retrieve the full account details, managed accounts, and entitlements for this account
     * and then emit an AlActingAccountResolvedEvent.
     */
    protected resolveActingAccount(account: AIMSAccount): Promise<AlActingAccountResolvedEvent>;
}

/**
 * AlSessionStartedEvent is broadcast by an AlSessionInstance whenever a new session is created by a successful authentication.
 */
export declare class AlSessionStartedEvent extends AlTriggeredEvent<void> {
    user: AIMSUser;
    primaryAccount: AIMSAccount;
    constructor(user: AIMSUser, primaryAccount: AIMSAccount);
}

/**
 *  Author: Kevin Nielsen <knielsen@alertlogic.com>
 *  Copyright Alert Logic Inc, 2019
 */
/**
 * @public
 *
 *  AlStopwatch is an attempt to encapsulate a few basic timer-related use cases into a simple interface.
 *  Most uses cases can be handled by one of the three static methods:
 *    `Stopwatch.later` - creates a Stopwatch instance that won't be executed until someone calls its `now` or `again` methods.
 *    `Stopwatch.once` - creates a Stopwatch instance that executes once after a specified delay, defaulting to 0.
 *    `Stopwatch.repeatedly` - creates a Stopwatch instance that executes repeatedly at a given interval until its `cancel` method is called.
 */
export declare class AlStopwatch {
    callback: {
        (): void;
    };
    timer: any;
    interval: number;
    protected canceller: Function;
    constructor(callback: {
        (): void;
    });
    /**
     *  A static method to generate an unscheduled timer
     */
    static later(callback: {
        (): void;
    }): AlStopwatch;
    /**
     *  A static method to generate a timer that will execute once after a given number of milliseconds.
     */
    static once(callback: {
        (): void;
    }, delay?: number): AlStopwatch;
    /**
     *  A static method to generate a timer that will execute intermittently.
     *  Note that this implementation deviates from the behavior of setInterval by *defaulting*
     *  to firing the timer immediately.
     */
    static repeatedly(callback: {
        (): void;
    }, interval?: number, beginImmediately?: boolean): AlStopwatch;
    static promise(interval: number): Promise<void>;
    /**
     *  The timer's tick handler; executes the callback and, for single-fire timers, clears the timer handle.
     */
    tick: () => void;
    /**
     *  Cancels a scheduled execution.
     */
    cancel: () => void;
    /**
     *  Schedules a repeated execution.  This method has no effect if there is already a scheduled execution.
     */
    again: (delay?: number) => void;
    /**
     * Schedules a repeated execution.  This method will cancel any previously scheduled execution.
     */
    reschedule: (delay?: number) => void;
    /**
     *  Executes the timer immediately (literally, right now!)
     */
    now: () => void;
}

/**
 * @public
 *
 * This is a simple utility to manage a list of subscriptions, which may be AlTriggerSubscriptions or RxJS subscriptions.
 * It exposes a method `manage` to add new subscriptions, and a method `cancelAll` to unsubscribe from all subscriptions.
 * That is all it does.
 */
export declare class AlSubscriptionGroup {
    subscriptions: any[];
    constructor(...items: any[]);
    /**
     * Adds one or more subscriptions (as themselves, in arrays, via callback function, or some mixture of these inputs)
     * to the internal list of managed items.
     */
    manage(...items: any[]): void;
    /**
     * Cancels/unsubscribes from all subscriptions.
     */
    cancelAll(): void;
}

/**
 *  Author: Kevin Nielsen <knielsen@alertlogic.com>
 *  Copyright 2019 Alert Logic, Inc.
 */
/**
 *  @public
 *
 *  Annotation for trigger type classes.  Prevents unique event type names from being lost during minification/uglification.
 */
export declare function AlTrigger(eventTypeName: string): (ctor: Function) => void;

/**
 * @public
 *
 * Represents a typed event.
 */
export declare class AlTriggeredEvent<ResponseType = any> {
    eventTypeName: string;
    responses: ResponseType[];
    constructor(syntheticName?: string);
    /**
     * Retrieves type name
     */
    getEventType(): string;
    /**
     *  Allows hooks to provide feedback/responses to the triggering agent
     */
    respond(response: ResponseType): void;
    /**
     *  Retrieves the first response (or returns undefined), removing it from the list of responses.
     */
    getResponse(): ResponseType | undefined;
    /**
     *  Returns true if any response matches the given value, or false otherwise.
     */
    anyResponseEquals(targetValue: ResponseType): boolean;
    /**
     *  Returns true if the given callback returns true for any of the responses, or false otherwise.
     */
    anyResponseWith(checkCallback: {
        (responseValue: ResponseType): boolean;
    }): boolean;
}

/**
 * @public
 *
 * Callback type for triggered events.
 */
export declare type AlTriggeredEventCallback<EventType> = {
    (event: EventType): void | boolean | Promise<void>;
};

/**
 * @public
 *
 * Represents a series of triggered events.
 */
export declare class AlTriggerStream {
    items: {
        [triggeResponseType: string]: {
            [subscriptionId: string]: AlTriggerSubscription<any>;
        };
    };
    subscriptionCount: number;
    downstream: AlTriggerStream | null;
    flowing: boolean;
    captured: AlTriggeredEvent<any>[];
    constructor(flow?: boolean);
    getBucket(eventTypeName: string): {
        [subscriptionId: string]: AlTriggerSubscription<any>;
    };
    attach<EventType extends AlTriggeredEvent>(eventType: string | Function, callback: AlTriggeredEventCallback<EventType>, subscriptionGroup?: AlSubscriptionGroup): AlTriggerSubscription<EventType>;
    detach(subscription: AlTriggerSubscription<any>): void;
    siphon(child: AlTriggerStream): void;
    trigger<EventType extends AlTriggeredEvent>(event: EventType): Promise<EventType>;
    tap(): void;
}

/**
 * @public
 *
 * Represents a subscription to a stream of triggered events.
 */
export declare class AlTriggerSubscription<EventType> {
    stream: AlTriggerStream;
    eventType: string;
    listenerId: string;
    triggerCallback?: AlTriggeredEventCallback<EventType>;
    protected active: boolean;
    protected filterCb: AlTriggeredEventCallback<EventType> | null;
    constructor(stream: AlTriggerStream, eventType: string, listenerId: string, triggerCallback?: AlTriggeredEventCallback<EventType>);
    then(cb: AlTriggeredEventCallback<any>): AlTriggerSubscription<EventType>;
    filter(cb: AlTriggeredEventCallback<any>): AlTriggerSubscription<EventType>;
    trigger(event: EventType): void | boolean | Promise<void>;
    pause(): void;
    resume(): void;
    cancel(): void;
}

/**
 * @public
 *
 * Used to indicate that the current actor is not authenticated.
 *
 * @param message - The description of the error
 * @param authority - Which authentication authority made the authentication state claim.  Typically, this will be AIMS.
 */
export declare class AlUnauthenticatedRequestError extends AlError {
    authority: string;
    httpResponseCode: number;
    constructor(message: string, authority: string);
}

/**
 * @public
 *
 * Used to indicate that the current actor is not authorized to perform a given action.
 *
 * @param message - A general description of the error or error context.
 * @param resource - The resource that the actor is not authorized to access, e.g., "endpoints" or "deployments"
 */
export declare class AlUnauthorizedRequestError extends AlError {
    resource: string;
    httpResponseCode: number;
    constructor(message: string, resource: string);
}

/**
 * @public
 *
 * Used to indicate that the request cannot be completed because the underlying functionality is incomplete or unimplemented.
 *
 * @param message - A general description of the error or error context.
 */
export declare class AlUnimplementedMethodError extends AlError {
    httpResponseCode: number;
    constructor(message: string);
}

/**
 * Provides an interface for API clients or other services that can provide validation schemas.
 * A validation schema is just a JSON object describing a data structure according to the JSON Schema
 * v4 specification.
 */
export declare interface AlValidationSchemaProvider {
    hasSchema: (schemaId: string) => boolean;
    getSchema: (schemaId: string) => Promise<any>;
    getProviders?: () => AlValidationSchemaProvider[];
}

/**
 * @public
 *
 * Used to wrap an underlying error with a human-friendly message and a reference to the original exception
 *
 * @param message - The human-friendly message
 * @param inner - the underly error
 */
export declare class AlWrappedError extends AlError {
    constructor(message: string, inner: any, details?: any);
    getInnerError(): any;
}

/**
 * This request configuration format is provided for backwards compatibility.  Please don't use it anymore.
 */
export declare interface APIRequestParams {
    /**
     *  The following parameters are used to resolve the correct service location and request path.
     *  The presence of `service_name` on a request triggers this process.
     */
    url?: string;
    method?: string;
    baseURL?: string;
    headers?: any;
    params?: any;
    data?: any;
    withCredentials?: boolean;
    responseType?: "json" | "blob" | "arraybuffer" | "text";
    target_endpoint?: string;
    service_stack?: string;
    service_name?: string;
    residency?: string;
    service_prefix?: string;
    version?: string | number | null;
    account_id?: string;
    context_account_id?: string;
    path?: string;
    noEndpointsResolution?: boolean;
    aimsAuthHeader?: boolean;
    rawResponse?: boolean;
    validation?: any;
    debug?: boolean;
}

declare interface AuthenticationOptions {
    actingAccount?: AIMSAccount | string;
    locationId?: string;
}

export declare function client<ClientType extends AlAbstractClient>(clientClass: new () => ClientType, context?: AlExecutionContext): ClientType;

/**
 * Provides a single interface to control different behaviors across Alert Logic's UI surface area.
 * Many of these are used by the navigation and generic component libraries.
 *
 *   - ConfigOption.GestaltAuthenticate - if true, indicates that AlSession should authenticate via gestalt's session proxy; otherwise,
 *      authentication is performed directly against global AIMS.  Defaults to false.
 *
 *   - ConfigOption.GestaltDomain - If the GestaltAuthenticate option is enabled, this indicates which application will proxy requests to gestalt.
 *
 *   - ConfigOption.ResolveAccountMetadata - if true, AlSession's `setActingAccount` method will retrieve metadata (entitlements and account details)
 *      for the primary and acting account before resolving.  Otherwise, `setActingAccount` will resolve immediately.  Defaults to `true`.
 *
 *   - ConfigOption.ConsolidatedAccountResolver - if true and account metadata resolution is enabled, gestalt's consolidated resolver endpoint
 *      will be used instead of individual calls to subscriptions and AIMS.  Defaults to false.
 *
 *   - ConfigOption.LocalManagedContent - controls whether AlExternalContentManagerService (@al/ng-generic-components) retrieves static content
 *      from gestalt's content endpoints, or attempts to retrieve it from local assets.  Defaults to 'false.'  This is mostly useful for testing
 *      purposes.
 *
 *   - ConfigOption.ManagedContentAssetPath - if local managed content is enabled, indicates the base path to retrieve static content from.
 *
 *   - ConfigOption.NavigationViaConduit - if enabled, AlNavigationService will attempt to retrieve navigation metadata from a conduit request
 *      (which queries console.account for a static asset).  Defaults to 'false.'
 *
 *   - ConfigOption.NavigationViaGestalt - if enabled, AlNavigationService will attempt to retrieve navigation metadata from gestalt
 *      (via AlExternalContentManagerService).  Defaults to 'true.'
 *
 *   - ConfigOption.NavigationAssetPath - if neither conduit nor gestalt navigation options are enabled, AlNavigationService falls back to retrieving
 *      local navigation metadata.  Defaults to 'assets/navigation'.
 *
 *   - ConfigOption.NavigationDefaultAuthState - tristate option indicates whether the default navigation state of the app is
 *      true (user must be authenticated to access), false (no session is required to access), or `null`, in which case the authentication property
 *      of navigational structures is used to determine which navigational options are available.  Defaults to 'null.'
 *
 *   - ConfigOption.NavigationDiagnostics - when enabled, causes the navigation layer to emit "helpful" commentary.
 *
 *   - ConfigOption.Headless and ConfigOption.ActingURI are provided to support angular universal pre-rendering, where there is no DOM
 *      and no browser context, but the libraries need to be marshalled as though there were.
 */
export declare enum ConfigOption {
    GestaltAuthenticate = "session_via_gestalt",
    GestaltDomain = "session_gestalt_domain",
    ResolveAccountMetadata = "session_metadata",
    ConsolidatedAccountResolver = "session_consolidated_resolver",
    DisableEndpointsResolution = "client_disable_endpoints",
    LocalManagedContent = "xcontent_local",
    ManagedContentAssetPath = "xcontent_asset_path",
    NavigationViaConduit = "navigation_use_conduit",
    NavigationViaGestalt = "navigation_use_gestalt",
    NavigationAssetPath = "navigation_asset_path",
    NavigationDefaultAuthState = "navigation_default_authentication",
    NavigationIntegratedAuth = "navigation_use_integrated_auth",
    NavigationDiagnostics = "navigation_debug",
    Headless = "headless",
    HeadlessActingURI = "headless_uri"
}

export declare function deepMerge(target: any, ...imports: any[]): any;

export declare interface FortraSession {
    identityToken: string;
    accessToken: string;
    refreshToken?: string;
}

/**
 * This cluster of functions is intended to ease manipulation of deeply nested structures that are untyped or only partially typed.
 *
 * `getJsonPath` retrieves a value from a deeply nested object.
 * `setJsonPath` sets a value into a deeply nested object.
 * `deepMerge` collapses
 */
export declare function getJsonPath<Type = any>(target: any, path: string | string[], defaultValue?: Type): Type | undefined;

/**
 * This function will help us to get the client timezone offset in the HH:MM format
 **/
export declare function getUserTimezone(): string;

export declare function initializeAlGlobals(session: AlSessionInstance, locator: AlLocatorMatrix, rootClient: RootClient): void;

export declare function isEndpointDescriptor(entity: any): entity is AlEndpointDescriptor;

export declare function isLegacyRequestConfig(config: any): config is APIRequestParams;

/**
 * Simple type-guard to check if a given parameter is `PromiseLike`
 */
export declare function isPromiseLike(candidate: any): candidate is PromiseLike<any>;

export declare function isResponse<Type = any>(instance: any): instance is AlNetworkResponse<Type>;

export declare class RootClient extends AlBaseAPIClient {
    constructor();
    get<ResponseType = any>(config: ValidRequestSpecifier, queryParams?: {
        [parameterName: string]: string | number | boolean | undefined;
    }): Promise<ResponseType>;
    post<ResponseType = any>(config: ValidRequestSpecifier, data?: any, queryParams?: {
        [parameterName: string]: string | number | boolean | undefined;
    }): Promise<ResponseType>;
    put<ResponseType = any>(config: ValidRequestSpecifier, data?: any, queryParams?: {
        [parameterName: string]: string | number | boolean | undefined;
    }): Promise<ResponseType>;
    delete<ResponseType = any>(config: ValidRequestSpecifier): Promise<ResponseType>;
    rawGet<ResponseType = any>(config: ValidRequestSpecifier, queryParams?: {
        [parameterName: string]: string | number | boolean | undefined;
    }): Promise<AlNetworkResponse<ResponseType>>;
    rawPost<ResponseType = any>(config: ValidRequestSpecifier, data?: any, queryParams?: {
        [parameterName: string]: string | number | boolean | undefined;
    }): Promise<AlNetworkResponse<ResponseType>>;
    rawPut<ResponseType = any>(config: ValidRequestSpecifier, data?: any, queryParams?: {
        [parameterName: string]: string | number | boolean | undefined;
    }): Promise<AlNetworkResponse<ResponseType>>;
    rawDelete<ResponseType = any>(config: ValidRequestSpecifier): Promise<AlNetworkResponse<ResponseType>>;
    handleRequest<ResponseType = any>(method: string, config: ValidRequestSpecifier, data?: any, queryParams?: {
        [parameterName: string]: string | number | boolean | undefined;
    }): Promise<AlNetworkResponse<ResponseType>>;
    flushCache(target: string | ValidRequestSpecifier): Promise<void>;
}

export declare function setJsonPath<Type = any>(target: any, path: string | string[], value: Type): Type | undefined;

export declare class Subscriptions extends AlBaseAPIClient {
    private internalUser;
    constructor();
    /**
     * GET all Entitlements for an account
     * GET /subscriptions/v1/:account_id/entitlements
     */
    getEntitlements(accountId: string, queryParams?: any): Promise<AlEntitlementCollection>;
    /**
     * Get Entitlements
     * GET /subscriptions/v1/:account_id/entitlements
     */
    getRawEntitlements(accountId: any, queryParams?: any): Promise<unknown>;
    /**
     * Get Entitlement

     /**
     * List Account Ids with a provided entitlement
     * GET /subscriptions/v1/account_ids/entitlement/:product_family
     */
    getAccountsByEntitlement(accountId: any, productFamily: any): Promise<unknown>;
    /**
     * Create AWS subscriptions for the provided customer.
     * POST /subscriptions/v1/:account_id/subscription/aws
     */
    createAWSSubscription(accountId: any, subscription: any): Promise<unknown>;
    /**
     * Create full subscriptions
     * POST /subscriptions/v1/:account_id/subscription
     */
    createFullSubscription(accountId: any, entitlements: any): Promise<unknown>;
    /**
     * Create standard subscriptions for the provided customer.
     * POST /subscriptions/v1/:account_id/subscription/sync/standard
     */
    createStandardSubscription(accountId: any): Promise<unknown>;
    /**
     * Get subscription
     * GET /subscriptions/v1/:account_id/subscription/:subscription_id
     */
    getSubscription(accountId: any, subscriptionId: any): Promise<unknown>;
    /**
     * Get subscriptions
     * GET
     * /subscriptions/v1/:account_id/subscriptions
     * "https://api.global-integration.product.dev.alertlogic.com/subscriptions/v1/01000001/subscriptions"
     */
    getSubscriptions(accountId: any): Promise<unknown>;
    /**
     * Update AWS subscription
     * PUT /subscriptions/v1/:account_id/subscription/aws
     */
    updateAWSSubscription(accountId: any, subscription: any): Promise<unknown>;
    setInternalUser(internal: boolean): void;
}

export declare type ValidRequestSpecifier = AlEndpointDescriptor | AlNetworkRequestDescriptor | APIRequestParams;

export { }
