import { CatalystApp } from '../catalyst-app'; import { AuthorizedHttpClient } from '../utils/api-request'; import { ICatalystUser, ICatalystSignupConfig, ICatalystSignupUserConfig, ICatalystSignupValidationReq, Component, ICatalystCustomTokenDetails, ICatalystCustomTokenResponse } from '../utils/pojo/common'; type ICatalystNewUser = ICatalystSignupConfig & { user_details: ICatalystUser; }; export declare enum USER_STATUS { ENABLE = "enable", DISABLE = "disable" } export declare class UserManagement implements Component { requester: AuthorizedHttpClient; constructor(app: CatalystApp); getComponentName(): string; /** * Get the current user details * @returns Current logged in user */ getCurrentUser(): Promise; /** * Get all users in a project * @returns List of all users */ getAllUsers(): Promise>; /** * Get all the users in an org associated with a project * @param orgId ID of the org to get the list of associated users. * @returns List of all users in an org */ getAllUsers(orgId: string): Promise>; /** * Get a specific user's details * @param id ID of the user to get the details * @returns Catalyst user details */ getUserDetails(id: string | number): Promise; /** * Delete a user * @param id ID of the user to be deleted * @returns `True` if user is deleted successfully */ deleteUser(id: string | number): Promise; /** * Register a new User * @param signupConfig Meta data to register the user * @param userDetails Details of the user * @returns Catalyst user details */ registerUser(signupConfig: ICatalystSignupConfig, userDetails: Omit): Promise; /** * Get all the org_ids associated with a project * @returns List of Org Ids */ getAllOrgs(): Promise>; /** * Adds a user to a specific org * @param signupConfig Meta data to add the user. * @param userDetails Details of the user. * @returns Catalyst user details */ addUserToOrg(signupConfig: ICatalystSignupConfig, userDetails: ICatalystSignupUserConfig): Promise; /** * Reset user password * @param signupConfig User Meta data * @param userDetails User Details * @returns */ resetPassword(email: string, resetConfig: ICatalystSignupConfig): Promise; getSignupValidationRequest(bioReq: { getArgument: (arg0: string) => unknown; }): ICatalystSignupValidationReq | undefined; generateCustomToken(customTokenDetails: ICatalystCustomTokenDetails): Promise; /** * Enable or disable the user * @param id ID of the user * @param userStatus The state to be updated * @returns True if the sate is changed */ updateUserStatus(id: string, userStatus: USER_STATUS): Promise; /** * Update user details * @param id ID of the user to update * @param userDetails Details to be updated. * @returns Updated user details */ updateUserDetails(id: string, userDetails: ICatalystSignupUserConfig): Promise; } export {};