import { AxiosInstance, AxiosResponse } from 'axios'; import { GraphUser } from './user.types'; export declare class Users { private readonly http; constructor(http: AxiosInstance); /** * Gets a user by id or userPrincipalName * https://learn.microsoft.com/en-us/graph/api/user-get * @param id {id | userPrincipalName} * @param additionalProperties (keyof GraphUser)[] * @param expandProperties this can be either a string (keyof GraphUser) or a function format, * ($select/$expand), e.g., 'manager($select=id,userPrincipalName)' */ get(id: string, additionalProperties?: (keyof GraphUser)[], expandProperties?: (keyof GraphUser | string)[]): Promise; /** * Creates a new user in the system. * * @param {Omit} data - The user data required for creation. If a manager is included, it will be validated and assigned to the user. * @return {Promise} A promise resolving to the created user object. * @throws {Error} If a manager's userPrincipalName is provided but does not exist in the system. */ create(data: Omit): Promise; /** * Updates a GraphUser with the provided data. * * @param {string} id - The unique identifier of the user to update. * @param {Partial} data - The data to update the user with. Contains attributes * to modify, including the manager information if applicable. * @return {Promise} A promise that resolves to the updated GraphUser object. */ update(id: string, data: Partial): Promise; /** * Gets a user's by user's id or userPrincipalName * https://learn.microsoft.com/en-us/graph/api/user-list-manager * @param userPrincipalName */ getManager(userPrincipalName: string): Promise; /** * Assigns a user's manager * https://learn.microsoft.com/en-us/graph/api/user-post-manager * @param userPrincipalName * @param managerPrincipalName */ assignManager(userPrincipalName: string, managerPrincipalName: string): Promise>; /** * Removes a user's manager * https://learn.microsoft.com/en-us/graph/api/user-delete-manager * @param userPrincipalName */ removeManager(userPrincipalName: string): Promise>; }