import { UserManagement } from "../types"; import { AuthController, DataSourceDelegate, Role, User } from "@firecms/core"; export interface UserManagementParams = AuthController> { authController: CONTROLLER; /** * The delegate in charge of persisting the data. */ dataSourceDelegate?: DataSourceDelegate; /** * Path where the plugin users configuration is stored. * Default: __FIRECMS/config/users * You can specify a different path if you want to store the user management configuration in a different place. * Please keep in mind that the FireCMS users are not necessarily the same as the Firebase users (but they can be). * The path should be relative to the root of the database, and should always have an odd number of segments. */ usersPath?: string; /** * Path where the plugin roles configuration is stored. * Default: __FIRECMS/config/roles */ rolesPath?: string; /** * The roles that are available in the user management system. * If you provide this, the user management system will not fetch the roles from the database. */ roles?: Role[]; /** * If there are no roles in the database, provide a button to create the default roles. */ allowDefaultRolesCreation?: boolean; /** * Include the collection config permissions in the user management system. */ includeCollectionConfigPermissions?: boolean; } /** * This hook is used to build a user management object that can be used to * manage users and roles in a Firestore backend. * @param authController * @param dataSourceDelegate * @param usersPath * @param rolesPath * @param roles * @param allowDefaultRolesCreation * @param includeCollectionConfigPermissions */ export declare function useBuildUserManagement = AuthController, USER extends User = CONTROLLER extends AuthController ? U : any>({ authController, dataSourceDelegate, roles: rolesProp, usersPath, rolesPath, allowDefaultRolesCreation, includeCollectionConfigPermissions }: UserManagementParams): UserManagement & CONTROLLER;