UNPKG

@sysdoc/sharepoint-utils

Version:

Sysdoc's core Sharepoint utilities

25 lines (24 loc) 979 B
/*! * Copyright Sysdoc @ 2019 */ import { ISearchProvider } from "../../search/ISearchProvider"; import { ISearchQuery as ISYSSearchQuery } from "../../search/ISearchQuery"; import { ISearchResultPageModel } from "../../search/ISearchResultPageModel"; export interface ISPSearchProviderConfig { sourceId?: string; queryExtra?: string; resultsTransformer?(result: any): any; disableScroll?: boolean; } export declare class SPSearchProvider implements ISearchProvider<any> { queryExtra?: string; sourceId?: string; disableScroll?: boolean; constructor(config?: ISPSearchProviderConfig); resultsTransformer?(result: any): any; getSuggestions(query: ISYSSearchQuery | string, includePeople?: boolean): Promise<any[]>; getResultCount(query: ISYSSearchQuery): Promise<number>; search(query: ISYSSearchQuery | string): Promise<ISearchResultPageModel<any>>; private prepareQuery; private performSearch; }