import { IBusinessEntity } from '../Entity'; import { ModuleProperty } from '../ModuleProperties'; import { UUID, XOR, ModuleLink } from '../SimpleTypes'; export declare const UserModuleProperties: ModuleProperty[]; /** @document */ export interface IUser extends IBusinessEntity { first_name: string; last_name: string; primary_email: string; } export interface IUserEntity { sub: UUID; email_verified: true; organization: UUID[]; roles: string[]; name: string; preferred_username: string; given_name: string; family_name: string; email: string; person_id?: string; company_id?: string; groups?: string[]; user_module?: ModuleLink; } export interface ICreateUserDTO { email_address: string; title?: string; description?: string; } export declare type IInviteUserDTO = XOR<{ email_address: string; }, { email: string; }> & { title?: string; description?: string; first_name?: string; last_name?: string; /** * password can only be set if the user has been invited from a user in the same organization. * this password will not be logged in any events or commands derived from this data. */ password?: string; }; export interface IUpdateUserOrganizationDTO { user_id: UUID; organization_id: UUID; } export interface IUserCreatedDTO extends IUser { } export interface IUserInvitedDTO { associated_organization_id: UUID; associated_user_id: UUID; assoicated_user_email: string; issuer_organization_id: UUID; issuer_user_id: UUID; title?: string; description?: string; } export interface IUserOrganizationUpdatedDTO { user_id: UUID; organization_id: UUID; }