import { ApiClientConfig } from "./types"; export const DEFAULT_CONFIG: ApiClientConfig = { baseUrl: "", defaultHeaders: { "Content-Type": "application/json", }, retry: { maxAttempts: 3, delayMs: 1000, statusCodes: [429, 500, 502, 503, 504], }, rateLimit: { maxRequests: 10, perMilliseconds: 5000, }, offline: { enabled: true, storageKey: "api_offline_requests", limit: 100, }, queue: { concurrency: 5, }, requestOptions: { timeout: 15000, priority: 5, retryable: true, offlineable: true, headers: {}, }, adapter: "fetch", }; export const ERROR_CLASSIFICATIONS = { NETWORK_FAIL: "NETWORK", TIMEOUT_REACHED: "TIMEOUT", TOO_MANY_REQUESTS: "RATE_LIMIT", SERVER_ERROR: "SERVER", CLIENT_ERROR: "CLIENT", UNKNOWN: "UNKNOWN", } as const;