import { type AxiosInstance, type InternalAxiosRequestConfig } from 'axios';
/**
 * Pre-authentication routes served by DynamicRouter. Receiving a 401 while the user
 * sits on one of these pages is expected — there is no session yet (account creation,
 * password reset, email confirmation, SSO landing…) — so the response interceptor must
 * NOT bounce them to /login. Keep in sync with the auth <Route> block in
 * components/routing/DynamicRouter.tsx.
 */
export declare const PUBLIC_PATHS: readonly ["/login", "/register", "/forgot-password", "/reset-password", "/confirm-email", "/force-change-password", "/sso", "/auth/callback", "/auth/onboarding"];
/**
 * Endpoints where a 401 is an expected, non-fatal outcome: the caller already handles
 * the empty/expired state locally, so a hard redirect to /login would be wrong.
 * `/api/auth/me` is the session probe fired on every app mount (AuthContext) — a 401
 * there simply means "no active session", not an error to react to.
 */
export declare const NON_CRITICAL_ENDPOINTS: readonly ["/api/auth/me", "/api/user/preferences", "/api/auth/session-info", "/api/auth/refresh", "/api/navigation/menu", "/api/navigation/favorites", "/api/navigation/contexts", "/api/onboarding/status", "/api/administration/tenants/tenant-analytics/track/"];
/**
 * Whether a 401 on the given request should force a redirect to /login.
 * False for non-critical endpoints (handled by their own callers) and for users
 * already on a public/pre-auth page where being unauthenticated is legitimate.
 */
export declare function shouldRedirectToLogin(requestUrl: string, pathname: string): boolean;
/**
 * Strip the default JSON Content-Type for FormData payloads.
 *
 * The instance below sets `Content-Type: application/json` as a default header on
 * every request. In axios 1.x, when that JSON content type is present on a request
 * whose body is FormData, `transformRequest` serializes the FormData to JSON
 * (`formDataToJSON`) instead of sending it as multipart — so the API rejects every
 * file upload with HTTP 415 (it binds `IFormFile`, which requires multipart/form-data).
 *
 * Setting Content-Type to `false` removes the header for that request and lets the
 * browser emit `multipart/form-data; boundary=...` itself. Applied globally here so
 * all current and future FormData uploads are correct (ticket attachments, branding
 * logos, theme assets, …) without each call site having to remember it.
 */
export declare function stripJsonContentTypeForFormData(config: InternalAxiosRequestConfig): void;
declare const apiClient: AxiosInstance;
export { apiClient };
export declare const api: {
    get: <T>(url: string, config?: Parameters<typeof apiClient.get>[1]) => Promise<T>;
    post: <T>(url: string, data?: unknown, config?: Parameters<typeof apiClient.post>[2]) => Promise<T>;
    put: <T>(url: string, data?: unknown, config?: Parameters<typeof apiClient.put>[2]) => Promise<T>;
    patch: <T>(url: string, data?: unknown, config?: Parameters<typeof apiClient.patch>[2]) => Promise<T>;
    delete: <T>(url: string, config?: Parameters<typeof apiClient.delete>[1]) => Promise<T>;
};
//# sourceMappingURL=apiClient.d.ts.map