cozy-dataproxy-lib
Version:
Library meant to be by Cozy Cloud's DataProxy apps for data manipulation
16 lines (15 loc) • 770 B
TypeScript
import { IOCozyFile } from 'cozy-client/types/types';
import { CozyDoc } from '../types';
/**
* Normalize file for Front usage in <AutoSuggestion> component inside <BarSearchAutosuggest>
*
* To reduce API call, the fetching of Note URL has been delayed
* inside an onSelect function called only if provided to <BarSearchAutosuggest>
* see https://github.com/cozy/cozy-drive/pull/2663#discussion_r938671963
*
* @param {[IOCozyFile]} folders - all the folders returned by API
* @param {IOCozyFile} file - file to normalize
* @returns file with normalized field to be used in AutoSuggestion
*/
export declare const normalizeFileWithFolders: (folders: IOCozyFile[], file: IOCozyFile) => CozyDoc;
export declare const shouldKeepFile: (file: IOCozyFile) => boolean;