import { ErrorResponse } from '../v1/error'; export interface API { baseUrl: string; token: string | null; } export declare function makeAPI(baseUrl: string, token?: string): API; export declare class APIError extends Error { readonly response: ErrorResponse; constructor(response: ErrorResponse, code?: number, message?: string); } export declare enum ContentType { JSON = "application/json", GZIP = "application/a-gzip" } interface APIOptions { query?: object; body?: object; contentType?: ContentType; } export declare function HEAD(api: API, path: string, options?: APIOptions): Promise; export declare function GET(api: API, path: string, options?: APIOptions): Promise; export declare function POST(api: API, path: string, options?: APIOptions): Promise; export declare function PUT(api: API, path: string, options?: APIOptions): Promise; export declare function PATCH(api: API, path: string, options?: APIOptions): Promise; export declare function DELETE(api: API, path: string, options?: APIOptions): Promise; export {};