import { BaseResourceWithId } from "../../common";
import { APISearchResponse, APISearchResult, Highlight, SearchResponse, SearchResultType } from "./interfaces";
import { CancelToken } from "axios";
export declare class SearchResult extends BaseResourceWithId {
    /**
     * Search result name.
     */
    name: string;
    /**
     * Search result type.
     */
    type: SearchResultType;
    /**
     * Search result highlight.
     */
    highlight: Highlight;
    constructor(name: string, type: SearchResultType, highlight: Highlight);
    /**
     * Name of the resource.
     */
    static get resourceName(): string;
    /**
     * The name of the service the resource belongs to.
     */
    static get serviceName(): string;
    /**
     * Create a search-result from the API server data.
     *
     * @param data Data from the api server.
     *
     * @returns The search-result object.
     */
    static apiFactory(data: APISearchResult): SearchResult;
    /**
     * Create a search-response from the API server data.
     *
     * @param data Data from the api server.
     *
     * @returns The search-response object.
     */
    static searchResponseApiFactory(data: APISearchResponse): SearchResponse;
    /**
     * Searches for suggestions by the query.
     *
     * @param query Query string.
     * @param pageSize Optional amount of elements to be returned.
     */
    static suggest(query: string, pageSize?: number, cancelToken?: CancelToken): Promise<SearchResult[]>;
    /**
     * Returns list of items that match the query arguments
     *
     * @param args Query arguments object.
     */
    static query(args: {
        query: string;
        type?: SearchResultType[];
        page?: number;
        pageSize?: number;
        facet?: "type";
    }, cancelToken?: CancelToken): Promise<SearchResponse>;
}
