import { ValidationError, WithValidationError } from "./types/withValidationError"; import { ResponseError } from "./responseError"; import { ApiVersion } from "./apiClient"; export declare const getHost: (host?: string) => string; declare type Method = "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; export interface ApiCallOptions extends Omit { accessToken?: string; headers?: Record; host?: string; } interface RequestOptions extends ApiCallOptions { apiVersion?: ApiVersion; isAuthorizedRequest?: boolean; } export declare const fetchPath: ({ path, body, options, }: { path: string; body?: string; options: RequestOptions & { method?: Method; }; }) => Promise; export declare const postData: ({ path, body, options, }: { path: string; body: object; options: RequestOptions; }) => Promise; export declare const putData: ({ path, body, options, }: { path: string; body: object; options: RequestOptions; }) => Promise; export declare const deletePath: ({ path, options, }: { path: string; options: RequestOptions; }) => Promise; interface ErrorHandlerOptions { swallowErrors?: boolean; } export declare const handleValidationError: (error: any, options?: ErrorHandlerOptions) => Promise; export declare function ignoreServerSideErrors({ error, returnValue, errorHandlerOptions, }: { error: ResponseError; returnValue: T; errorHandlerOptions?: ErrorHandlerOptions; }): Promise>; export {};