import { Rubrique } from '../stores/class/rubrique/rubrique'; import { Rubriquage } from '../stores/class/rubrique/rubriquage'; import { APIOptions } from './classicApi'; /** * Find rubriquages according to criterias * @param organisationIds List of organisation IDs for which to retrieve the * rubriquage * @param searchOptions Additional search options */ declare function searchRubriquages(organisationIds: Array, searchOptions?: { rubriquageId?: number; organisationId?: string | Array; query?: string; }, options?: APIOptions): Promise>; /** * Find rubriquages according to criterias * @param organisationId ID of the organisation for which to retrieve the rubriquage * @returns The found rubriquage */ declare function findRestrictiveRubriquage(organisationId: string): Promise; /** * Create a new rubriquage * @param data The new rubriquage data * @returns The created rubriquage */ declare function createRubriquage(data: Omit): Promise; /** * Fetch rubriquage data by ID * @param rubriquageId ID of the rubriquage to fetch * @returns The rubriquage */ declare function getRubriquage(rubriquageId: number): Promise; /** * Update the values of the rubriquage * @param data The new rubriquage data * @returns The updated rubriquage */ declare function updateRubriquage(data: Rubriquage): Promise; /** * Delete a rubriquage * @param data Either the rubriquage to delete, or its ID * @returns An empty promise */ declare function deleteRubriquage(data: Rubriquage | number): Promise; declare function searchRubriques(searchOptions?: { rubriquageId?: number; organisationId?: string | Array; query?: string; }): Promise>; /** * Fetch rubrique data by ID * @see getCachedRubrique * @param rubriqueId ID of the rubrique to fetch * @returns The rubrique */ declare function getRubrique(rubriqueId: number): Promise; /** * Fetch rubrique data by ID * If the rubrique is available in the cache, return it from the cache * @param rubriqueId ID of the rubrique to fetch * @returns The rubrique */ declare function getCachedRubrique(rubriqueId: number): Promise; /** * List the rubrique IDS associated to the given user * @param userId The ID of the user for which to retrieve this data * @returns The list of IDs of rubriques */ declare function listUserScope(userId: string): Promise>; /** * List the user IDS associated to the given rubrique * @param rubriqueId The ID of the rubrique for which to retrieve this data * @returns The list of IDs of users */ declare function listUsersScopedByRubrique(rubriqueId: string): Promise>; /** * Update the associated rubriques to the user * @param userId The ID of the user for which to change the rights scope * @param previousScope Previous rubrique IDs * @param rubriqueIds New rubrique IDs to set * @returns A promise */ declare function setUserScope(userId: string, previousScope: Array, rubriqueIds: Array): Promise; export declare const rubriquesApi: { createRubriquage: typeof createRubriquage; findRestrictiveRubriquage: typeof findRestrictiveRubriquage; getRubriquage: typeof getRubriquage; getRubrique: typeof getRubrique; getCachedRubrique: typeof getCachedRubrique; searchRubriquages: typeof searchRubriquages; searchRubriques: typeof searchRubriques; updateRubriquage: typeof updateRubriquage; deleteRubriquage: typeof deleteRubriquage; listUserScope: typeof listUserScope; listUsersScopedByRubrique: typeof listUsersScopedByRubrique; setUserScope: typeof setUserScope; }; export {};