import Base, { MaybeRaw } from "../../../Base"; import { PaginatedResponse, SearchFilter, Sorting } from "../../../interfaces/global"; import { Organization, OrganizationQueryOptions } from "../../../interfaces/idp/organization"; import { OrganizationMemberInvitation } from "../../../interfaces/idp/organization/member/invitations"; import { User, UserPatch } from "../../../interfaces/idp/user"; import { IdpUserLicense } from "./license"; import { IdpMessage } from "./message"; import UserPasswordService from "./password"; import { IdpSettings } from "./settings"; export declare class IdpUser extends Base { /** * Handles everything around a user's settings */ get settings(): IdpSettings; private _settings?; /** * Handles everything around a user's password */ get password(): UserPasswordService; private _password?; /** * Handles everything around a user's license */ get license(): IdpUserLicense; private _license?; /** * Handles everything around a user's messages */ get message(): IdpMessage; private _message?; /** * Retrieves the User database entry for the requesting user. * @returns User object */ getUser(raw?: { raw: R; }): Promise>; /** * Updates the User database entry of the requesting user. * @param user UserPatch object holding the new User values * @returns User object */ patchUser(user: UserPatch, raw?: { raw: R; }): Promise>; /** * Updates the Password of the requesting user. * @param oldPassword String object holding the old password * @param newPassword String object holding the new password * @param token String (optional) object holding the current TOTP token * @returns User object */ patchUserPassword(oldPassword: string, newPassword: string, totp?: string, raw?: { raw: R; }): Promise>; /** * Deletes user session and logs him out of HCloud on all devices. */ deleteUserSession(raw?: { raw: R; }): Promise>; /** * Deletes the requesting user. */ deleteUser(raw?: { raw: R; }): Promise>; /** * Updates user's avatar * @param file Image as Javascript File * @returns User details with updated avatar */ updateAvatar(file: File, raw?: { raw: R; }): Promise>; /** * Retrieves all Organizations of a user that match the provided search filter(s). Returns all Organizations of the user if no search filter is provided. * @param filters (optional) Array of search filters * @param sorting (optional) Sorting object * @param limit (optional) Max number of results (1-100; defaults to 25) * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0) * @param options (optional) Defines query options to retrieve additional properties for the returned Organization objects. * @returns Object containing an array of Organizations and the total number of results found in the database (independent of limit and page) */ searchOrganizations(params: { filters: SearchFilter[]; sorting?: Sorting; limit?: number; page?: number; options?: OrganizationQueryOptions; }, raw?: { raw: R; }): Promise>>; /** * Retrieves all organization invitations of a user that match the provided search filter(s). Returns all invitations of the user if no search filter is provided. * @param filters (optional) Array of search filters * @param sorting (optional) Sorting object * @param limit (optional) Max number of results (1-100; defaults to 25) * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0) * @returns Object containing an array of invitations and the total number of results found in the database (independent of limit and page) */ searchInvitations(params: { filters: SearchFilter[]; sorting?: Sorting; limit?: number; page?: number; }, raw?: { raw: R; }): Promise>>; /** * Maintains a user's online status */ ping(raw?: { raw: R; }): Promise>; protected getEndpoint(endpoint: string): string; }