import { JSONObject, JSONValue } from '@expo/json-file';
import FormData from 'form-data';
export declare const MAX_CONTENT_LENGTH: number;
export declare const MAX_BODY_LENGTH: number;
export declare class ApiV2Error extends Error {
    readonly name = "ApiV2Error";
    code: string;
    details?: JSONValue;
    serverStack?: string;
    metadata?: object;
    readonly _isApiError = true;
    constructor(message: string, code?: string);
}
declare type RequestOptions = {
    httpMethod: 'get' | 'post' | 'put' | 'patch' | 'delete';
    queryParameters?: QueryParameters;
    body?: JSONObject;
    timeout?: number;
};
declare type UploadOptions = {
    headers: any;
    data: any;
};
declare type QueryParameters = {
    [key: string]: string | number | boolean | null | undefined;
};
declare type APIV2ClientOptions = {
    sessionSecret?: string;
    accessToken?: string;
};
export default class ApiV2Client {
    static exponentClient: string;
    sessionSecret: string | null;
    accessToken: string | null;
    static clientForUser(user?: APIV2ClientOptions | null): ApiV2Client;
    static setClientName(name: string): void;
    constructor(options?: APIV2ClientOptions);
    getAsync(methodName: string, args?: QueryParameters, extraOptions?: Partial<RequestOptions>, returnEntireResponse?: boolean): Promise<any>;
    postAsync(methodName: string, data?: JSONObject, extraOptions?: Partial<RequestOptions>, returnEntireResponse?: boolean): Promise<any>;
    putAsync(methodName: string, data: JSONObject, extraOptions?: Partial<RequestOptions>, returnEntireResponse?: boolean): Promise<any>;
    patchAsync(methodName: string, data: JSONObject, extraOptions?: Partial<RequestOptions>, returnEntireResponse?: boolean): Promise<any>;
    deleteAsync(methodName: string, args?: QueryParameters, extraOptions?: Partial<RequestOptions>, returnEntireResponse?: boolean): Promise<any>;
    uploadFormDataAsync(methodName: string, formData: FormData): Promise<any>;
    _requestAsync(methodName: string, options: RequestOptions, extraRequestOptions?: Partial<RequestOptions>, returnEntireResponse?: boolean, uploadOptions?: UploadOptions): Promise<any>;
}
export {};
