import { NodeEntry } from '@alfresco/js-api'; declare const _default: UserViewService; export default _default; /** * Service for managing user views, both personal and global. */ declare class UserViewService { /** * Retrieves the user's hidden 'Configuration' folder. * If the folder doesn't exist and `createIfMissing` is true, it will be created. * @param {string} userId - The ID of the user. * @param {boolean} [createIfMissing=false] - Whether to create the folder if it's not found. * @returns {Promise} The hidden folder node object, or null if not found and not created. * @private */ private _getHiddenFolder; /** * Retrieves or creates the 'savedViews.json' file within the user's hidden configuration folder. * @param {string} hiddenFolderId - The ID of the hidden configuration folder. * @param {boolean} [createIfMissing=false] - Whether to create the file if it's not found. * @returns {Promise} The file node object, or null if not found and not created. * @private */ private _getOrCreateViewsFile; getContent(nodeId: any, versionId: any, attachment: any): Promise; /** * Parses the JSON content of a given file node. * @returns {Promise} The parsed JSON object. * @private */ private _parseFileContent; /** * Normalizes the saved views file content to the latest object format. * This handles backward compatibility for the old array-based format. * @param {Object|Array} fileContent - The raw content from the saved views file. * @returns {{personalSavedView: Array, globalFavoriteView: Array}} The normalized content. * @private */ private _normalizeFileContent; /** * Charge le contenu brut du fichier des vues enregistrées pour l'utilisateur courant. * Vérifie l'existence de l'utilisateur, du dossier caché et du fichier de vues. * @private * @returns {Promise} Le contenu du fichier parsé ou `null` si absent. * @throws {Error} Si l'utilisateur n'est pas trouvé. */ private _loadViewsFileContent; /** * Récupère la liste des vues personnelles de l'utilisateur courant. * Utilise le fichier de configuration stocké dans le dossier caché. * @returns {Promise} Tableau d'objets représentant les vues sauvegardées. * Renvoie `[]` si aucune vue n'est trouvée ou en cas d'erreur. */ getPersonalViews(): Promise; /** * Récupère l'intégralité du fichier de configuration des vues de l'utilisateur, * comprenant à la fois les vues personnelles et les vues favorites globales. * @returns {Promise} Un objet contenant deux propriétés : * - `personalSavedView`: {Array} liste des vues personnelles * - `globalFavoriteView`: {Array} liste des vues globales favorites * Renvoie un objet vide si aucune donnée n'est trouvée ou en cas d'erreur. */ getPersonalViewsAndGlobalFavorites(): Promise; /** * Retrieves all global views from vue-*.json config files. * Falls back to SAVED_VIEWS_GLOBAL from env-config.json for backward compatibility. * @returns {Promise} A list of global saved views. */ getGlobalViews(): Promise; /** * Creates the hidden 'Configuration' folder in the user's home folder. * @param {string} homeFolderId - The ID of the user's home folder. * @returns {Promise} The created folder node object. */ createConfigFolder(homeFolderId: string): Promise; _savePersonalView(viewToSave: any): Promise; /** * Saves a new personal view for the current user. * @param {Object} viewToSave - The view object to save. * @returns {Promise} */ saveView(viewToSave: any): Promise; _updatePersonalView(viewToUpdate: any): Promise< NodeEntry>; /** * Updates an existing personal saved view. * @param {Object} viewToUpdate - The view object with updated information. * @returns {Promise} The updated node object from Alfresco. */ updateView(viewToUpdate: any): Promise; _deletePersonalView(viewToDelete: any): Promise; /** * Deletes a personal saved view. * @param {Object} viewToDelete - The view object to delete. * @returns {Promise} */ deleteView(viewToDelete: any): Promise; /** * Retrieves a specific saved view by its ID and scope. * @param {'user'|'global'} scope - The scope of the view. * @param {string} viewId - The ID of the view to retrieve. * @returns {Promise} The found view object, or null. */ getViewById(scope: "user" | "global", viewId: string): Promise; /** * Toggles the favorite status of a saved view. * For personal views, it updates the `isFavorite` flag on the view object itself. * For global views, it adds/removes a reference in the user's personal `globalFavoriteView` list. * @param {Object} viewToEdit - The view object to toggle. * @returns {Promise} The updated view object. */ toggleFavoriteStatus(viewToEdit: any): Promise; } //# sourceMappingURL=UserViewService.d.ts.map