import { User } from "./User"; /** Provides access to all user management methods. */ export interface UserManager { /** * Checks if a user with the given name exists. * * ### Examples * * ```ts * driver.users.contains(username) * ``` * * @param username - The user name to be checked */ contains(name: string): Promise; /** * Create a user with the given name & password. * * ### Examples * * ```ts * driver.users.create(username, password) * ``` * * @param username - The name of the user to be created * @param password - The password of the user to be created */ create(name: string, password: string): Promise; /** * Deletes a user with the given name. * * ### Examples * * ```ts * driver.users.delete(username) * ``` * * @param username - The name of the user to be deleted */ delete(name: string): Promise; /** * Retrieves all users which exist on the TypeDB server. * * ### Examples * * ```ts * driver.users.all() * ``` */ all(): Promise; /** * Sets a new password for a user. This operation can only be performed by administrators. * * ### Examples * * ```ts * driver.users.passwordSet(username, password) * ``` * * @param username - The name of the user to set the password of * @param password - The new password */ passwordSet(name: string, password: string): Promise; /** * Retrieve a user with the given name. * * ### Examples * * ```ts * driver.users.get(username) * ``` * * @param username - The name of the user to retrieve */ get(name: string): Promise; }