import { MapNumberTo, MapStringTo, NullableResultPromise } from "../base-types"; import { IEntity } from "../contracts/base/entity"; import { EntityLoadConfiguration } from "../contracts/querying/entity-load-configuration"; import { IExtendedContentHubClient } from "./extended-client"; export interface IUsersClient { /** * Gets the id of the specified user by username. * * @param username - The user name */ getUserIdAsync(username: string): NullableResultPromise; /** * Gets the ids of the specified users by username. * * @param usernames - A list of user names * @returns Array of IDs of type MapStringTo. */ getUsernamesToIdsMapAsync(usernames: Array): Promise>; /** * Gets the ids of the specified users by username. * @param usernames - A list of user names * @returns Array of IDs of type Array or null. */ getUserIdsAsync(usernames: Array): NullableResultPromise>; /** * Gets the username of the specified user. * * @param id - The id of the user */ getUsernameAsync(id: number): NullableResultPromise; /** * Gets the usernames of the specified users. * * @param ids - The ids of the entities to get */ getUsernamesAsync(ids: Array): Promise>; /** * Gets the specified user entity. * * @param id - The id of the user * @param loadConfiguration - The load configuration */ getUserAsync(id: number, loadConfiguration: EntityLoadConfiguration): NullableResultPromise; /** * Gets the specified user entities. * * @param username - Username of the user * @param loadConfiguration - The load configuration */ getUserAsync(username: string, loadConfiguration: EntityLoadConfiguration): NullableResultPromise; /** * Gets the specified user entities. * * @param ids - The ids of the users * @param loadConfiguration - The load configuration */ getUsersAsync(ids: Array, loadConfiguration: EntityLoadConfiguration): Promise>; /** * Gets the specified user entities. * * @param usernames - A list of user names * @param loadConfiguration - The load configuration */ getUsersAsync(usernames: Array, loadConfiguration: EntityLoadConfiguration): NullableResultPromise>; /** * Gets the id of the specified user group by name. * * @param groupName - The groupName name */ getUserGroupIdAsync(groupName: string): NullableResultPromise; /** * Gets the ids of the specified user groups by name. * * @param groupNames - A list of group names */ getUserGroupIdsAsync(groupNames: Array): Promise>; /** * Gets the name of the specified user group * * @param number - The id of the user group */ getUserGroupNameAsync(id: number): NullableResultPromise; /** * Gets the name of the specified user groups. * * @param ids - The ids of user groups */ getUserGroupNamesAsync(ids: Array): Promise>; /** * Gets the specified user group entity. * * @param id - Id of the user * @param loadConfiguration - The load configuration */ getUserGroupAsync(id: number, loadConfiguration: EntityLoadConfiguration): NullableResultPromise; /** * Gets the specified user group entity. * * @param groupName - Name of the group * @param loadConfiguration - The load configuration */ getUserGroupAsync(groupName: string, loadConfiguration: EntityLoadConfiguration): NullableResultPromise; /** * Gets the specified user group entities. * * @param ids - The ids of the user groups * @param loadConfiguration - The load configuration */ getUserGroupsAsync(ids: Array, loadConfiguration: EntityLoadConfiguration): NullableResultPromise>; /** * Gets the specified user group entities. * * @param groupNames - The names of the user groups * @param loadConfiguration - The load configuration */ getUserGroupsAsync(groupNames: Array, loadConfiguration: EntityLoadConfiguration): NullableResultPromise>; /** * Changes the password of the specified user. * * @param id - The user id to change the password on * @param password - The password to reset */ setPasswordAsync(id: number, password: string): Promise; /** * Resets the password of the specified user. * This sends an e-mail to the specified user with a link to choose a new password. * * @param id - Id of the user */ resetPasswordAsync(id: number): Promise; } export declare class UsersClient implements IUsersClient { protected readonly _client: IExtendedContentHubClient; constructor(client: IExtendedContentHubClient); getUserIdAsync(username: string): NullableResultPromise; getUserIdsAsync(usernames: Array): NullableResultPromise>; getUsernamesToIdsMapAsync(usernames: Array): Promise>; getUsernameAsync(id: number): NullableResultPromise; getUsernamesAsync(ids: Array): Promise>; getUserAsync(param: string | number, loadConfiguration: EntityLoadConfiguration): NullableResultPromise; getUsersAsync(param: Array | Array, loadConfiguration: EntityLoadConfiguration): Promise>; getUserGroupIdAsync(groupName: string): NullableResultPromise; getUserGroupIdsAsync(groupNames: Array): Promise>; getUserGroupNameAsync(id: number): NullableResultPromise; getUserGroupNamesAsync(ids: Array): Promise>; getUserGroupAsync(param: string | number, loadConfiguration: EntityLoadConfiguration): NullableResultPromise; getUserGroupsAsync(param: Array | Array, loadConfiguration: EntityLoadConfiguration): NullableResultPromise>; setPasswordAsync(id: number, password: string): Promise; resetPasswordAsync(id: number): Promise; }