import AxiosWrapper from '@gravity-ui/axios-wrapper'; import type { AxiosWrapperOptions } from '@gravity-ui/axios-wrapper'; import type { SchemaPathParam } from '../../types/api/common'; export type AxiosOptions = { concurrentId?: string; signal?: AbortSignal; withRetries?: boolean; timeout?: number; }; export type CsrfTokenGetter = () => string | undefined; export declare const CSRF_TOKEN_HEADER_NAME = "X-CSRF-Token"; export declare function getCsrfTokenFromCookie(cookieString?: string): string; export declare function isMutatingRequestMethod(method?: string): boolean; export interface BaseAPIParams { singleClusterMode: undefined | boolean; proxyMeta: undefined | boolean; useRelativePath: undefined | boolean; csrfTokenGetter: CsrfTokenGetter; } interface XhrLikeRequest { readyState: number; status: number; statusText?: string; responseText?: string; responseURL?: string; getAllResponseHeaders: () => string; } interface RecoveredNetworkResponse { status: number; statusText: string; data?: unknown; headers: Record; config: Record; request: XhrLikeRequest; code?: string; message?: string; } export declare function recoverXhrResponseFromNetworkError(error: unknown): RecoveredNetworkResponse | undefined; export declare function handleBaseApiResponseError(error: unknown): Promise; export declare class BaseYdbAPI extends AxiosWrapper { DEFAULT_RETRIES_COUNT: number; singleClusterMode: BaseAPIParams['singleClusterMode']; useRelativePath: BaseAPIParams['useRelativePath']; protected csrfTokenGetter: CsrfTokenGetter; constructor(axiosOptions: AxiosWrapperOptions, baseApiParams: BaseAPIParams); getPath(path: string, clusterNameOverride?: string): string; getSchemaPath(params?: SchemaPathParam): string | undefined; prepareArrayRequestParam(arr: (string | number)[]): string; protected getCsrfToken(): string | undefined; protected shouldUseCsrfTokenForRequest(method?: string, _url?: string): boolean; } export {};