import { SERVICES } from '../constants';
export { SERVICES };
import { type BaseQueryFn, type FetchArgs, type FetchBaseQueryError, type FetchBaseQueryMeta } from '@reduxjs/toolkit/query';
type CustomError = {
    status: number;
    error: string | object;
};
/**
 * Get the service URL based on the provided service type.
 */
export declare const getServiceUrl: (service: SERVICES) => string;
/**
 * Get the headers required for API requests based on the provided service type.
 */
export declare const getHeaders: (service: SERVICES) => Promise<{
    Authorization: string;
} | undefined>;
/**
 * Build a generic RTK Query endpoint from a service function.
 * Includes built-in retry with exponential backoff (since RTK Query
 * skips baseQuery retry for queryFn endpoints).
 */
export declare const buildEndpointFromService: <Args extends Record<string, unknown>, Result>(service: SERVICES, serviceFn: (args: Args) => Promise<Result>, options?: {
    maxRetries?: number;
}) => {
    queryFn: BaseQueryFn<Args, Result, FetchBaseQueryError | CustomError>;
};
/**
 * Shortcut for building an endpoint using the DM service.
 */
export declare const buildEndpointFromDmService: <Args extends Record<string, unknown>, Result>(serviceFn: (args: Args) => Promise<Result>, options?: {
    maxRetries?: number;
}) => {
    queryFn: BaseQueryFn<Args, Result, FetchBaseQueryError | CustomError>;
};
/**
 * Shortcut for building an endpoint using the AXD service.
 */
export declare const buildEndpointFromAxdService: <Args extends Record<string, unknown>, Result>(serviceFn: (args: Args) => Promise<Result>, options?: {
    maxRetries?: number;
}) => {
    queryFn: BaseQueryFn<Args, Result, FetchBaseQueryError | CustomError>;
};
export interface CustomQueryArgs extends Omit<FetchArgs, 'url'> {
    url: string;
    service: SERVICES;
    isJson?: boolean;
    contentType?: string;
    skipAuth?: boolean;
}
export type ExtendedFetchBaseQueryError = FetchBaseQueryError & {
    data?: {
        detail?: string;
        message?: string;
        error?: string;
        error_description?: string;
    } | string;
};
export declare const iblFetchBaseQuery: BaseQueryFn<CustomQueryArgs, unknown, ExtendedFetchBaseQueryError, Record<string, unknown>, FetchBaseQueryMeta>;
/**
 * Build a generic RTK Query endpoint from a service function (legacy variant).
 * Includes built-in retry with exponential backoff.
 */
export declare const buildEndpointFromServiceLegacy: <Args extends any[], Result>(service: SERVICES, serviceFn: (...args: Args) => Promise<Result>, options?: {
    maxRetries?: number;
}) => {
    queryFn: BaseQueryFn<Args, Result, FetchBaseQueryError | CustomError>;
};
/**
 * Shortcut for building an endpoint using the DM service.
 */
export declare const buildEndpointFromDmServiceLegacy: <Args extends any[], Result>(serviceFn: (...args: Args) => Promise<Result>, options?: {
    maxRetries?: number;
}) => {
    queryFn: BaseQueryFn<Args, Result, FetchBaseQueryError | CustomError>;
};
/**
 * Shortcut for building an endpoint using the AXD service.
 */
export declare const buildEndpointFromAxdServiceLegacy: <Args extends any[], Result>(serviceFn: (...args: Args) => Promise<Result>, options?: {
    maxRetries?: number;
}) => {
    queryFn: BaseQueryFn<Args, Result, FetchBaseQueryError | CustomError>;
};
