import ExtendableError from 'es6-error'; import { JSONObject, JSONValue } from '@expo/json-file'; export declare class ApiV2Error extends ExtendableError { code: string; details?: JSONValue; serverStack?: string; readonly _isApiError = true; constructor(message: string, code?: string); } declare type RequestOptions = { httpMethod: 'get' | 'post' | 'put' | 'delete'; queryParameters?: QueryParameters; body?: JSONObject; }; declare type QueryParameters = { [key: string]: string | number | boolean | null | undefined; }; declare type APIV2ClientOptions = { sessionSecret?: string; }; export default class ApiV2Client { static exponentClient: string; sessionSecret: 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>; deleteAsync(methodName: string, extraOptions?: Partial<RequestOptions>, returnEntireResponse?: boolean): Promise<any>; _requestAsync(methodName: string, options: RequestOptions, extraRequestOptions?: Partial<RequestOptions>, returnEntireResponse?: boolean): Promise<any>; } export {};