@firecms/user_management 3.0.0-beta.10 → 3.0.0-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,7 @@
1
1
  import { UserManagement } from "../types";
2
- import { DataSourceDelegate } from "@firecms/core";
3
- export interface UserManagementParams {
2
+ import { AuthController, DataSourceDelegate, User } from "@firecms/core";
3
+ export interface UserManagementParams<CONTROLLER extends AuthController<any> = AuthController<any>> {
4
+ authController: CONTROLLER;
4
5
  /**
5
6
  * The delegate in charge of persisting the data.
6
7
  */
@@ -38,6 +39,7 @@ export interface UserManagementParams {
38
39
  /**
39
40
  * This hook is used to build a user management object that can be used to
40
41
  * manage users and roles in a Firestore backend.
42
+ * @param authController
41
43
  * @param dataSourceDelegate
42
44
  * @param usersPath
43
45
  * @param rolesPath
@@ -46,4 +48,4 @@ export interface UserManagementParams {
46
48
  * @param allowDefaultRolesCreation
47
49
  * @param includeCollectionConfigPermissions
48
50
  */
49
- export declare function useBuildUserManagement({ dataSourceDelegate, usersPath, rolesPath, usersLimit, canEditRoles, allowDefaultRolesCreation, includeCollectionConfigPermissions }: UserManagementParams): UserManagement;
51
+ export declare function useBuildUserManagement<CONTROLLER extends AuthController<any> = AuthController<any>, USER extends User = CONTROLLER extends AuthController<infer U> ? U : any>({ authController, dataSourceDelegate, usersPath, rolesPath, usersLimit, canEditRoles, allowDefaultRolesCreation, includeCollectionConfigPermissions }: UserManagementParams<CONTROLLER>): UserManagement<USER> & CONTROLLER;