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`. */ interface InsightAPIClientOptions extends HtmlAPIClientOptions { logger: Logger; preprocessRequest: PreprocessRequest; } export interface AsyncThunkInsightOptions> extends AsyncThunkOptions> { rejectValue: InsightAPIErrorStatusResponse; } type InsightAPIResponse = InsightAPISuccessResponse | InsightAPIErrorResponse; interface InsightAPISuccessResponse { success: TContent; } export interface InsightAPIErrorStatusResponse { statusCode: number; message: string; type: string; ignored?: boolean; } 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>; query(req: InsightQueryRequest, options?: SearchOptions): Promise>; querySuggest(req: InsightQuerySuggestRequest): Promise>; userActions(req: InsightUserActionsRequest): Promise>; html(req: HtmlRequest): Promise<{ success: string; error?: undefined; } | { error: import("../../search/search-api-error-response.js").SearchAPIErrorWithStatusCode; success?: undefined; }>; } export {};