import { DecryptedPropertyStub } from './PropertyStub.mjs'; import { HasIdentifier } from './base/HasIdentifier.mjs'; import { Identifier } from './base/Identifier.mjs'; import { StoredDocument } from './base/StoredDocument.mjs'; import { DelegationTag } from './embed/DelegationTag.mjs'; import { UsersStatus } from './enums/UsersStatus.mjs'; import { AuthenticationToken } from './security/AuthenticationToken.mjs'; import { LoginIdentifier } from './security/LoginIdentifier.mjs'; import { Permission } from './security/Permission.mjs'; /** * * * Represents a user that can log in to the iCure platform. A user can be linked to a healthcare * party, * a patient, or a device, and holds authentication credentials, roles, and permissions. */ export declare class User implements StoredDocument, HasIdentifier { /** * * The Id of the user. We encourage using either a v4 UUID or a HL7 Id. */ id: string; /** * * The revision of the user in the database, used for conflict management / optimistic locking. */ rev: string | undefined; /** * * Hard delete (unix epoch in ms) timestamp of the object. */ deletionDate: number | undefined; /** * * The timestamp (unix epoch in ms) of creation. */ created: number | undefined; /** * * The identifiers of the user. */ identifier: Array; /** * * Last name of the user. */ name: string | undefined; /** * * Extra properties for the user. Those properties are typed (see class Property). */ properties: Array; /** * * Local permissions specified for the user. */ permissions: Array; /** * * Local roles specified for the user. */ roles: Array; /** * * State of user's activeness: 'Active', 'Disabled' or 'Registering'. */ status: UsersStatus | undefined; /** * * Username for this user. We encourage using an email address. */ login: string | undefined; /** * * Hashed version of the password (BCrypt is used for hashing). */ passwordHash: string | undefined; /** * * The id of the group (practice/hospital) the user is member of. */ groupId: string | undefined; /** * * Id of the healthcare party if the user is a healthcare party. */ healthcarePartyId: string | undefined; /** * * Id of the patient if the user is a patient. */ patientId: string | undefined; /** * * Id of the device if the user is a device. */ deviceId: string | undefined; /** * * Delegations that are automatically generated client side when a new database object is created * by this user. */ autoDelegations: { [key in DelegationTag]?: Array; }; /** * * The timestamp (unix epoch in ms) of the latest validation of the terms of use. */ termsOfUseDate: number | undefined; /** * * Email address of the user (used for token exchange or password recovery). */ email: string | undefined; /** * * Mobile phone of the user (used for token exchange or password recovery). */ mobilePhone: string | undefined; /** * * Encrypted and time-limited authentication tokens used for inter-applications authentication. */ authenticationTokens: { [key: string]: AuthenticationToken; }; /** * * Metadata used to enrich the user with information from the cloud environment. */ systemMetadata: User.SystemMetadata | undefined; constructor(partial: Partial); toJSON(): object; static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array): User; } export declare namespace User { class SystemMetadata { roles: Array; isAdmin: boolean; inheritsRoles: boolean; loginIdentifiers: Array; verifiedEmail: boolean | undefined; verifiedMobilePhone: boolean | undefined; /** * * * True if the user has 2fa enabled for login with password */ uses2fa: boolean | undefined; constructor(partial: Partial & Pick); toJSON(): object; static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array): SystemMetadata; } }