@masterteam/users-groups 0.0.38 → 0.0.40
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@masterteam/users-groups",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.40",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"directory": "../../../dist/masterteam/users-groups",
|
|
6
6
|
"linkDirectory": false,
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"tailwindcss": "^4.2.2",
|
|
21
21
|
"tailwindcss-primeui": "^0.6.1",
|
|
22
22
|
"@ngxs/store": "^20.1.0",
|
|
23
|
-
"@masterteam/
|
|
24
|
-
"@masterteam/
|
|
25
|
-
"@masterteam/
|
|
23
|
+
"@masterteam/components": "^0.0.321",
|
|
24
|
+
"@masterteam/icons": "^0.0.17",
|
|
25
|
+
"@masterteam/forms": "^0.0.167"
|
|
26
26
|
},
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"exports": {
|
|
@@ -33,10 +33,25 @@ interface User {
|
|
|
33
33
|
isLinkedToCurrentApplication?: boolean;
|
|
34
34
|
email?: string;
|
|
35
35
|
}
|
|
36
|
+
/** Identity `UserReferenceDto` — a group member as the summary returns it. */
|
|
37
|
+
interface UserReference {
|
|
38
|
+
id: string;
|
|
39
|
+
displayName: string;
|
|
40
|
+
userName?: string | null;
|
|
41
|
+
fullName?: string | null;
|
|
42
|
+
photoUrl?: string | null;
|
|
43
|
+
email?: string | null;
|
|
44
|
+
phoneNumber?: string | null;
|
|
45
|
+
isActive?: boolean | null;
|
|
46
|
+
isDeleted: boolean;
|
|
47
|
+
isLinkedToCurrentApplication: boolean;
|
|
48
|
+
hasContactDetails: boolean;
|
|
49
|
+
}
|
|
36
50
|
interface Group {
|
|
37
51
|
id?: string | number;
|
|
38
52
|
name?: TranslatedField | string;
|
|
39
|
-
|
|
53
|
+
/** Plain text, or `{"ar":"…","en":"…"}` JSON — see `group-description.ts`. */
|
|
54
|
+
description?: string;
|
|
40
55
|
createdAt?: ApiDateValue;
|
|
41
56
|
workspace?: any;
|
|
42
57
|
members?: any[];
|
|
@@ -132,6 +147,98 @@ interface UserSummary {
|
|
|
132
147
|
permissionsCount?: number;
|
|
133
148
|
accessibilitiesCount?: number;
|
|
134
149
|
}
|
|
150
|
+
/**
|
|
151
|
+
* `GET identity/groups/{groupId}/summary` — Pplus5.BE
|
|
152
|
+
* `Docs/Group-Access-Summary-Frontend-Contract.md`. There is no `roles` array:
|
|
153
|
+
* a group's permissions are its own assignments, not a union of its members'.
|
|
154
|
+
*/
|
|
155
|
+
interface GroupAccessSummary {
|
|
156
|
+
group: Group;
|
|
157
|
+
members: UserReference[];
|
|
158
|
+
permissions: Permission[];
|
|
159
|
+
accessibilities: Accessibility[];
|
|
160
|
+
usageSummary: IdentityPrincipalUsageSummary;
|
|
161
|
+
membersCount: number;
|
|
162
|
+
permissionsCount: number;
|
|
163
|
+
accessibilitiesCount: number;
|
|
164
|
+
usagesCount: number;
|
|
165
|
+
}
|
|
166
|
+
interface IdentityPrincipalUsageSummary {
|
|
167
|
+
items: IdentityPrincipalUsage[];
|
|
168
|
+
/** Usage-row counts, not distinct sources — never add two dictionaries up. */
|
|
169
|
+
countBySource: Record<string, number>;
|
|
170
|
+
countByUsageType: Record<string, number>;
|
|
171
|
+
countByCategory: Record<string, number>;
|
|
172
|
+
runtimeImpact: IdentityPrincipalRuntimeImpact;
|
|
173
|
+
warnings: IdentityPrincipalUsageWarning[];
|
|
174
|
+
count: number;
|
|
175
|
+
blockingUsagesCount: number;
|
|
176
|
+
canDeletePrincipal: boolean;
|
|
177
|
+
canDisablePrincipal: boolean;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* One configuration reference to the principal. `source`, `usageType` and
|
|
181
|
+
* `usageCategory` are open-ended strings: the backend adds new values without
|
|
182
|
+
* a contract change, so render unknown ones instead of rejecting them.
|
|
183
|
+
*/
|
|
184
|
+
interface IdentityPrincipalUsage {
|
|
185
|
+
principalType: string;
|
|
186
|
+
principalId: string;
|
|
187
|
+
source: string;
|
|
188
|
+
usageType: string;
|
|
189
|
+
usageCategory: string;
|
|
190
|
+
/** Source definition id — several rows can share it, never a row key alone. */
|
|
191
|
+
sourceId: number | null;
|
|
192
|
+
/** Plain text, or a JSON-encoded `{ ar, en }` object for workflow names. */
|
|
193
|
+
sourceName: string;
|
|
194
|
+
stepId: number | null;
|
|
195
|
+
stepName: string | null;
|
|
196
|
+
stepType: string | null;
|
|
197
|
+
targetType: string | null;
|
|
198
|
+
targetValue: string | null;
|
|
199
|
+
matchedBy: string;
|
|
200
|
+
resolutionStatus: string;
|
|
201
|
+
scopeResolutionStatus: string;
|
|
202
|
+
resolutionMode: string;
|
|
203
|
+
effectiveUsersCount: number;
|
|
204
|
+
/** At most the first five members — not the full list. */
|
|
205
|
+
effectiveUsersPreview: UserReference[];
|
|
206
|
+
moduleType: string;
|
|
207
|
+
moduleId: number | null;
|
|
208
|
+
levelId: number | null;
|
|
209
|
+
levelModuleId: number | null;
|
|
210
|
+
command: string | null;
|
|
211
|
+
scope: PermissionScope | null;
|
|
212
|
+
relatedScopes: PermissionScope[];
|
|
213
|
+
/** Configured content (`app` / `email` / `sms`), not proof of delivery. */
|
|
214
|
+
channels: string[];
|
|
215
|
+
runtimeImpact: IdentityPrincipalRuntimeImpact;
|
|
216
|
+
warnings: IdentityPrincipalUsageWarning[];
|
|
217
|
+
isBlocking: boolean;
|
|
218
|
+
canDeletePrincipal: boolean;
|
|
219
|
+
canDisablePrincipal: boolean;
|
|
220
|
+
/** Source-specific strings — `isPublished` is `"True"`/`"False"`, not a boolean. */
|
|
221
|
+
metadata: Record<string, string>;
|
|
222
|
+
}
|
|
223
|
+
/** Summed per usage row — an impact indicator, never a distinct-record count. */
|
|
224
|
+
interface IdentityPrincipalRuntimeImpact {
|
|
225
|
+
activeRequestsCount: number;
|
|
226
|
+
pendingStepsCount: number;
|
|
227
|
+
activeEscalationsCount: number;
|
|
228
|
+
pendingEscalationStepsCount: number;
|
|
229
|
+
activeAlertStatesCount: number;
|
|
230
|
+
totalInstancesCount: number;
|
|
231
|
+
metrics: Record<string, number>;
|
|
232
|
+
}
|
|
233
|
+
interface IdentityPrincipalUsageWarning {
|
|
234
|
+
code: string;
|
|
235
|
+
severity: string;
|
|
236
|
+
/** English literal from the backend; the fallback when `code` is unknown. */
|
|
237
|
+
message: string;
|
|
238
|
+
source: string;
|
|
239
|
+
usageType: string;
|
|
240
|
+
sourceId: number | null;
|
|
241
|
+
}
|
|
135
242
|
interface TranslatedField {
|
|
136
243
|
display?: string;
|
|
137
244
|
en?: string;
|
|
@@ -149,6 +256,7 @@ declare enum UsersGroupsActionKey {
|
|
|
149
256
|
DeleteUser = "deleteUser",
|
|
150
257
|
LinkUserToApplication = "linkUserToApplication",
|
|
151
258
|
GetUserSummary = "getUserSummary",
|
|
259
|
+
GetGroupSummary = "getGroupSummary",
|
|
152
260
|
AddUserToGroup = "addUserToGroup",
|
|
153
261
|
DeleteUserFromGroup = "deleteUserFromGroup",
|
|
154
262
|
GetGroups = "getGroups",
|
|
@@ -162,6 +270,7 @@ interface UsersGroupsStateModel extends LoadingStateShape<UsersGroupsActionKey>
|
|
|
162
270
|
users: User[];
|
|
163
271
|
selectedUser: User | null;
|
|
164
272
|
userSummary: UserSummary | null;
|
|
273
|
+
groupSummary: GroupAccessSummary | null;
|
|
165
274
|
groups: Group[];
|
|
166
275
|
selectedGroup: Group | null;
|
|
167
276
|
}
|
|
@@ -215,6 +324,11 @@ declare class GetUserSummary {
|
|
|
215
324
|
static readonly type = "[UsersGroups] Get User Summary";
|
|
216
325
|
constructor(userName: string);
|
|
217
326
|
}
|
|
327
|
+
declare class GetGroupSummary {
|
|
328
|
+
groupId: string | number;
|
|
329
|
+
static readonly type = "[UsersGroups] Get Group Summary";
|
|
330
|
+
constructor(groupId: string | number);
|
|
331
|
+
}
|
|
218
332
|
declare class ResetUserPassword {
|
|
219
333
|
id: string | number;
|
|
220
334
|
payload: ResetUserPasswordPayload;
|
|
@@ -259,15 +373,20 @@ declare class UsersGroupsFacade {
|
|
|
259
373
|
readonly users: _angular_core.Signal<User[]>;
|
|
260
374
|
readonly selectedUser: _angular_core.Signal<User | null>;
|
|
261
375
|
readonly userSummary: _angular_core.Signal<_masterteam_users_groups.UserSummary | null>;
|
|
376
|
+
readonly groupSummary: _angular_core.Signal<_masterteam_users_groups.GroupAccessSummary | null>;
|
|
262
377
|
readonly groups: _angular_core.Signal<Group[]>;
|
|
263
378
|
readonly selectedGroup: _angular_core.Signal<Group | null>;
|
|
264
379
|
private readonly loadingActive;
|
|
380
|
+
private readonly errors;
|
|
265
381
|
readonly isLoadingUsers: _angular_core.Signal<boolean>;
|
|
266
382
|
readonly isLoadingUser: _angular_core.Signal<boolean>;
|
|
267
383
|
readonly isSavingUser: _angular_core.Signal<boolean>;
|
|
268
384
|
readonly isDeletingUser: _angular_core.Signal<boolean>;
|
|
269
385
|
readonly isLinkingUserToApplication: _angular_core.Signal<boolean>;
|
|
270
386
|
readonly isLoadingUserSummary: _angular_core.Signal<boolean>;
|
|
387
|
+
readonly userSummaryError: _angular_core.Signal<string | null>;
|
|
388
|
+
readonly isLoadingGroupSummary: _angular_core.Signal<boolean>;
|
|
389
|
+
readonly groupSummaryError: _angular_core.Signal<string | null>;
|
|
271
390
|
readonly isLoadingGroups: _angular_core.Signal<boolean>;
|
|
272
391
|
readonly isLoadingGroup: _angular_core.Signal<boolean>;
|
|
273
392
|
readonly isSavingGroup: _angular_core.Signal<boolean>;
|
|
@@ -284,6 +403,7 @@ declare class UsersGroupsFacade {
|
|
|
284
403
|
deleteUser(userName: string | number): rxjs.Observable<void>;
|
|
285
404
|
linkUserToApplication(userName: string | number): rxjs.Observable<void>;
|
|
286
405
|
getUserSummary(userName: string): rxjs.Observable<void>;
|
|
406
|
+
getGroupSummary(groupId: string | number): rxjs.Observable<void>;
|
|
287
407
|
resetUserPassword(id: string | number, payload: ResetUserPasswordPayload): rxjs.Observable<void>;
|
|
288
408
|
getGroups(): rxjs.Observable<void>;
|
|
289
409
|
getGroup(id: string | number | null): rxjs.Observable<void>;
|
|
@@ -313,6 +433,7 @@ declare class UsersGroupsState extends CrudStateBase<any, UsersGroupsStateModel,
|
|
|
313
433
|
static getUsers(state: UsersGroupsStateModel): User[];
|
|
314
434
|
static getSelectedUser(state: UsersGroupsStateModel): User | null;
|
|
315
435
|
static getUserSummary(state: UsersGroupsStateModel): UserSummary | null;
|
|
436
|
+
static getGroupSummary(state: UsersGroupsStateModel): GroupAccessSummary | null;
|
|
316
437
|
static getGroups(state: UsersGroupsStateModel): Group[];
|
|
317
438
|
static getSelectedGroup(state: UsersGroupsStateModel): Group | null;
|
|
318
439
|
static getLoadingActive(state: UsersGroupsStateModel): string[];
|
|
@@ -325,6 +446,7 @@ declare class UsersGroupsState extends CrudStateBase<any, UsersGroupsStateModel,
|
|
|
325
446
|
deleteUser(ctx: StateContext<UsersGroupsStateModel>, { userName }: DeleteUser): rxjs.Observable<Response<void>>;
|
|
326
447
|
linkUserToApplication(ctx: StateContext<UsersGroupsStateModel>, { userName }: LinkUserToApplication): rxjs.Observable<Response<User | null>>;
|
|
327
448
|
getUserSummary(ctx: StateContext<UsersGroupsStateModel>, { userName }: GetUserSummary): rxjs.Observable<Response<UserSummary>>;
|
|
449
|
+
getGroupSummary(ctx: StateContext<UsersGroupsStateModel>, { groupId }: GetGroupSummary): rxjs.Observable<Response<GroupAccessSummary>>;
|
|
328
450
|
resetUserPassword(ctx: StateContext<UsersGroupsStateModel>, { id, payload }: ResetUserPassword): rxjs.Observable<Response<void>>;
|
|
329
451
|
deleteUserFromGroup(ctx: StateContext<UsersGroupsStateModel>, { payload }: DeleteUserFromGroup): rxjs.Observable<Response<void>>;
|
|
330
452
|
getGroups(ctx: StateContext<UsersGroupsStateModel>): rxjs.Observable<Response<Group[]>>;
|
|
@@ -360,6 +482,7 @@ declare class UsersGroups implements OnInit {
|
|
|
360
482
|
declare class Users implements OnInit {
|
|
361
483
|
typeCol: _angular_core.Signal<TemplateRef<any>>;
|
|
362
484
|
applicationLinkCol: _angular_core.Signal<TemplateRef<any>>;
|
|
485
|
+
emailCol: _angular_core.Signal<TemplateRef<any>>;
|
|
363
486
|
private readonly facade;
|
|
364
487
|
readonly modal: ModalService;
|
|
365
488
|
private readonly translocoService;
|
|
@@ -384,7 +507,7 @@ declare class Users implements OnInit {
|
|
|
384
507
|
unlinkUserFromApplication(user: any): void;
|
|
385
508
|
addUserDialog(user?: any | null): void;
|
|
386
509
|
addResetPasswordDialog(user: any): void;
|
|
387
|
-
|
|
510
|
+
openAccessSummary(user: any): void;
|
|
388
511
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Users, never>;
|
|
389
512
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Users, "mt-users", never, {}, {}, never, never, true, never>;
|
|
390
513
|
}
|
|
@@ -402,6 +525,7 @@ declare class Groups implements OnInit {
|
|
|
402
525
|
allGroups: _angular_core.Signal<_masterteam_users_groups.Group[]>;
|
|
403
526
|
ngOnInit(): void;
|
|
404
527
|
addGroupDialog(group?: any | null): void;
|
|
528
|
+
openAccessSummary(group: any): void;
|
|
405
529
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Groups, never>;
|
|
406
530
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Groups, "mt-groups", never, {}, {}, never, never, true, never>;
|
|
407
531
|
}
|
|
@@ -471,5 +595,5 @@ declare class GroupForm implements OnInit {
|
|
|
471
595
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<GroupForm, "mt-group-form", never, { "groupForEdit": { "alias": "groupForEdit"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
472
596
|
}
|
|
473
597
|
|
|
474
|
-
export { AddUserToGroup, ClearSelectedGroup, CreateGroup, CreateUser, DeleteGroup, DeleteUser, DeleteUserFromGroup, GetGroup, GetGroups, GetUser, GetUserSummary, GetUsers, GroupForm, Groups, LinkUserToApplication, ResetUserPassword, UpdateGroup, UpdateUser, UserForm, Users, UsersGroups, UsersGroupsActionKey, UsersGroupsFacade, UsersGroupsState };
|
|
475
|
-
export type { Accessibility, ApiDateValue, Group, Permission, PermissionScope, ResetUserPasswordPayload, Role, RoleLevelDataAssignment, RoleScope, RoleScopeLevel, RoleScopeModule, TranslatedField, User, UserSummary, UsersGroupsStateModel };
|
|
598
|
+
export { AddUserToGroup, ClearSelectedGroup, CreateGroup, CreateUser, DeleteGroup, DeleteUser, DeleteUserFromGroup, GetGroup, GetGroupSummary, GetGroups, GetUser, GetUserSummary, GetUsers, GroupForm, Groups, LinkUserToApplication, ResetUserPassword, UpdateGroup, UpdateUser, UserForm, Users, UsersGroups, UsersGroupsActionKey, UsersGroupsFacade, UsersGroupsState };
|
|
599
|
+
export type { Accessibility, ApiDateValue, Group, GroupAccessSummary, IdentityPrincipalRuntimeImpact, IdentityPrincipalUsage, IdentityPrincipalUsageSummary, IdentityPrincipalUsageWarning, Permission, PermissionScope, ResetUserPasswordPayload, Role, RoleLevelDataAssignment, RoleScope, RoleScopeLevel, RoleScopeModule, TranslatedField, User, UserReference, UserSummary, UsersGroupsStateModel };
|