import { Method } from 'axios';
import { UserDTO } from './models/UserDTO';
export declare class APIAgent {
    private apiServerUrl;
    private clientIdentifier;
    private clientIdentifierPassword;
    private fixedHeaders;
    private oAuthTokenResponse;
    constructor(apiServerUrl: string, clientIdentifier: string, clientIdentifierPassword: string, fixedHeaders?: Record<string, string>);
    /**
     * Any time after firing the login() method on this SDK, you should be able to inspect this.isLoggedIn() to verify
     * that login was successful.
     *
     * @returns {boolean}
     */
    isLoggedIn(): boolean;
    /**
     * Use this function to reconstitute a user's logged in session.
     *
     * @param {string} oauthToken
     */
    reloadFromLoginToken(oauthToken: string): UserDTO;
    /**
     * This is used to extract a stringified version of the login token that can later be used in reloadFromLoginToken.
     * This is used when a user's login needs to survive a reload of the environment it is loaded in (like a browser).
     * @returns {string}
     */
    getLoginToken(): string;
    /**
     * Attempt authentication against our API and store a token that the user can use for future authenticated requests
     * using oAuth.
     *
     * @param {string} email
     * @param {string} password
     */
    login(email: string, password: string): Promise<UserDTO>;
    /**
     * Perform an un-authenticated request to the API using POST. Note that although the request does not contain user
     * auth, we still send the client identifier.
     *
     * @param url
     * @param method
     * @param data
     * @param apiUrl
     * @returns {Promise<T>}
     */
    executeUnauthenticatedAPICall<T>(url: string, method: Method, data: any, apiUrl?: string): Promise<T>;
    /**
     * Perform an authenticated request to our API server that has data sent as a JSON object in the post body
     *
     * @param {string} url
     * @param {string} method
     * @param {object} data
     * @param apiUrl
     * @returns {Promise<T>}
     */
    executeAuthenticatedApiCall<T>(url: string, method: Method, data: object, apiUrl?: string): Promise<T>;
    logout(): Promise<void>;
}
