@komune-io/im-user-domain 0.24.0-alpha.f3d42d4 → 0.26.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.
@@ -1,6 +1,6 @@
1
1
  type Nullable<T> = T | null | undefined
2
2
  declare function KtSingleton<T>(): T & (abstract new() => any);
3
- export declare interface KtList<E> /* extends Collection<E> */ {
3
+ export declare interface KtList<out E> /* extends Collection<E> */ {
4
4
  asJsReadonlyArrayView(): ReadonlyArray<E>;
5
5
  readonly __doNotUseOrImplementIt: {
6
6
  readonly "kotlin.collections.KtList": unique symbol;
@@ -9,7 +9,7 @@ export declare interface KtList<E> /* extends Collection<E> */ {
9
9
  export declare namespace KtList {
10
10
  function fromJsArray<E>(array: ReadonlyArray<E>): KtList<E>;
11
11
  }
12
- export declare interface KtMap<K, V> {
12
+ export declare interface KtMap<K, out V> {
13
13
  asJsReadonlyMapView(): ReadonlyMap<K, V>;
14
14
  readonly __doNotUseOrImplementIt: {
15
15
  readonly "kotlin.collections.KtMap": unique symbol;
@@ -40,12 +40,12 @@ export declare abstract class ImMfaPasswordOtpFlowAcr {
40
40
  get name(): "PASSWORD_OTP";
41
41
  get ordinal(): 1;
42
42
  };
43
+ static values(): [typeof ImMfaPasswordOtpFlowAcr.PASSWORD_ONLY, typeof ImMfaPasswordOtpFlowAcr.PASSWORD_OTP];
44
+ static valueOf(value: string): ImMfaPasswordOtpFlowAcr;
43
45
  get name(): "PASSWORD_ONLY" | "PASSWORD_OTP";
44
46
  get ordinal(): 0 | 1;
45
47
  get key(): string;
46
48
  get level(): number;
47
- static values(): Array<ImMfaPasswordOtpFlowAcr>;
48
- static valueOf(value: string): ImMfaPasswordOtpFlowAcr;
49
49
  }
50
50
  export declare namespace ImMfaPasswordOtpFlowAcr {
51
51
  /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
@@ -90,7 +90,9 @@ export declare interface Query extends Message {
90
90
  readonly "f2.dsl.cqrs.Query": unique symbol;
91
91
  } & Message["__doNotUseOrImplementIt"];
92
92
  }
93
- export declare interface EnvelopeDTO<T> extends Message/*, WithEnvelopeId, WithEnvelopeData<T> */ {
93
+ export declare interface EnvelopeDTO<T> extends WithEnvelopeId, WithEnvelopeData<T>, Message {
94
+ readonly id: string;
95
+ readonly data: T;
94
96
  readonly type: string;
95
97
  readonly datacontenttype: Nullable<string>;
96
98
  readonly specversion: Nullable<string>;
@@ -98,16 +100,18 @@ export declare interface EnvelopeDTO<T> extends Message/*, WithEnvelopeId, WithE
98
100
  readonly time: Nullable<string>;
99
101
  readonly __doNotUseOrImplementIt: {
100
102
  readonly "f2.dsl.cqrs.envelope.EnvelopeDTO": unique symbol;
101
- } & Message["__doNotUseOrImplementIt"];
103
+ } & Message["__doNotUseOrImplementIt"] & WithEnvelopeData<any>["__doNotUseOrImplementIt"] & WithEnvelopeId["__doNotUseOrImplementIt"];
102
104
  }
103
105
  export declare class Envelope<T> implements EnvelopeDTO<T> {
104
106
  constructor(id: string, data: T, type: string, datacontenttype?: Nullable<string>, specversion?: Nullable<string>, source?: Nullable<string>, time?: Nullable<string>);
107
+ get id(): string;
108
+ get data(): T;
105
109
  get type(): string;
106
110
  get datacontenttype(): Nullable<string>;
107
111
  get specversion(): Nullable<string>;
108
112
  get source(): Nullable<string>;
109
113
  get time(): Nullable<string>;
110
- readonly __doNotUseOrImplementIt: EnvelopeDTO<T>["__doNotUseOrImplementIt"];
114
+ readonly __doNotUseOrImplementIt: EnvelopeDTO<any>["__doNotUseOrImplementIt"];
111
115
  }
112
116
  export declare namespace Envelope {
113
117
  /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
@@ -127,6 +131,18 @@ export declare namespace Envelope {
127
131
  }
128
132
  }
129
133
  }
134
+ export declare interface WithEnvelopeData<T> {
135
+ readonly data: T;
136
+ readonly __doNotUseOrImplementIt: {
137
+ readonly "f2.dsl.cqrs.envelope.WithEnvelopeData": unique symbol;
138
+ };
139
+ }
140
+ export declare interface WithEnvelopeId {
141
+ readonly id: string;
142
+ readonly __doNotUseOrImplementIt: {
143
+ readonly "f2.dsl.cqrs.envelope.WithEnvelopeId": unique symbol;
144
+ };
145
+ }
130
146
  export declare interface F2ErrorDTO extends Problem {
131
147
  readonly id: Nullable<string>;
132
148
  readonly timestamp: string;
@@ -177,7 +193,7 @@ export declare namespace F2Exception {
177
193
  }
178
194
  export declare interface Match<T> {
179
195
  readonly negative: boolean;
180
- map<R>(transform: (p0: T) => R): Match<R>;
196
+ map<R>(transform: (value: T) => R): Match<R>;
181
197
  not(): Match<T>;
182
198
  and(match: Match<T>): Match<T>;
183
199
  or(match: Match<T>): Match<T>;
@@ -193,18 +209,18 @@ export declare interface SortDTO {
193
209
  readonly "f2.dsl.cqrs.filter.SortDTO": unique symbol;
194
210
  };
195
211
  }
196
- export declare interface PageDTO<OBJECT> {
212
+ export declare interface PageDTO<out OBJECT> {
197
213
  readonly total: number;
198
214
  readonly items: KtList<OBJECT>;
199
215
  readonly __doNotUseOrImplementIt: {
200
216
  readonly "f2.dsl.cqrs.page.PageDTO": unique symbol;
201
217
  };
202
218
  }
203
- export declare class Page<OBJECT> implements PageDTO<OBJECT> {
219
+ export declare class Page<out OBJECT> implements PageDTO<OBJECT> {
204
220
  constructor(total: number, items: KtList<OBJECT>);
205
221
  get total(): number;
206
222
  get items(): KtList<OBJECT>;
207
- readonly __doNotUseOrImplementIt: PageDTO<OBJECT>["__doNotUseOrImplementIt"];
223
+ readonly __doNotUseOrImplementIt: PageDTO<any>["__doNotUseOrImplementIt"];
208
224
  }
209
225
  export declare namespace Page {
210
226
  /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
@@ -218,13 +234,13 @@ export declare interface PageQueryDTO extends Query {
218
234
  readonly "f2.dsl.cqrs.page.PageQueryDTO": unique symbol;
219
235
  } & Query["__doNotUseOrImplementIt"];
220
236
  }
221
- export declare interface PageQueryResultDTO<OBJECT> extends Event, PageDTO<OBJECT> {
237
+ export declare interface PageQueryResultDTO<out OBJECT> extends Event, PageDTO<OBJECT> {
222
238
  readonly total: number;
223
239
  readonly items: KtList<OBJECT>;
224
240
  readonly pagination: Nullable<OffsetPaginationDTO>;
225
241
  readonly __doNotUseOrImplementIt: {
226
242
  readonly "f2.dsl.cqrs.page.PageQueryResultDTO": unique symbol;
227
- } & Event["__doNotUseOrImplementIt"] & PageDTO<OBJECT>["__doNotUseOrImplementIt"];
243
+ } & PageDTO<any>["__doNotUseOrImplementIt"] & Event["__doNotUseOrImplementIt"];
228
244
  }
229
245
  export declare class PageQuery implements PageQueryDTO {
230
246
  constructor(pagination: Nullable<OffsetPaginationDTO>);
@@ -237,12 +253,12 @@ export declare namespace PageQuery {
237
253
  const constructor: abstract new () => PageQuery;
238
254
  }
239
255
  }
240
- export declare class PageQueryResult<OBJECT> implements PageQueryResultDTO<OBJECT> {
256
+ export declare class PageQueryResult<out OBJECT> implements PageQueryResultDTO<OBJECT> {
241
257
  constructor(pagination: Nullable<OffsetPagination>, total: number, items: KtList<OBJECT>);
242
258
  get pagination(): Nullable<OffsetPagination>;
243
259
  get total(): number;
244
260
  get items(): KtList<OBJECT>;
245
- readonly __doNotUseOrImplementIt: PageQueryResultDTO<OBJECT>["__doNotUseOrImplementIt"];
261
+ readonly __doNotUseOrImplementIt: PageQueryResultDTO<any>["__doNotUseOrImplementIt"];
246
262
  }
247
263
  export declare namespace PageQueryResult {
248
264
  /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
@@ -313,8 +329,8 @@ export declare abstract class ImPermission {
313
329
  get name(): "IM_USER_READ";
314
330
  get ordinal(): 1;
315
331
  };
316
- static get IM_USER_ROLE_READ(): ImPermission & {
317
- get name(): "IM_USER_ROLE_READ";
332
+ static get IM_USER_ROLE_WRITE(): ImPermission & {
333
+ get name(): "IM_USER_ROLE_WRITE";
318
334
  get ordinal(): 2;
319
335
  };
320
336
  static get IM_USER_WRITE(): ImPermission & {
@@ -365,11 +381,11 @@ export declare abstract class ImPermission {
365
381
  get name(): "IM_ROLE_WRITE";
366
382
  get ordinal(): 14;
367
383
  };
368
- get name(): "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";
384
+ static values(): [typeof ImPermission.IM_FORCE_MFA_OTP, typeof ImPermission.IM_USER_READ, typeof ImPermission.IM_USER_ROLE_WRITE, typeof ImPermission.IM_USER_WRITE, typeof ImPermission.IM_ORGANIZATION_READ, typeof ImPermission.IM_ORGANIZATION_WRITE, typeof ImPermission.IM_MY_ORGANIZATION_WRITE, typeof ImPermission.IM_ORGANIZATION_API_KEY_READ, typeof ImPermission.IM_ORGANIZATION_STATUS_WRITE, typeof ImPermission.IM_APIKEY_READ, typeof ImPermission.IM_APIKEY_WRITE, typeof ImPermission.IM_SPACE_READ, typeof ImPermission.IM_SPACE_WRITE, typeof ImPermission.IM_ROLE_READ, typeof ImPermission.IM_ROLE_WRITE];
385
+ static valueOf(value: string): ImPermission;
386
+ get name(): "IM_FORCE_MFA_OTP" | "IM_USER_READ" | "IM_USER_ROLE_WRITE" | "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";
369
387
  get ordinal(): 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14;
370
388
  get identifier(): string;
371
- static values(): Array<ImPermission>;
372
- static valueOf(value: string): ImPermission;
373
389
  }
374
390
  export declare namespace ImPermission {
375
391
  /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
@@ -633,7 +649,7 @@ export declare interface OrganizationDeleteCommandDTO extends OrganizationDelete
633
649
  export declare interface OrganizationDeletedEventDTO extends Event, OrganizationDeletedEventDTO {
634
650
  readonly __doNotUseOrImplementIt: {
635
651
  readonly "io.komune.im.f2.organization.domain.command.OrganizationDeletedEventDTO": unique symbol;
636
- } & Event["__doNotUseOrImplementIt"] & OrganizationDeletedEventDTO["__doNotUseOrImplementIt"];
652
+ } & OrganizationDeletedEventDTO["__doNotUseOrImplementIt"] & Event["__doNotUseOrImplementIt"];
637
653
  }
638
654
  export declare interface OrganizationDisableCommandDTO extends Command {
639
655
  readonly id: string;
@@ -794,7 +810,7 @@ export declare interface OrganizationPageResultDTO extends PageDTO<OrganizationD
794
810
  readonly total: number;
795
811
  readonly __doNotUseOrImplementIt: {
796
812
  readonly "io.komune.im.f2.organization.domain.query.OrganizationPageResultDTO": unique symbol;
797
- } & PageDTO<OrganizationDTO>["__doNotUseOrImplementIt"];
813
+ } & PageDTO<any>["__doNotUseOrImplementIt"];
798
814
  }
799
815
  export declare interface OrganizationRefGetQueryDTO extends Query {
800
816
  readonly id: string;
@@ -825,7 +841,7 @@ export declare interface F2Consumer<T> {
825
841
  readonly "f2.dsl.fnc.F2Consumer": unique symbol;
826
842
  };
827
843
  }
828
- export declare interface F2Function<T, R> {
844
+ export declare interface F2Function<in T, out R> {
829
845
  readonly __doNotUseOrImplementIt: {
830
846
  readonly "f2.dsl.fnc.F2Function": unique symbol;
831
847
  };
@@ -856,7 +872,7 @@ export declare namespace Batch {
856
872
  }
857
873
  }
858
874
  export declare abstract class AuthRealm {
859
- protected constructor(serverUrl: string, realmId: string, clientId: string, redirectUrl: Nullable<string>);
875
+ private constructor();
860
876
  get serverUrl(): string;
861
877
  get realmId(): string;
862
878
  get clientId(): string;
@@ -906,6 +922,26 @@ export declare namespace AuthRealmClientSecret {
906
922
  const constructor: abstract new () => AuthRealmClientSecret;
907
923
  }
908
924
  }
925
+ export declare class TokenInfo {
926
+ constructor(accessToken: string, expiresIn: number, refreshExpiresIn: Nullable<number> | undefined, tokenType: string, scope: Nullable<string>, idToken?: Nullable<string>, refreshToken?: Nullable<string>);
927
+ get accessToken(): string;
928
+ get expiresIn(): number;
929
+ get refreshExpiresIn(): Nullable<number>;
930
+ get tokenType(): string;
931
+ get scope(): Nullable<string>;
932
+ get idToken(): Nullable<string>;
933
+ get refreshToken(): Nullable<string>;
934
+ copy(accessToken?: string, expiresIn?: number, refreshExpiresIn?: Nullable<number>, tokenType?: string, scope?: Nullable<string>, idToken?: Nullable<string>, refreshToken?: Nullable<string>): TokenInfo;
935
+ toString(): string;
936
+ hashCode(): number;
937
+ equals(other: Nullable<any>): boolean;
938
+ }
939
+ export declare namespace TokenInfo {
940
+ /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
941
+ namespace $metadata$ {
942
+ const constructor: abstract new () => TokenInfo;
943
+ }
944
+ }
909
945
  export declare interface UserCreateCommandDTO extends Command {
910
946
  readonly email: string;
911
947
  readonly password: Nullable<string>;
@@ -933,12 +969,12 @@ export declare interface UserCreatedEventDTO extends Event {
933
969
  export declare interface UserDeleteCommandDTO extends UserDeleteCommandDTO, Command {
934
970
  readonly __doNotUseOrImplementIt: {
935
971
  readonly "io.komune.im.f2.user.domain.command.UserDeleteCommandDTO": unique symbol;
936
- } & UserDeleteCommandDTO["__doNotUseOrImplementIt"] & Command["__doNotUseOrImplementIt"];
972
+ } & Command["__doNotUseOrImplementIt"] & UserDeleteCommandDTO["__doNotUseOrImplementIt"];
937
973
  }
938
974
  export declare interface UserDeletedEventDTO extends UserDeletedEventDTO, Event {
939
975
  readonly __doNotUseOrImplementIt: {
940
976
  readonly "io.komune.im.f2.user.domain.command.UserDeletedEventDTO": unique symbol;
941
- } & UserDeletedEventDTO["__doNotUseOrImplementIt"] & Event["__doNotUseOrImplementIt"];
977
+ } & Event["__doNotUseOrImplementIt"] & UserDeletedEventDTO["__doNotUseOrImplementIt"];
942
978
  }
943
979
  export declare interface UserDisableCommandDTO extends Command {
944
980
  readonly id: string;
@@ -1140,5 +1176,5 @@ export declare interface UserPageResultDTO extends PageDTO<UserDTO> {
1140
1176
  readonly total: number;
1141
1177
  readonly __doNotUseOrImplementIt: {
1142
1178
  readonly "io.komune.im.f2.user.domain.query.UserPageResultDTO": unique symbol;
1143
- } & PageDTO<UserDTO>["__doNotUseOrImplementIt"];
1179
+ } & PageDTO<any>["__doNotUseOrImplementIt"];
1144
1180
  }