/// <reference types="node" />
import * as http from 'http';
import { AuthenticationError } from '../errors';
/**
 * oauth2 error.
 *
 * @export
 * @class OAuth2Error
 * @extends {AuthenticationError}
 */
export declare class OAuth2Error extends AuthenticationError {
    constructor(status: number, message: string, error_description?: string);
    static ρAnn(): any;
}
/**
 * oauth2
 *
 * @export
 * @class OAuth2
 */
export declare class OAuth2 {
    private clientId;
    private clientSecret;
    private baseSite;
    private authorizeUrl;
    private accessTokenUrl;
    private customHeader;
    private accessTokenName;
    private authMethod;
    private useAuthorizationHeaderForGET;
    private agent;
    
    Agent:http.Agent;
    
    AccessTokenName:string;
    
    AuthMethod:string;
    
    UseAuthorizationHeaderForGET:boolean;
    readonly ClientId:string;
    readonly AuthorizeUrl:string;
    private get AccessTokenUrl();
    constructor(clientId: string, clientSecret: string, baseSite: string, authorizeUrl?: string, accessTokenUrl?: string, customHeader?: any);
    buildAuthHeader(token: string): string;
    getAuthorizeUrl(params?: any): string;
    getOAuthAccessToken(code: any, params?: any): Promise<{
        accessToken: any;
        refreshToken: any;
        result: any;
    }>;
    get(url: string, accessToken: string): Promise<{
        result: string;
        response: any;
    }>;
    request(method: string, url: string, headers?: any, postBody?: string | Buffer, accessToken?: string): Promise<{
        result: string;
        response: any;
    }>;
    private executeRequest;
    static ρAnn(): any;
}
