@komune-io/im-user-domain 0.20.0 → 0.21.0-alpha.059f3a3

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.
@@ -24,7 +24,7 @@ export declare namespace f2.dsl.cqrs {
24
24
  }
25
25
  }
26
26
  export declare namespace f2.dsl.cqrs.envelope {
27
- interface EnvelopeDTO<T> /* extends f2.dsl.cqrs.envelope.WithEnvelopeId, f2.dsl.cqrs.envelope.WithEnvelopeData<T> */ {
27
+ interface EnvelopeDTO<T> extends f2.dsl.cqrs.Message/*, f2.dsl.cqrs.envelope.WithEnvelopeId, f2.dsl.cqrs.envelope.WithEnvelopeData<T> */ {
28
28
  readonly type: string;
29
29
  readonly datacontenttype?: string;
30
30
  readonly specversion?: string;
@@ -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: {
@@ -211,6 +212,18 @@ export declare namespace io.komune.im.commons.model {
211
212
 
212
213
  }
213
214
  }
215
+ export declare namespace f2.dsl.fnc.operators {
216
+ class Batch {
217
+ constructor(size?: number, concurrency?: number);
218
+ get size(): number;
219
+ get concurrency(): number;
220
+ copy(size?: number, concurrency?: number): f2.dsl.fnc.operators.Batch;
221
+ toString(): string;
222
+ hashCode(): number;
223
+ equals(other?: any): boolean;
224
+
225
+ }
226
+ }
214
227
  export declare namespace f2.dsl.fnc {
215
228
  interface F2Function<T, R> {
216
229
  invokePromise(cmds: Array<T>): Promise<Array<R>>;
@@ -239,6 +252,9 @@ export declare namespace io.komune.im.core.user.domain.command {
239
252
 
240
253
  }
241
254
  }
255
+ export declare namespace io.komune.im.core.mfa.domain.model {
256
+ type ImMfaPasswordOtpFlowAcr = "PASSWORD_ONLY" | "PASSWORD_OTP";
257
+ }
242
258
  export declare namespace io.komune.im.core.organization.domain.command {
243
259
  interface OrganizationDeleteCommandDTO extends f2.dsl.cqrs.Command {
244
260
  readonly id: string;
@@ -621,6 +637,16 @@ export declare namespace io.komune.im.f2.user.domain.command {
621
637
 
622
638
  }
623
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
+ }
624
650
  export declare namespace io.komune.im.f2.user.domain.command {
625
651
  interface UserResetPasswordCommandDTO extends f2.dsl.cqrs.Command {
626
652
  readonly id: string;
@@ -681,6 +707,7 @@ export declare namespace io.komune.im.f2.user.domain.model {
681
707
  readonly address?: io.komune.im.commons.model.AddressDTO;
682
708
  readonly phone?: string;
683
709
  readonly roles: io.komune.im.f2.privilege.domain.role.model.RoleDTO[];
710
+ readonly mfa?: string[];
684
711
  readonly attributes: Record<string, string>;
685
712
  readonly enabled: boolean;
686
713
  readonly disabledBy?: string;
@@ -696,7 +723,11 @@ export declare namespace io.komune.im.f2.user.domain.policies {
696
723
  checkRefList(authedUser: io.komune.im.commons.auth.AuthedUserDTO): boolean;
697
724
  canCreate(authedUser: io.komune.im.commons.auth.AuthedUserDTO, organizationId?: string): boolean;
698
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;
699
729
  canUpdateMemberOf(authedUser: io.komune.im.commons.auth.AuthedUserDTO): boolean;
730
+ canUpdateRole(authedUser: io.komune.im.commons.auth.AuthedUserDTO): boolean;
700
731
  canDisable(authedUser: io.komune.im.commons.auth.AuthedUserDTO, user: io.komune.im.f2.user.domain.model.UserDTO): boolean;
701
732
  canDelete(authedUser: io.komune.im.commons.auth.AuthedUserDTO, user: io.komune.im.f2.user.domain.model.UserDTO): boolean;
702
733
  };