import { IDataSourceData } from "src/models/common/IDataSourceData"; /** * Fields to be added dynamically to search results */ export declare enum SearchResponseEnhancedFields { FileTypeFamily = "filefamily", ThumbnailUrl = "thumbnailUrl", PreviewUrl = "previewUrl", IsCustomApp = "iscustomapp" } /** * Well known SharePoint managed properties (lower cased) */ export declare enum WellKnownSearchProperties { FileType = "filetype", MSSearchFileType = "mssearchfiletype", Title = "title", Summary = "summary", NormListID = "normlistid", NormUniqueID = "normuniqueid", NormSiteID = "normsiteid", DriveId = "driveId" } export declare const sanitizeSummary: (summary: string) => string; export declare class SearchResultsHelper { private controller; static readonly FileTypeAssociations: { word: string[]; excel: string[]; powerpoint: string[]; onenote: string[]; text: string[]; visio: string[]; webpage: string[]; pdf: string[]; archive: string[]; video: string[]; }; /** * Get the file famnily for its extension * @param fileExtension the file extension * @returns the file family corresponding to this extensions */ private getFileIconType; enhanceResults(items: { [key: string]: any; }[], selectedFields: string[], isWildcard?: boolean): Promise; abortRequest(): void; private getThumbnailUrls; private getPreviewUrls; /** * Build and send a Microsoft Graph batch request from items data * @param items items data to build the batch requests * @param batchRequestConditionCallback the condition for a batch request to be perfomed (ex. required fields on a item) * @param batchRequestBodyCallabck the batch request body to pass according to item * @param batchResponseValueCallback the property to use as returned value from the batch HTTP call response. This callback is only called when the HTTP response succeedeed (i.e. HTTP 200). * @returns an hashtable mapping batch id (the one you set as batch request id) and the value returned by the 'propertyValueCallback' callback */ private getItemsByBatch; private isCustomApp; /** * Retrieves the available fields from results * @param data the current data */ getAvailableFieldsFromResults(data: IDataSourceData): string[]; }