import type { Logger } from 'pino';
import type { AsyncThunkOptions } from '../../../app/async-thunk-options.js';
import type { ClientThunkExtraArguments } from '../../../app/thunk-extra-arguments.js';
import type { InsightAppState } from '../../../state/insight-app-state.js';
import type { PreprocessRequest } from '../../preprocess-request.js';
import { type HtmlAPIClientOptions } from '../../search/html/html-api-client.js';
import type { HtmlRequest } from '../../search/html/html-request.js';
import type { QuerySuggestSuccessResponse } from '../../search/query-suggest/query-suggest-response.js';
import type { SearchResponseSuccess } from '../../search/search/search-response.js';
import { type SearchOptions } from '../../search/search-api-client.js';
import { type GetInsightInterfaceConfigRequest } from './get-interface/get-interface-config-request.js';
import type { GetInsightInterfaceConfigResponse } from './get-interface/get-interface-config-response.js';
import { type InsightQueryRequest } from './query/query-request.js';
import type { InsightQuerySuggestRequest } from './query-suggest/query-suggest-request.js';
import { type InsightUserActionsRequest } from './user-actions/user-actions-request.js';
import type { InsightUserActionsResponse } from './user-actions/user-actions-response.js';
/**
 * Initialization options for the `InsightAPIClient`.
 */
export interface InsightAPIClientOptions extends HtmlAPIClientOptions {
    logger: Logger;
    preprocessRequest: PreprocessRequest;
}
export interface AsyncThunkInsightOptions<T extends Partial<InsightAppState>> extends AsyncThunkOptions<T, ClientThunkExtraArguments<InsightAPIClient>> {
    rejectValue: InsightAPIErrorStatusResponse;
}
export type InsightAPIResponse<TSuccessContent> = InsightAPISuccessResponse<TSuccessContent> | InsightAPIErrorResponse;
export interface InsightAPISuccessResponse<TContent> {
    success: TContent;
}
export interface InsightAPIErrorStatusResponse {
    statusCode: number;
    message: string;
    type: string;
    ignored?: boolean;
}
export interface InsightAPIErrorResponse {
    error: InsightAPIErrorStatusResponse;
}
/**
 * The client to use to interact with the Insight API.
 */
export declare class InsightAPIClient {
    private options;
    constructor(options: InsightAPIClientOptions);
    getInterface(req: GetInsightInterfaceConfigRequest): Promise<InsightAPIResponse<GetInsightInterfaceConfigResponse>>;
    query(req: InsightQueryRequest, options?: SearchOptions): Promise<InsightAPIResponse<SearchResponseSuccess>>;
    querySuggest(req: InsightQuerySuggestRequest): Promise<InsightAPIResponse<QuerySuggestSuccessResponse>>;
    userActions(req: InsightUserActionsRequest): Promise<InsightAPIResponse<InsightUserActionsResponse>>;
    html(req: HtmlRequest): Promise<{
        success: string;
        error?: undefined;
    } | {
        error: import("../../search/search-api-error-response.js").SearchAPIErrorWithStatusCode;
        success?: undefined;
    }>;
}
