@komune-io/im-organization-domain 0.15.0-alpha.2ff4be0

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.
@@ -0,0 +1,627 @@
1
+ export declare namespace f2.dsl.fnc {
2
+ interface F2Function<T, R> {
3
+ invoke(cmd: Array<T>): Promise<Array<R>>;
4
+
5
+ }
6
+ interface F2Supplier<R> {
7
+ invoke(): Promise<Array<R>>;
8
+
9
+ }
10
+ interface F2Consumer<T> {
11
+ invoke(cmd: Array<T>): Promise<void>;
12
+
13
+ }
14
+ }
15
+ export declare namespace f2.client {
16
+ interface F2Client {
17
+ supplier<RESPONSE>(route: string, responseTypeInfo: io.ktor.util.reflect.TypeInfo): f2.dsl.fnc.F2Supplier<RESPONSE>;
18
+ function<QUERY, RESPONSE>(route: string, queryTypeInfo: io.ktor.util.reflect.TypeInfo, responseTypeInfo: io.ktor.util.reflect.TypeInfo): f2.dsl.fnc.F2Function<QUERY, RESPONSE>;
19
+ consumer<QUERY>(route: string, queryTypeInfo: io.ktor.util.reflect.TypeInfo): f2.dsl.fnc.F2Consumer<QUERY>;
20
+ readonly type: f2.client.F2ClientType;
21
+ }
22
+ }
23
+ export declare namespace f2.dsl.cqrs {
24
+ interface Command extends f2.dsl.cqrs.Message {
25
+
26
+ }
27
+ }
28
+ export declare namespace f2.dsl.cqrs {
29
+ interface Event extends f2.dsl.cqrs.Message {
30
+
31
+ }
32
+ }
33
+ export declare namespace f2.dsl.cqrs {
34
+ interface Message {
35
+
36
+ }
37
+ }
38
+ export declare namespace f2.dsl.cqrs {
39
+ interface Query extends f2.dsl.cqrs.Message {
40
+
41
+ }
42
+ }
43
+ export declare namespace f2.dsl.cqrs.error {
44
+ interface F2ErrorDTO {
45
+ readonly id?: string;
46
+ readonly timestamp: string;
47
+ readonly code: number;
48
+ readonly requestId?: string;
49
+ readonly message: string;
50
+
51
+ }
52
+ class F2Error implements f2.dsl.cqrs.error.F2ErrorDTO {
53
+ constructor(message: string, id?: string, timestamp?: string, code?: number, requestId?: string);
54
+ get message(): string;
55
+ get id(): Nullable<string>;
56
+ get timestamp(): string;
57
+ get code(): number;
58
+ get requestId(): Nullable<string>;
59
+ toString(): string;
60
+
61
+ }
62
+ }
63
+ export declare namespace f2.dsl.cqrs.exception {
64
+ class F2Exception /* extends kotlin.RuntimeException */ {
65
+ constructor(error: f2.dsl.cqrs.error.F2ErrorDTO, cause?: Error);
66
+ get error(): f2.dsl.cqrs.error.F2ErrorDTO;
67
+
68
+ }
69
+ }
70
+ export declare namespace f2.dsl.cqrs.filter {
71
+ interface Match<T> {
72
+ readonly negative: boolean;
73
+ map<R>(transform: (p0: T) => R): f2.dsl.cqrs.filter.Match<R>;
74
+ not(): f2.dsl.cqrs.filter.Match<T>;
75
+ and(match: f2.dsl.cqrs.filter.Match<T>): f2.dsl.cqrs.filter.Match<T>;
76
+ or(match: f2.dsl.cqrs.filter.Match<T>): f2.dsl.cqrs.filter.Match<T>;
77
+
78
+ }
79
+ }
80
+ export declare namespace f2.dsl.cqrs.filter {
81
+ interface SortDTO {
82
+ readonly property: string;
83
+ readonly ascending: boolean;
84
+ readonly nullsFirst?: boolean;
85
+
86
+ }
87
+ }
88
+ export declare namespace f2.dsl.cqrs.page {
89
+ interface PageDTO<OBJECT> {
90
+ readonly total: number;
91
+ readonly items: OBJECT[];
92
+
93
+ }
94
+ class Page<OBJECT> implements f2.dsl.cqrs.page.PageDTO<OBJECT> {
95
+ constructor(total: number, items: OBJECT[]);
96
+ get total(): number;
97
+ get items(): OBJECT[];
98
+
99
+ }
100
+ }
101
+ export declare namespace f2.dsl.cqrs.page {
102
+ interface PageQueryDTO extends f2.dsl.cqrs.Query {
103
+ readonly pagination?: f2.dsl.cqrs.page.OffsetPaginationDTO;
104
+
105
+ }
106
+ interface PageQueryResultDTO<OBJECT> extends f2.dsl.cqrs.Event, f2.dsl.cqrs.page.PageDTO<OBJECT> {
107
+ readonly total: number;
108
+ readonly items: OBJECT[];
109
+ readonly pagination?: f2.dsl.cqrs.page.OffsetPaginationDTO;
110
+
111
+ }
112
+ class PageQuery implements f2.dsl.cqrs.page.PageQueryDTO {
113
+ constructor(pagination?: f2.dsl.cqrs.page.OffsetPaginationDTO);
114
+ get pagination(): Nullable<f2.dsl.cqrs.page.OffsetPaginationDTO>;
115
+
116
+ }
117
+ class PageQueryResult<OBJECT> implements f2.dsl.cqrs.page.PageQueryResultDTO<OBJECT> {
118
+ constructor(pagination?: f2.dsl.cqrs.page.OffsetPagination, total: number, items: OBJECT[]);
119
+ get pagination(): Nullable<f2.dsl.cqrs.page.OffsetPagination>;
120
+ get total(): number;
121
+ get items(): OBJECT[];
122
+
123
+ }
124
+ }
125
+ export declare namespace f2.dsl.cqrs.page {
126
+ interface Pagination {
127
+
128
+ }
129
+ interface OffsetPaginationDTO extends f2.dsl.cqrs.page.Pagination {
130
+ readonly offset: number;
131
+ readonly limit: number;
132
+
133
+ }
134
+ interface PagePaginationDTO extends f2.dsl.cqrs.page.Pagination {
135
+ readonly page?: number;
136
+ readonly size?: number;
137
+
138
+ }
139
+ class OffsetPagination implements f2.dsl.cqrs.page.OffsetPaginationDTO {
140
+ constructor(offset: number, limit: number);
141
+ get offset(): number;
142
+ get limit(): number;
143
+
144
+ }
145
+ class PagePagination implements f2.dsl.cqrs.page.PagePaginationDTO {
146
+ constructor(page?: number, size?: number);
147
+ get page(): Nullable<number>;
148
+ get size(): Nullable<number>;
149
+
150
+ }
151
+ }
152
+ export declare namespace f2.client.ktor.http.plugin.model {
153
+ abstract class AuthRealm {
154
+ protected constructor(serverUrl: string, realmId: string, clientId: string, redirectUrl?: string);
155
+ get serverUrl(): string;
156
+ get realmId(): string;
157
+ get clientId(): string;
158
+ get redirectUrl(): Nullable<string>;
159
+ }
160
+ class AuthRealmPassword extends f2.client.ktor.http.plugin.model.AuthRealm {
161
+ constructor(serverUrl: string, realmId: string, redirectUrl: string, clientId: string, username: string, password: string);
162
+ get serverUrl(): string;
163
+ get realmId(): string;
164
+ get redirectUrl(): string;
165
+ get clientId(): string;
166
+ get username(): string;
167
+ get password(): string;
168
+ }
169
+ class AuthRealmClientSecret extends f2.client.ktor.http.plugin.model.AuthRealm {
170
+ constructor(serverUrl: string, realmId: string, clientId: string, redirectUrl?: string, clientSecret: string, isPublic?: boolean);
171
+ get serverUrl(): string;
172
+ get realmId(): string;
173
+ get clientId(): string;
174
+ get redirectUrl(): Nullable<string>;
175
+ get clientSecret(): string;
176
+ get isPublic(): boolean;
177
+ }
178
+ }
179
+ export declare namespace f2.client.ktor.http {
180
+ class HttpClientBuilder {
181
+ constructor(json?: kotlinx.serialization.json.Json);
182
+ build(urlBase: string): Promise<f2.client.F2Client/* f2.client.ktor.http.HttpF2Client */>;
183
+ static httpClient$default($this: f2.client.ktor.http.HttpClientBuilder, json?: kotlinx.serialization.json.Json): io.ktor.client.HttpClient;
184
+ }
185
+ }
186
+ export declare namespace f2.client.ktor.rsocket {
187
+ class RSocketF2Client implements f2.client.F2Client {
188
+ constructor(rSocketClient: f2.client.ktor.rsocket.RSocketClient);
189
+ get type(): f2.client.F2ClientType;
190
+ supplier<RESPONSE>(route: string, typeInfo: io.ktor.util.reflect.TypeInfo): f2.dsl.fnc.F2Supplier<RESPONSE>;
191
+ function<QUERY, RESPONSE>(route: string, queryTypeInfo: io.ktor.util.reflect.TypeInfo, responseTypeInfo: io.ktor.util.reflect.TypeInfo): f2.dsl.fnc.F2Function<QUERY, RESPONSE>;
192
+ consumer<QUERY>(route: string, queryTypeInfo: io.ktor.util.reflect.TypeInfo): f2.dsl.fnc.F2Consumer<QUERY>;
193
+ }
194
+ }
195
+ export declare namespace f2.client.ktor {
196
+ abstract class Protocol {
197
+ protected constructor();
198
+ }
199
+ const HTTP: {
200
+ } & f2.client.ktor.Protocol;
201
+ const HTTPS: {
202
+ } & f2.client.ktor.Protocol;
203
+ const WS: {
204
+ } & f2.client.ktor.Protocol;
205
+ const WSS: {
206
+ } & f2.client.ktor.Protocol;
207
+ const TCP: {
208
+ } & f2.client.ktor.Protocol;
209
+ }
210
+ export declare namespace io.komune.im.commons.auth {
211
+ interface AuthedUserDTO {
212
+ readonly id: string;
213
+ readonly identifier?: string;
214
+ readonly memberOf?: string;
215
+ readonly roles: Array<string>;
216
+
217
+ }
218
+ }
219
+ export declare namespace io.komune.im.commons.auth {
220
+ abstract class ImRole {
221
+ private constructor();
222
+ get identifier(): string;
223
+ static get ORCHESTRATOR(): io.komune.im.commons.auth.ImRole & {
224
+ get name(): "ORCHESTRATOR";
225
+ get ordinal(): 0;
226
+ };
227
+ static get ORCHESTRATOR_ADMIN(): io.komune.im.commons.auth.ImRole & {
228
+ get name(): "ORCHESTRATOR_ADMIN";
229
+ get ordinal(): 1;
230
+ };
231
+ static get ORCHESTRATOR_USER(): io.komune.im.commons.auth.ImRole & {
232
+ get name(): "ORCHESTRATOR_USER";
233
+ get ordinal(): 2;
234
+ };
235
+ static get IM_USER_READ(): io.komune.im.commons.auth.ImRole & {
236
+ get name(): "IM_USER_READ";
237
+ get ordinal(): 3;
238
+ };
239
+ static get IM_USER_WRITE(): io.komune.im.commons.auth.ImRole & {
240
+ get name(): "IM_USER_WRITE";
241
+ get ordinal(): 4;
242
+ };
243
+ static get IM_ORGANIZATION_READ(): io.komune.im.commons.auth.ImRole & {
244
+ get name(): "IM_ORGANIZATION_READ";
245
+ get ordinal(): 5;
246
+ };
247
+ static get IM_ORGANIZATION_WRITE(): io.komune.im.commons.auth.ImRole & {
248
+ get name(): "IM_ORGANIZATION_WRITE";
249
+ get ordinal(): 6;
250
+ };
251
+ static get IM_MY_ORGANIZATION_WRITE(): io.komune.im.commons.auth.ImRole & {
252
+ get name(): "IM_MY_ORGANIZATION_WRITE";
253
+ get ordinal(): 7;
254
+ };
255
+ static get IM_APIKEY_READ(): io.komune.im.commons.auth.ImRole & {
256
+ get name(): "IM_APIKEY_READ";
257
+ get ordinal(): 8;
258
+ };
259
+ static get IM_APIKEY_WRITE(): io.komune.im.commons.auth.ImRole & {
260
+ get name(): "IM_APIKEY_WRITE";
261
+ get ordinal(): 9;
262
+ };
263
+ static get IM_SPACE_READ(): io.komune.im.commons.auth.ImRole & {
264
+ get name(): "IM_SPACE_READ";
265
+ get ordinal(): 10;
266
+ };
267
+ static get IM_SPACE_WRITE(): io.komune.im.commons.auth.ImRole & {
268
+ get name(): "IM_SPACE_WRITE";
269
+ get ordinal(): 11;
270
+ };
271
+ static get IM_ROLE_READ(): io.komune.im.commons.auth.ImRole & {
272
+ get name(): "IM_ROLE_READ";
273
+ get ordinal(): 12;
274
+ };
275
+ static get IM_ROLE_WRITE(): io.komune.im.commons.auth.ImRole & {
276
+ get name(): "IM_ROLE_WRITE";
277
+ get ordinal(): 13;
278
+ };
279
+ static values(): Array<io.komune.im.commons.auth.ImRole>;
280
+ static valueOf(value: string): io.komune.im.commons.auth.ImRole;
281
+ get name(): "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";
282
+ get ordinal(): 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13;
283
+ }
284
+ }
285
+ export declare namespace io.komune.im.commons.exception {
286
+ const ExceptionCodes: {
287
+ privilegeWrongTarget(): number;
288
+ };
289
+ }
290
+ export declare namespace io.komune.im.commons.model {
291
+ interface AddressDTO {
292
+ readonly street: string;
293
+ readonly postalCode: string;
294
+ readonly city: string;
295
+
296
+ }
297
+ }
298
+ export declare namespace io.komune.im.commons.model {
299
+ abstract class AuthRealm {
300
+ protected constructor(serverUrl: string, realmId: string, clientId: string, redirectUrl?: string, space: string);
301
+ get serverUrl(): string;
302
+ get realmId(): string;
303
+ get clientId(): string;
304
+ get redirectUrl(): Nullable<string>;
305
+ get space(): string;
306
+ }
307
+ class AuthRealmPassword extends io.komune.im.commons.model.AuthRealm {
308
+ constructor(serverUrl: string, realmId: string, redirectUrl: string, clientId: string, username: string, password: string, space: string);
309
+ get serverUrl(): string;
310
+ get realmId(): string;
311
+ get redirectUrl(): string;
312
+ get clientId(): string;
313
+ get username(): string;
314
+ get password(): string;
315
+ get space(): string;
316
+ copy(serverUrl?: string, realmId?: string, redirectUrl?: string, clientId?: string, username?: string, password?: string, space?: string): io.komune.im.commons.model.AuthRealmPassword;
317
+ toString(): string;
318
+ hashCode(): number;
319
+ equals(other?: any): boolean;
320
+ }
321
+ class AuthRealmClientSecret extends io.komune.im.commons.model.AuthRealm {
322
+ constructor(serverUrl: string, realmId: string, clientId: string, redirectUrl?: string, clientSecret: string, space: string);
323
+ get serverUrl(): string;
324
+ get realmId(): string;
325
+ get clientId(): string;
326
+ get redirectUrl(): Nullable<string>;
327
+ get clientSecret(): string;
328
+ get space(): string;
329
+ copy(serverUrl?: string, realmId?: string, clientId?: string, redirectUrl?: string, clientSecret?: string, space?: string): io.komune.im.commons.model.AuthRealmClientSecret;
330
+ toString(): string;
331
+ hashCode(): number;
332
+ equals(other?: any): boolean;
333
+ }
334
+ }
335
+ export declare namespace io.komune.im.commons.http {
336
+ class ClientJs {
337
+ constructor();
338
+ protected doCall<T>(fnc: any /*Suspend functions are not supported*/): Promise<T>;
339
+ }
340
+ }
341
+ export declare namespace io.komune.im.core.organization.domain.command {
342
+ interface OrganizationDeleteCommandDTO extends f2.dsl.cqrs.Command {
343
+ readonly id: string;
344
+
345
+ }
346
+ interface OrganizationDeletedEventDTO extends f2.dsl.cqrs.Event {
347
+ readonly id: string;
348
+
349
+ }
350
+ }
351
+ export declare namespace io.komune.im.f2.privilege.domain {
352
+ const PrivilegePolicies: {
353
+ canGet(authedUser: io.komune.im.commons.auth.AuthedUserDTO): boolean;
354
+ canList(authedUser: io.komune.im.commons.auth.AuthedUserDTO): boolean;
355
+ canDefine(authedUser: io.komune.im.commons.auth.AuthedUserDTO): boolean;
356
+ };
357
+ }
358
+ export declare namespace io.komune.im.f2.privilege.domain.model {
359
+ interface PrivilegeDTO {
360
+ readonly id: string;
361
+ readonly identifier: string;
362
+ readonly description: string;
363
+ readonly type: string;
364
+
365
+ }
366
+ }
367
+ export declare namespace io.komune.im.f2.privilege.domain.permission.command {
368
+ interface PermissionDefineCommandDTO {
369
+ readonly identifier: string;
370
+ readonly description: string;
371
+
372
+ }
373
+ interface PermissionDefinedEventDTO extends f2.dsl.cqrs.Event {
374
+ readonly identifier: string;
375
+
376
+ }
377
+ }
378
+ export declare namespace io.komune.im.f2.privilege.domain.permission.model {
379
+ interface PermissionDTO extends io.komune.im.f2.privilege.domain.model.PrivilegeDTO {
380
+ readonly id: string;
381
+ readonly type: string;
382
+ readonly identifier: string;
383
+ readonly description: string;
384
+
385
+ }
386
+ }
387
+ export declare namespace io.komune.im.f2.privilege.domain.permission.query {
388
+ interface PermissionGetQueryDTO {
389
+ readonly identifier: string;
390
+
391
+ }
392
+ interface PermissionGetResultDTO {
393
+ readonly item?: io.komune.im.f2.privilege.domain.permission.model.PermissionDTO;
394
+
395
+ }
396
+ }
397
+ export declare namespace io.komune.im.f2.privilege.domain.permission.query {
398
+ interface PermissionListQueryDTO {
399
+
400
+ }
401
+ interface PermissionListResultDTO {
402
+ readonly items: io.komune.im.f2.privilege.domain.permission.model.PermissionDTO[];
403
+
404
+ }
405
+ }
406
+ export declare namespace io.komune.im.f2.privilege.domain.role.command {
407
+ interface RoleDefineCommandDTO {
408
+ readonly identifier: string;
409
+ readonly description: string;
410
+ readonly targets: string[];
411
+ readonly locale: Record<string, string>;
412
+ readonly bindings?: any/* Nullable<Record<string, string[]>> */;
413
+ readonly permissions?: any/* Nullable<string>[] */;
414
+
415
+ }
416
+ interface RoleDefinedEventDTO extends f2.dsl.cqrs.Event {
417
+ readonly identifier: string;
418
+
419
+ }
420
+ }
421
+ export declare namespace io.komune.im.f2.privilege.domain.role.model {
422
+ interface RoleDTO extends io.komune.im.f2.privilege.domain.model.PrivilegeDTO {
423
+ readonly id: string;
424
+ readonly type: string;
425
+ readonly identifier: string;
426
+ readonly description: string;
427
+ readonly targets: string[];
428
+ readonly locale: Record<string, string>;
429
+ readonly bindings: Record<string, io.komune.im.f2.privilege.domain.role.model.RoleDTO[]>;
430
+ readonly permissions: string[];
431
+
432
+ }
433
+ }
434
+ export declare namespace io.komune.im.f2.privilege.domain.role.model {
435
+ const RoleTargetValues: {
436
+ organization(): string;
437
+ user(): string;
438
+ apiKey(): string;
439
+ };
440
+ }
441
+ export declare namespace io.komune.im.f2.privilege.domain.role.query {
442
+ interface RoleGetQueryDTO {
443
+ readonly identifier: string;
444
+
445
+ }
446
+ interface RoleGetResultDTO {
447
+ readonly item?: io.komune.im.f2.privilege.domain.role.model.RoleDTO;
448
+
449
+ }
450
+ }
451
+ export declare namespace io.komune.im.f2.privilege.domain.role.query {
452
+ interface RoleListQueryDTO {
453
+ readonly target?: string;
454
+
455
+ }
456
+ interface RoleListResultDTO {
457
+ readonly items: io.komune.im.f2.privilege.domain.role.model.RoleDTO[];
458
+
459
+ }
460
+ }
461
+ export declare namespace io.komune.im.f2.organization.domain.command {
462
+ interface OrganizationCreateCommandDTO extends f2.dsl.cqrs.Command {
463
+ readonly siret?: string;
464
+ readonly name: string;
465
+ readonly description?: string;
466
+ readonly address?: io.komune.im.commons.model.AddressDTO;
467
+ readonly website?: string;
468
+ readonly roles?: any/* Nullable<string>[] */;
469
+ readonly parentOrganizationId?: string;
470
+ readonly attributes?: any/* Nullable<Record<string, string>> */;
471
+ readonly status?: string;
472
+
473
+ }
474
+ interface OrganizationCreatedEventDTO extends f2.dsl.cqrs.Event {
475
+ readonly id: string;
476
+ readonly parentOrganization?: string;
477
+
478
+ }
479
+ }
480
+ export declare namespace io.komune.im.f2.organization.domain.command {
481
+ interface OrganizationDeleteCommandDTO extends io.komune.im.core.organization.domain.command.OrganizationDeleteCommandDTO {
482
+ readonly id: string;
483
+
484
+ }
485
+ interface OrganizationDeletedEventDTO extends f2.dsl.cqrs.Event, io.komune.im.core.organization.domain.command.OrganizationDeletedEventDTO {
486
+ readonly id: string;
487
+
488
+ }
489
+ }
490
+ export declare namespace io.komune.im.f2.organization.domain.command {
491
+ interface OrganizationDisableCommandDTO extends f2.dsl.cqrs.Command {
492
+ readonly id: string;
493
+ readonly disabledBy?: string;
494
+ readonly anonymize: boolean;
495
+ readonly attributes?: any/* Nullable<Record<string, string>> */;
496
+ readonly userAttributes?: any/* Nullable<Record<string, string>> */;
497
+
498
+ }
499
+ interface OrganizationDisabledEventDTO extends f2.dsl.cqrs.Event {
500
+ readonly id: string;
501
+ readonly userIds: string[];
502
+
503
+ }
504
+ }
505
+ export declare namespace io.komune.im.f2.organization.domain.command {
506
+ interface OrganizationUpdateCommandDTO extends f2.dsl.cqrs.Command {
507
+ readonly id: string;
508
+ readonly name: string;
509
+ readonly description?: string;
510
+ readonly address?: io.komune.im.commons.model.AddressDTO;
511
+ readonly website?: string;
512
+ readonly roles?: any/* Nullable<string>[] */;
513
+ readonly attributes?: any/* Nullable<Record<string, string>> */;
514
+ readonly status?: string;
515
+
516
+ }
517
+ interface OrganizationUpdatedResultDTO extends f2.dsl.cqrs.Event {
518
+ readonly id: string;
519
+
520
+ }
521
+ }
522
+ export declare namespace io.komune.im.f2.organization.domain.command {
523
+ interface OrganizationUploadLogoCommandDTO extends f2.dsl.cqrs.Command {
524
+ readonly id: string;
525
+
526
+ }
527
+ interface OrganizationUploadedLogoEventDTO extends f2.dsl.cqrs.Event {
528
+ readonly id: string;
529
+ readonly url: string;
530
+
531
+ }
532
+ }
533
+ export declare namespace io.komune.im.f2.organization.domain.model {
534
+ interface OrganizationDTO {
535
+ readonly id: string;
536
+ readonly siret?: string;
537
+ readonly name: string;
538
+ readonly description?: string;
539
+ readonly address?: io.komune.im.commons.model.AddressDTO;
540
+ readonly website?: string;
541
+ readonly attributes: Record<string, string>;
542
+ readonly roles: io.komune.im.f2.privilege.domain.role.model.RoleDTO[];
543
+ readonly logo?: string;
544
+ readonly enabled: boolean;
545
+ readonly status: string;
546
+ readonly disabledBy?: string;
547
+ readonly creationDate: number;
548
+ readonly disabledDate?: any/* Nullable<number> */;
549
+
550
+ }
551
+ }
552
+ export declare namespace io.komune.im.f2.organization.domain.model {
553
+ interface OrganizationRefDTO {
554
+ readonly id: string;
555
+ readonly name: string;
556
+ readonly roles: string[];
557
+
558
+ }
559
+ }
560
+ export declare namespace io.komune.im.f2.organization.domain.model {
561
+ const OrganizationStatusValues: {
562
+ pending(): string;
563
+ validated(): string;
564
+ rejected(): string;
565
+ };
566
+ }
567
+ export declare namespace io.komune.im.f2.organization.domain.policies {
568
+ const OrganizationPolicies: {
569
+ canGet(authedUser: io.komune.im.commons.auth.AuthedUserDTO, organizationId: string): boolean;
570
+ canList(authedUser: io.komune.im.commons.auth.AuthedUserDTO): boolean;
571
+ checkRefList(authedUser: io.komune.im.commons.auth.AuthedUserDTO): boolean;
572
+ canCreate(authedUser: io.komune.im.commons.auth.AuthedUserDTO): boolean;
573
+ canUpdate(authedUser: io.komune.im.commons.auth.AuthedUserDTO, organizationId: string): boolean;
574
+ canUpdateStatus(authedUser: io.komune.im.commons.auth.AuthedUserDTO): boolean;
575
+ canDisable(authedUser: io.komune.im.commons.auth.AuthedUserDTO): boolean;
576
+ canDelete(authedUser: io.komune.im.commons.auth.AuthedUserDTO): boolean;
577
+ };
578
+ }
579
+ export declare namespace io.komune.im.f2.organization.domain.query {
580
+ interface OrganizationGetFromInseeQueryDTO extends f2.dsl.cqrs.Query {
581
+ readonly siret: string;
582
+
583
+ }
584
+ interface OrganizationGetFromInseeResultDTO extends f2.dsl.cqrs.Event {
585
+ readonly item?: io.komune.im.f2.organization.domain.model.OrganizationDTO;
586
+
587
+ }
588
+ }
589
+ export declare namespace io.komune.im.f2.organization.domain.query {
590
+ interface OrganizationGetQueryDTO extends f2.dsl.cqrs.Query {
591
+ readonly id: string;
592
+
593
+ }
594
+ interface OrganizationGetResultDTO extends f2.dsl.cqrs.Event {
595
+ readonly item?: io.komune.im.f2.organization.domain.model.OrganizationDTO;
596
+
597
+ }
598
+ }
599
+ export declare namespace io.komune.im.f2.organization.domain.query {
600
+ interface OrganizationPageQueryDTO extends f2.dsl.cqrs.Query {
601
+ readonly name?: string;
602
+ readonly role?: string;
603
+ readonly roles?: any/* Nullable<string>[] */;
604
+ readonly attributes?: any/* Nullable<Record<string, string>> */;
605
+ readonly status?: any/* Nullable<string>[] */;
606
+ readonly withDisabled?: boolean;
607
+ readonly offset?: number;
608
+ readonly limit?: number;
609
+
610
+ }
611
+ interface OrganizationPageResultDTO extends f2.dsl.cqrs.page.PageDTO<io.komune.im.f2.organization.domain.model.OrganizationDTO> {
612
+ readonly items: io.komune.im.f2.organization.domain.model.OrganizationDTO[];
613
+ readonly total: number;
614
+
615
+ }
616
+ }
617
+ export declare namespace io.komune.im.f2.organization.domain.query {
618
+ interface OrganizationRefListQueryDTO extends f2.dsl.cqrs.Query {
619
+ readonly withDisabled: boolean;
620
+
621
+ }
622
+ interface OrganizationRefListResultDTO extends f2.dsl.cqrs.Event {
623
+ readonly items: io.komune.im.f2.organization.domain.model.OrganizationRefDTO[];
624
+
625
+ }
626
+ }
627
+ export as namespace io_komune_im_im_organization_domain;