import { Observable } from 'rxjs'; import { IdentityGroupModel } from '../models/identity-group.model'; import { IdentityRoleModel } from '../models/identity-role.model'; import { IdentityUserModel } from '../models/identity-user.model'; import { IdentityJoinGroupRequestModel, IdentityUserServiceInterface, IdentityUserPasswordModel, IdentityUserQueryCloudRequestModel, IdentityUserQueryResponse } from '../interfaces/identity-user.service.interface'; import * as i0 from "@angular/core"; export declare class IdentityUserService implements IdentityUserServiceInterface { private readonly jwtHelperService; private readonly oAuth2Service; private readonly appConfigService; private get identityHost(); private buildUserUrl; /** * Gets the name and other basic details of the current user. * * @returns The user's details */ getCurrentUserInfo(): IdentityUserModel; /** * Find users based on search input. * * @param search Search query string * @returns List of users */ findUsersByName(search: string): Observable; /** * Find users based on username input. * * @param username Search query string * @returns List of users */ findUserByUsername(username: string): Observable; /** * Find users based on email input. * * @param email Search query string * @returns List of users */ findUserByEmail(email: string): Observable; /** * Find users based on id input. * * @param id Search query string * @returns users object */ findUserById(id: string): Observable; /** * Get client roles of a user for a particular client. * * @param userId ID of the target user * @param clientId ID of the client app * @returns List of client roles */ getClientRoles(userId: string, clientId: string): Observable; /** * Checks whether user has access to a client app. * * @param userId ID of the target user * @param clientId ID of the client app * @returns True if the user has access, false otherwise */ checkUserHasClientApp(userId: string, clientId: string): Observable; /** * Checks whether a user has any of the client app roles. * * @param userId ID of the target user * @param clientId ID of the client app * @param roleNames List of role names to check for * @returns True if the user has one or more of the roles, false otherwise */ checkUserHasAnyClientAppRole(userId: string, clientId: string, roleNames: string[]): Observable; /** * Gets the client ID for an application. * * @param applicationName Name of the application * @returns Client ID string */ getClientIdByApplicationName(applicationName: string): Observable; /** * Checks if a user has access to an application. * * @param userId ID of the user * @param applicationName Name of the application * @returns True if the user has access, false otherwise */ checkUserHasApplicationAccess(userId: string, applicationName: string): Observable; /** * Checks if a user has any application role. * * @param userId ID of the target user * @param applicationName Name of the application * @param roleNames List of role names to check for * @returns True if the user has one or more of the roles, false otherwise */ checkUserHasAnyApplicationRole(userId: string, applicationName: string, roleNames: string[]): Observable; /** * Gets details for all users. * * @returns Array of user info objects */ getUsers(): Observable; /** * Gets a list of roles for a user. * * @param userId ID of the user * @returns Array of role info objects */ getUserRoles(userId: string): Observable; /** * Gets an array of users (including the current user) who have any of the roles in the supplied list. * * @param roleNames List of role names to look for * @returns Array of user info objects */ getUsersByRolesWithCurrentUser(roleNames: string[]): Promise; /** * Gets an array of users (not including the current user) who have any of the roles in the supplied list. * * @param roleNames List of role names to look for * @returns Array of user info objects */ getUsersByRolesWithoutCurrentUser(roleNames: string[]): Promise; private userHasAnyRole; /** * Checks if a user has one of the roles from a list. * * @param userId ID of the target user * @param roleNames Array of roles to check for * @returns True if the user has one of the roles, false otherwise */ checkUserHasRole(userId: string, roleNames: string[]): Observable; /** * Gets details for all users. * * @param requestQuery query model * @returns Array of user information objects. */ queryUsers(requestQuery: IdentityUserQueryCloudRequestModel): Observable; /** * Gets users total count. * * @returns Number of users count. */ getTotalUsersCount(): Observable; /** * Creates new user. * * @param newUser Object containing the new user details. * @returns Empty response when the user created. */ createUser(newUser: IdentityUserModel): Observable; /** * Updates user details. * * @param userId Id of the user. * @param updatedUser Object containing the user details. * @returns Empty response when the user updated. */ updateUser(userId: string, updatedUser: IdentityUserModel): Observable; /** * Deletes User. * * @param userId Id of the user. * @returns Empty response when the user deleted. */ deleteUser(userId: string): Observable; /** * Changes user password. * * @param userId Id of the user. * @param newPassword Details of user Credentials. * @returns Empty response when the password changed. */ changePassword(userId: string, newPassword: IdentityUserPasswordModel): Observable; /** * Gets involved groups. * * @param userId Id of the user. * @returns Array of involved groups information objects. */ getInvolvedGroups(userId: string): Observable; /** * Joins group. * * @param joinGroupRequest Details of join group request (IdentityJoinGroupRequestModel). * @returns Empty response when the user joined the group. */ joinGroup(joinGroupRequest: IdentityJoinGroupRequestModel): Observable; /** * Leaves group. * * @param userId Id of the user. * @param groupId Id of the group. * @returns Empty response when the user left the group. */ leaveGroup(userId: any, groupId: string): Observable; /** * Gets available roles * * @param userId Id of the user. * @returns Array of available roles information objects */ getAvailableRoles(userId: string): Observable; /** * Gets assigned roles. * * @param userId Id of the user. * @returns Array of assigned roles information objects */ getAssignedRoles(userId: string): Observable; /** * Gets effective roles. * * @param userId Id of the user. * @returns Array of composite roles information objects */ getEffectiveRoles(userId: string): Observable; /** * Assigns roles to the user. * * @param userId Id of the user. * @param roles Array of roles. * @returns Empty response when the role assigned. */ assignRoles(userId: string, roles: IdentityRoleModel[]): Observable; /** * Removes assigned roles. * * @param userId Id of the user. * @param removedRoles Array of roles. * @returns Empty response when the role removed. */ removeRoles(userId: string, removedRoles: IdentityRoleModel[]): Observable; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }