/** * Custom fetch mutator for Orval-generated code. * Handles: * - Base URL configuration * - Authentication token injection * - Response parsing (JSON, Blob, Text) * * Entity ID is passed via headers in individual requests: * sdk.invoices.createInvoice(data, { headers: { 'x-entity-id': 'entity-123' } }) */ export interface FetchConfig { baseUrl: string; getAccessToken: () => string | Promise; clientName?: string; onUnauthorized?: (response: Response) => void; } export declare function setFetchConfig(config: FetchConfig): void; /** * Set the global account ID for multi-account support. * When set, x-account-id header is automatically added to all SDK requests. */ export declare function setAccountId(id: string | null): void; export declare function getAccountId(): string | null; export declare function getFetchConfig(): FetchConfig; /** * SDK Error class for API errors */ export declare class SDKError extends Error { status: number; statusText: string; body: unknown; constructor(status: number, statusText: string, body: unknown); } /** * Custom fetch implementation used by all generated API functions. * This is the mutator function that Orval will use for all API calls. * * Returns an object with { data, status, headers } to match the expected response type. */ export declare function customFetch(url: string, options: RequestInit): Promise; export default customFetch; //# sourceMappingURL=custom-fetch.d.ts.map