uikit/dist/api.d.ts
Mohamadzadeh 43b4a2a42b
All checks were successful
Build and Deploy Next.js + Nginx Docker Image / build-and-deploy (push) Has been skipped
Build and Deploy Next.js + Nginx Docker Image / deploy (push) Has been skipped
refactor new BiProvider | v1.2.1
2026-10-26 13:58:14 +03:30

15 lines
692 B
TypeScript

import type { AxiosInstance, AxiosRequestConfig } from "axios";
export interface ApiProps {
baseUrl?: string;
auth?: boolean;
/** Modern API only. The legacy compatibility path retains automatic logout. */
logoutOnUnauthorized?: boolean;
onUnauthorized?: (error: unknown) => void;
axiosConfig?: AxiosRequestConfig;
/** Used only when Keycloak has no token. If also unavailable, the request is sent without a Bearer token. */
getToken?: () => string | null | Promise<string | null>;
}
export declare function Api(props: ApiProps): null;
export declare function useApi(): AxiosInstance;
export declare function fetcher<T = unknown>(api: AxiosInstance, url: string): Promise<T>;