/** * Base API Client - Shared HTTP functionality for all API clients. */ import { QueryClient } from "@tanstack/query-core"; import { API_URLS, STALE_TIMES, GC_TIMES, HttpError } from "./shared-types.cjs"; import type { ApiPlatformClientOptions } from "./shared-types.cjs"; export declare const authQueryKeys: { readonly bearerToken: () => readonly unknown[]; }; export type { ApiPlatformClientOptions }; /** * Internal fetch options for HTTP requests. */ export type InternalFetchOptions = { signal?: AbortSignal; params?: Record; }; /** * Base API Client with shared HTTP and caching functionality. * Extended by all specific API clients. */ export declare class BaseApiClient { #private; protected readonly clientProduct: string; protected readonly clientVersion?: string; protected readonly getBearerToken?: () => Promise; /** * Get the underlying QueryClient instance. * Exposed for cache management operations. * * @returns The QueryClient instance. */ get queryClient(): QueryClient; /** * Invalidate the cached auth token. * Call this when the user logs out or the token expires. * * Uses resetQueries() instead of invalidateQueries() to completely remove * the cached value, ensuring the next request fetches a fresh token immediately. */ invalidateAuthToken(): Promise; constructor(options: ApiPlatformClientOptions); /** * Internal HTTP fetch method with authentication and error handling. * * @param baseUrl - The base URL for the API. * @param path - The API endpoint path. * @param options - Optional fetch configuration. * @returns The parsed JSON response. */ protected fetch(baseUrl: string, path: string, options?: InternalFetchOptions): Promise; } export { API_URLS, STALE_TIMES, GC_TIMES, HttpError }; //# sourceMappingURL=base-client.d.cts.map