UNPKG

@jorsek/ezd-client

Version:
32 lines (31 loc) 1.02 kB
import { Resource, IResourceArgs } from "./Resource"; import { IFacetValue, ISearchResponse } from "../Types"; export interface ISearchArgs extends IResourceArgs { rootMapId: string; } export interface IFacet { id: string; title: string; count: number; children: Array<IFacet>; } interface IInputSearchParams { queryString: string; page?: number; sectionPath?: string | string[]; facetRequests?: Array<any>; drilldowns?: Array<any>; } export declare class Search extends Resource { private searchFolders; private search_facets; private rootMapId; private rows_per_page; constructor({ rootMapId, axios, config }: ISearchArgs); get_search_facets(): Promise<Record<string, IFacetValue[]>>; get_results_per_page(): Promise<any>; get_facets(facetRequests: string[]): Promise<Array<IFacet>>; executeSearch({ queryString, page, sectionPath, facetRequests, drilldowns }: IInputSearchParams): Promise<ISearchResponse>; private setup_search; } export {};