import { WebPartContext } from '@microsoft/sp-webpart-base'; import { BingQuerySearchParams, IRecentFile, ISearchResult } from './FilesSearchService.types'; export declare class FilesSearchService { private context; private bingAPIKey; constructor(context: WebPartContext, bingAPIKey: string); /** * Checks if file exists */ checkFileExists: (fileUrl: string) => Promise; /** * Executes Recent files search. */ executeRecentSearch: (accepts?: string[]) => Promise; /** * Executes bing search for a file. */ executeBingSearch: (queryParams: BingQuerySearchParams) => Promise; /** * Downloads document content from SP location. */ downloadSPFileContent: (absoluteFileUrl: string, fileName: string) => Promise; /** * Downloads document content from Remote location. */ downloadBingContent: (absoluteFileUrl: string, fileName: string) => Promise; /** * Parses Recent Search results. */ private parseRecentSearchResult; /** * Parses Bing search results. */ private parseBingSearchResult; /** * Builds a file filter using the accepted file extensions */ private _getFileFilter; /** * Removes protocol and retrieves only the domain, just like Bing search results does * in the SharePoint file picker * @param url The display url as provided by Bing */ private getDisplayUrl; }