/** * Represents a folder type in the filing plan, extending AbstractElement with confidentiality group information. */ export class TypeDossier extends AbstractElement { constructor({ code, label, parent, groupConfidentiel, alive }: { code: any; label: any; parent: any; groupConfidentiel: any; alive?: boolean; }); /** * @type {string[]} */ groupConfidentiel: string[]; code: any; label: any; parent: any; isConfidentiel(): boolean; } /** * Represents a document nature in the filing plan, extending AbstractElement with basic properties. */ export class NatureDocument extends AbstractElement { constructor({ code, label, parent, hide }: { code: any; label: any; parent: any; hide?: boolean; }); code: any; label: any; parent: any; } declare const _default: FilingPlanService; export default _default; /** * Represents an abstract element with a unique code and label, optionally associated with a parent. */ declare class AbstractElement { /** * Vrai si présent dans le plan de classement. * Faux indique que c'est un type ou nature hors plan de classement * @type {boolean} */ alive: boolean; /** * Vrai l'element doit être visible / affiché à l'utilisateur * @type {boolean} */ hide: boolean; /** * Code du dossier, doit être unique dans le plan de classement * @type {string} */ code: string; /** * Libellé du dossier, doit être unique dans le plan de classement * @type {string} */ label: string; /** * Libellé du dossier, parent (optional) * @type {string} */ parent: string; } /** * This class contains functions need to load and look in the filing plan. * * Pour chaque fonction on doit fournir l’identifiant du plan de classement * car l'utilisateur peut naviguer sur plusieurs espaces en même temps. * * Pour s'assurer que loadPlanClassement a été appelé au moins une fois, on utilise `waitLoading()` */ declare class FilingPlanService { app: string; loading: boolean; /** * Ensemble des filing plans sous format de map "id du plan" => [liste des types de dossiers] * @type {Object} */ filingPlans: any; natures: {}; /** * Loads the filing plan for a specific space. * The filing plan is kept in memory for 8 hours, as users can navigate through * multiple sites with different filing plans, so multiple plans are cached. * @param {string} planType - The identifier of the plan to load * @returns {Promise} A promise that resolves when the plan is loaded */ loadPlanClassement(planType: string): Promise; /** * Retrieves a folder type from the filing plan by its code. * @param {string} planType - The identifier of the filing plan * @param {string} code - The unique code of the folder type to retrieve * @returns {TypeDossier} An array of matching folder types */ getTypeDossier(planType: string, code: string): TypeDossier; /** * Retrieves a folder type from the filing plan by its code. * @param {string} planType - The identifier of the filing plan * @param {string} label - The unique label of the folder type to retrieve * @returns {TypeDossier} An array of matching folder types */ getTypeDossierFromLabel(planType: string, label: string): TypeDossier; _findPlan(planType: any, filter: any): any; _assertPlanExist(planType: any): void; /** * Retrieves the plan of the specified type, applying confidentiality filters based on user groups. * * @param {string} planType - The type of the plan to retrieve. * @return {TypeDossier[]} A promise resolving to an array of filtered plan items or null if the plan type is not loaded. */ getPlan(planType: string): TypeDossier[]; /** * Retourne une promesse contenant la liste des dossiers filtrés selon les droits de l'utilisateur. * * Cette méthode vérifie si le plan de classement demandé est chargé. * Si oui, elle récupère les groupes de l'utilisateur via le service `peopleService`, * puis filtre les dossiers du plan : * - Si un dossier est marqué comme confidentiel (`groupConfidentiel`), * il n'est retourné que si l'utilisateur appartient au groupe correspondant. * - Les dossiers non confidentiels sont toujours retournés. * * @param {string} planType - Le type du plan de classement à filtrer. * @returns {Promise} Une promesse qui résout en un tableau de dossiers filtrés, * ou `null` si le plan de classement n'est pas chargé. */ getFilteredPlan(planType: string): Promise; /** * Retrieves a folder type from the filing plan by its code. * @param {string} planType - The identifier of the filing plan * @param {string} code - The unique code of the folder type to retrieve * @returns {NatureDocument} An array of matching folder types */ getNatureDocument(planType: string, code: string): NatureDocument; /** * Retrieves the nature configuration for the specified plan type. * * @param {string} planType - The type of plan for which the nature configuration is required. * @return {NatureDocument[]} The nature configuration for the provided plan type, or null if not found. */ getNatures(planType: string): NatureDocument[]; /** * Retourne les natures activées (non cachées) pour un type de plan donné. * * @param {string} planType - Le type de plan dont on veut récupérer les natures. * @returns {Array|null} Un tableau des natures où `hide` est false, ou null si le plan n'existe pas. */ getEnabledNatures(planType: string): Array | null; /** * Détermine le TypeDossier de ce folder. * * Si le code et le nom correspondent au plan de classement, alors alive=true. * @param {string} planType - The identifier of the filing plan * @param file * @return {Promise} */ getTypeDossierOfNode(planType: string, file: any): Promise; /** * Retrieves the folder name from the specified file's path. * * @param {Object} file - The file object containing the path information. * @param {Object} file.path - The path object within the file. * @param {Array} file.path.elements - An array of path elements representing the file path. * @param {Object} file.path.elements[].name - The name of the folder or file for each path element. * @return {string|null} The name of the folder, or null if the path is not provided. */ getFolderNameFromPath(file: { path: { elements: any[]; }; }): string | null; /** * Generates a structured array of tree nodes based on the given plan type. * * * @param {string} planType - The type of plan to be used for generating tree nodes. * @return {TreeNode[]} An array of tree node objects, where each node contains properties such as id, key, label, children, and metadata like `isFolder`, `confidentiel`, and icon information. */ treeNodes(planType: string): TreeNode[]; } //# sourceMappingURL=FilingPlanService.d.ts.map