@komune-io/im-user-domain 0.21.0-alpha.fe2773a → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -191,12 +191,13 @@ export declare namespace io.komune.im.commons.auth {
191
191
  readonly id: string;
192
192
  readonly identifier?: string;
193
193
  readonly memberOf?: string;
194
- readonly roles: Array<string>;
194
+ readonly roles?: Array<string>;
195
+ readonly acr?: string;
195
196
 
196
197
  }
197
198
  }
198
199
  export declare namespace io.komune.im.commons.auth {
199
- type ImRole = "ORCHESTRATOR" | "ORCHESTRATOR_ADMIN" | "ORCHESTRATOR_USER" | "IM_USER_READ" | "IM_USER_WRITE" | "IM_ORGANIZATION_READ" | "IM_ORGANIZATION_WRITE" | "IM_MY_ORGANIZATION_WRITE" | "IM_APIKEY_READ" | "IM_APIKEY_WRITE" | "IM_SPACE_READ" | "IM_SPACE_WRITE" | "IM_ROLE_READ" | "IM_ROLE_WRITE";
200
+ type ImPermission = "IM_FORCE_MFA_OTP" | "IM_USER_READ" | "IM_USER_ROLE_READ" | "IM_USER_WRITE" | "IM_ORGANIZATION_READ" | "IM_ORGANIZATION_WRITE" | "IM_MY_ORGANIZATION_WRITE" | "IM_ORGANIZATION_API_KEY_READ" | "IM_ORGANIZATION_STATUS_WRITE" | "IM_APIKEY_READ" | "IM_APIKEY_WRITE" | "IM_SPACE_READ" | "IM_SPACE_WRITE" | "IM_ROLE_READ" | "IM_ROLE_WRITE";
200
201
  }
201
202
  export declare namespace io.komune.im.commons.exception {
202
203
  const ExceptionCodes: {
@@ -251,6 +252,9 @@ export declare namespace io.komune.im.core.user.domain.command {
251
252
 
252
253
  }
253
254
  }
255
+ export declare namespace io.komune.im.core.mfa.domain.model {
256
+ type ImMfaPasswordOtpFlowAcr = "PASSWORD_ONLY" | "PASSWORD_OTP";
257
+ }
254
258
  export declare namespace io.komune.im.core.organization.domain.command {
255
259
  interface OrganizationDeleteCommandDTO extends f2.dsl.cqrs.Command {
256
260
  readonly id: string;
@@ -633,6 +637,16 @@ export declare namespace io.komune.im.f2.user.domain.command {
633
637
 
634
638
  }
635
639
  }
640
+ export declare namespace io.komune.im.f2.user.domain.command {
641
+ interface UserDisableMfaCommandDTO extends f2.dsl.cqrs.Command {
642
+ readonly id: string;
643
+
644
+ }
645
+ interface UserDisabledMfaEventDTO extends f2.dsl.cqrs.Event {
646
+ readonly id: string;
647
+
648
+ }
649
+ }
636
650
  export declare namespace io.komune.im.f2.user.domain.command {
637
651
  interface UserResetPasswordCommandDTO extends f2.dsl.cqrs.Command {
638
652
  readonly id: string;
@@ -693,6 +707,7 @@ export declare namespace io.komune.im.f2.user.domain.model {
693
707
  readonly address?: io.komune.im.commons.model.AddressDTO;
694
708
  readonly phone?: string;
695
709
  readonly roles: io.komune.im.f2.privilege.domain.role.model.RoleDTO[];
710
+ readonly mfa?: string[];
696
711
  readonly attributes: Record<string, string>;
697
712
  readonly enabled: boolean;
698
713
  readonly disabledBy?: string;
@@ -708,7 +723,11 @@ export declare namespace io.komune.im.f2.user.domain.policies {
708
723
  checkRefList(authedUser: io.komune.im.commons.auth.AuthedUserDTO): boolean;
709
724
  canCreate(authedUser: io.komune.im.commons.auth.AuthedUserDTO, organizationId?: string): boolean;
710
725
  canUpdate(authedUser: io.komune.im.commons.auth.AuthedUserDTO, user: io.komune.im.f2.user.domain.model.UserDTO): boolean;
726
+ canConfigureMfa(authedUser: io.komune.im.commons.auth.AuthedUserDTO, user: io.komune.im.f2.user.domain.model.UserDTO): boolean;
727
+ canDisableMfa(authedUser: io.komune.im.commons.auth.AuthedUserDTO, user: io.komune.im.f2.user.domain.model.UserDTO): boolean;
728
+ canDisableMfaAcr(authedUser: io.komune.im.commons.auth.AuthedUserDTO, user: io.komune.im.f2.user.domain.model.UserDTO): boolean;
711
729
  canUpdateMemberOf(authedUser: io.komune.im.commons.auth.AuthedUserDTO): boolean;
730
+ canUpdateRole(authedUser: io.komune.im.commons.auth.AuthedUserDTO): boolean;
712
731
  canDisable(authedUser: io.komune.im.commons.auth.AuthedUserDTO, user: io.komune.im.f2.user.domain.model.UserDTO): boolean;
713
732
  canDelete(authedUser: io.komune.im.commons.auth.AuthedUserDTO, user: io.komune.im.f2.user.domain.model.UserDTO): boolean;
714
733
  };