export type ApiMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
export interface ApiCallOptions {
  operation: string;
  errorMessage: string;
  baseUrl?: string;
  headers?: Record<string, string>;
  body?: unknown;
  emptyResponse?: boolean;
}
export declare class ApiError extends Error {
  readonly status: number;
  readonly statusText: string;
  readonly problem: unknown;
  constructor(opts: {
    operation: string;
    status: number;
    statusText: string;
    problem: unknown;
  });
}
export interface ApiClient {
  request<T = unknown>(
    method: ApiMethod,
    path: string,
    options: ApiCallOptions
  ): Promise<T>;
  get<T = unknown>(path: string, options: ApiCallOptions): Promise<T>;
  post<T = unknown>(path: string, options: ApiCallOptions): Promise<T>;
  put<T = unknown>(path: string, options: ApiCallOptions): Promise<T>;
  patch<T = unknown>(path: string, options: ApiCallOptions): Promise<T>;
  delete<T = unknown>(path: string, options: ApiCallOptions): Promise<T>;
}
export declare function createApiClient({
  authToken,
  baseUrl,
}: {
  authToken: string;
  baseUrl?: string;
}): ApiClient;
//# sourceMappingURL=client.d.ts.map
