import type { VextClientContract, VextClientRouteMethod } from "./types.js"; type VextHeadersInit = ConstructorParameters[0]; type RoutesByMethod = Extract; type PathFor = RoutesByMethod["path"] & string; export interface VextApiClientOptions { baseUrl?: string; fetch?: typeof fetch; headers?: VextHeadersInit; } export interface VextApiRequestOptions { params?: Record; query?: Record>; body?: unknown; headers?: VextHeadersInit; signal?: AbortSignal; } export declare class VextApiError extends Error { readonly name = "VextApiError"; readonly status: number; readonly code: unknown; readonly details: unknown; readonly response: Response; readonly rawBody: unknown; constructor(args: { status: number; message: string; response: Response; rawBody: unknown; code?: unknown; details?: unknown; }); } export declare function isVextApiError(error: unknown): error is VextApiError; export interface VextApiClient { readonly contract: TContract; request(method: TMethod, path: PathFor, options?: VextApiRequestOptions): Promise; GET(path: PathFor, options?: VextApiRequestOptions): Promise; POST(path: PathFor, options?: VextApiRequestOptions): Promise; PUT(path: PathFor, options?: VextApiRequestOptions): Promise; PATCH(path: PathFor, options?: VextApiRequestOptions): Promise; DELETE(path: PathFor, options?: VextApiRequestOptions): Promise; } export declare function createVextApiClient(contract: TContract, options?: VextApiClientOptions): VextApiClient; export {};