@flusys/nestjs-iam 8.0.0-beta.1 → 8.0.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.
- package/config/message-keys.d.ts +2 -0
- package/controllers/role-permission.controller.d.ts +2 -1
- package/controllers/user-action-permission.controller.d.ts +2 -1
- package/dtos/permission.dto.d.ts +16 -0
- package/fesm/284.js +54 -0
- package/fesm/867.js +104 -2
- package/fesm/config/index.js +4 -2
- package/fesm/dtos/index.js +79 -1
- package/fesm/index.js +15 -3
- package/package.json +3 -3
- package/services/permission.service.d.ts +3 -1
package/config/message-keys.d.ts
CHANGED
|
@@ -15,9 +15,11 @@ export declare const PERMISSION_OPERATION_MESSAGES: {
|
|
|
15
15
|
export declare const ROLE_PERMISSION_MESSAGES: {
|
|
16
16
|
readonly ACTIONS_SUCCESS: "role.permission.actions.success";
|
|
17
17
|
readonly USER_ROLES_SUCCESS: "role.permission.user.roles.success";
|
|
18
|
+
readonly ROLE_USERS_SUCCESS: "role.permission.role.users.success";
|
|
18
19
|
};
|
|
19
20
|
export declare const USER_ACTION_PERMISSION_MESSAGES: {
|
|
20
21
|
readonly GET_SUCCESS: "user.action.permission.get.success";
|
|
22
|
+
readonly ACTION_USERS_SUCCESS: "user.action.permission.action.users.success";
|
|
21
23
|
};
|
|
22
24
|
export declare const COMPANY_ACTION_PERMISSION_MESSAGES: {
|
|
23
25
|
readonly GET_SUCCESS: "company.action.permission.get.success";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ILoggedUserInfo, SingleResponseDto } from '@flusys/nestjs-shared';
|
|
2
|
-
import { AssignRoleActionsDto, AssignUserRolesDto, GetRoleActionsDto, GetUserRolesDto, PermissionOperationResultDto, RoleActionResponseDto, UserRoleResponseDto } from '../dtos/permission.dto.js';
|
|
2
|
+
import { AssignRoleActionsDto, AssignUserRolesDto, GetRoleActionsDto, GetRoleUsersDto, GetUserRolesDto, PermissionOperationResultDto, RoleActionResponseDto, RoleUserResponseDto, UserRoleResponseDto } from '../dtos/permission.dto.js';
|
|
3
3
|
import { IAMConfigService } from '../services/iam-config.service.js';
|
|
4
4
|
import { PermissionService } from '../services/permission.service.js';
|
|
5
5
|
export declare class RolePermissionController {
|
|
@@ -10,4 +10,5 @@ export declare class RolePermissionController {
|
|
|
10
10
|
getRoleActions(dto: GetRoleActionsDto): Promise<SingleResponseDto<RoleActionResponseDto[]>>;
|
|
11
11
|
assignUserRoles(dto: AssignUserRolesDto, user: ILoggedUserInfo): Promise<SingleResponseDto<PermissionOperationResultDto>>;
|
|
12
12
|
getUserRoles(dto: GetUserRolesDto, user: ILoggedUserInfo): Promise<SingleResponseDto<UserRoleResponseDto[]>>;
|
|
13
|
+
getRoleUsers(dto: GetRoleUsersDto): Promise<SingleResponseDto<RoleUserResponseDto[]>>;
|
|
13
14
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ILoggedUserInfo, SingleResponseDto } from '@flusys/nestjs-shared';
|
|
2
|
-
import { AssignUserActionsDto, GetUserActionsDto, PermissionOperationResultDto, UserActionResponseDto } from '../dtos/permission.dto.js';
|
|
2
|
+
import { ActionUserResponseDto, AssignUserActionsDto, GetActionUsersDto, GetUserActionsDto, PermissionOperationResultDto, UserActionResponseDto } from '../dtos/permission.dto.js';
|
|
3
3
|
import { IAMConfigService } from '../services/iam-config.service.js';
|
|
4
4
|
import { PermissionService } from '../services/permission.service.js';
|
|
5
5
|
export declare class UserActionPermissionController {
|
|
@@ -8,4 +8,5 @@ export declare class UserActionPermissionController {
|
|
|
8
8
|
constructor(permissionService: PermissionService, config: IAMConfigService);
|
|
9
9
|
assignUserActions(dto: AssignUserActionsDto, user: ILoggedUserInfo): Promise<SingleResponseDto<PermissionOperationResultDto>>;
|
|
10
10
|
getUserActions(dto: GetUserActionsDto, user: ILoggedUserInfo): Promise<SingleResponseDto<UserActionResponseDto[]>>;
|
|
11
|
+
getActionUsers(dto: GetActionUsersDto): Promise<SingleResponseDto<ActionUserResponseDto[]>>;
|
|
11
12
|
}
|
package/dtos/permission.dto.d.ts
CHANGED
|
@@ -37,6 +37,12 @@ export declare class GetRoleActionsDto {
|
|
|
37
37
|
export declare class GetCompanyActionsDto {
|
|
38
38
|
companyId: string;
|
|
39
39
|
}
|
|
40
|
+
export declare class GetRoleUsersDto {
|
|
41
|
+
roleId: string;
|
|
42
|
+
}
|
|
43
|
+
export declare class GetActionUsersDto {
|
|
44
|
+
actionId: string;
|
|
45
|
+
}
|
|
40
46
|
export declare class GetUserRolesDto {
|
|
41
47
|
userId: string;
|
|
42
48
|
companyId?: string;
|
|
@@ -76,6 +82,16 @@ export declare class UserRoleResponseDto {
|
|
|
76
82
|
branchId: string | null;
|
|
77
83
|
createdAt: Date;
|
|
78
84
|
}
|
|
85
|
+
export declare class RoleUserResponseDto {
|
|
86
|
+
id: string;
|
|
87
|
+
userId: string;
|
|
88
|
+
createdAt: Date;
|
|
89
|
+
}
|
|
90
|
+
export declare class ActionUserResponseDto {
|
|
91
|
+
id: string;
|
|
92
|
+
userId: string;
|
|
93
|
+
createdAt: Date;
|
|
94
|
+
}
|
|
79
95
|
export declare class FrontendActionDto {
|
|
80
96
|
code: string;
|
|
81
97
|
name: string;
|
package/fesm/284.js
CHANGED
|
@@ -626,6 +626,15 @@ class RolePermissionController {
|
|
|
626
626
|
data: roles
|
|
627
627
|
};
|
|
628
628
|
}
|
|
629
|
+
async getRoleUsers(dto) {
|
|
630
|
+
const users = await this.permissionService.getUsersForRole(dto.roleId);
|
|
631
|
+
return {
|
|
632
|
+
success: true,
|
|
633
|
+
message: 'Role users retrieved successfully',
|
|
634
|
+
messageKey: message_keys/* .ROLE_PERMISSION_MESSAGES.ROLE_USERS_SUCCESS */.eh.ROLE_USERS_SUCCESS,
|
|
635
|
+
data: users
|
|
636
|
+
};
|
|
637
|
+
}
|
|
629
638
|
}
|
|
630
639
|
role_permission_controller_ts_decorate([
|
|
631
640
|
(0,common_.Post)('role-actions/assign'),
|
|
@@ -703,6 +712,24 @@ role_permission_controller_ts_decorate([
|
|
|
703
712
|
]),
|
|
704
713
|
role_permission_controller_ts_metadata("design:returntype", Promise)
|
|
705
714
|
], RolePermissionController.prototype, "getUserRoles", null);
|
|
715
|
+
role_permission_controller_ts_decorate([
|
|
716
|
+
(0,common_.Post)('get-role-users'),
|
|
717
|
+
(0,nestjs_shared_.RequirePermission)(nestjs_shared_.USER_ROLE_PERMISSIONS.READ),
|
|
718
|
+
(0,swagger_.ApiOperation)({
|
|
719
|
+
summary: 'Get users assigned to a role',
|
|
720
|
+
description: 'Returns userIds assigned to the role (reverse lookup).'
|
|
721
|
+
}),
|
|
722
|
+
(0,nestjs_shared_.ApiResponseDto)(permission_dto/* .RoleUserResponseDto */.MO, true, 'single'),
|
|
723
|
+
(0,swagger_.ApiBody)({
|
|
724
|
+
type: permission_dto/* .GetRoleUsersDto */.A6
|
|
725
|
+
}),
|
|
726
|
+
role_permission_controller_ts_param(0, (0,common_.Body)()),
|
|
727
|
+
role_permission_controller_ts_metadata("design:type", Function),
|
|
728
|
+
role_permission_controller_ts_metadata("design:paramtypes", [
|
|
729
|
+
typeof permission_dto/* .GetRoleUsersDto */.A6 === "undefined" ? Object : permission_dto/* .GetRoleUsersDto */.A6
|
|
730
|
+
]),
|
|
731
|
+
role_permission_controller_ts_metadata("design:returntype", Promise)
|
|
732
|
+
], RolePermissionController.prototype, "getRoleUsers", null);
|
|
706
733
|
RolePermissionController = role_permission_controller_ts_decorate([
|
|
707
734
|
(0,swagger_.ApiTags)('IAM - Role Permissions'),
|
|
708
735
|
(0,common_.Controller)('iam/permissions'),
|
|
@@ -782,6 +809,15 @@ class UserActionPermissionController {
|
|
|
782
809
|
data: actions
|
|
783
810
|
};
|
|
784
811
|
}
|
|
812
|
+
async getActionUsers(dto) {
|
|
813
|
+
const users = await this.permissionService.getUsersForAction(dto.actionId);
|
|
814
|
+
return {
|
|
815
|
+
success: true,
|
|
816
|
+
message: 'Action users retrieved successfully',
|
|
817
|
+
messageKey: message_keys/* .USER_ACTION_PERMISSION_MESSAGES.ACTION_USERS_SUCCESS */.k.ACTION_USERS_SUCCESS,
|
|
818
|
+
data: users
|
|
819
|
+
};
|
|
820
|
+
}
|
|
785
821
|
}
|
|
786
822
|
user_action_permission_controller_ts_decorate([
|
|
787
823
|
(0,common_.Post)('user-actions/assign'),
|
|
@@ -823,6 +859,24 @@ user_action_permission_controller_ts_decorate([
|
|
|
823
859
|
]),
|
|
824
860
|
user_action_permission_controller_ts_metadata("design:returntype", Promise)
|
|
825
861
|
], UserActionPermissionController.prototype, "getUserActions", null);
|
|
862
|
+
user_action_permission_controller_ts_decorate([
|
|
863
|
+
(0,common_.Post)('get-action-users'),
|
|
864
|
+
(0,nestjs_shared_.RequirePermission)(nestjs_shared_.USER_ACTION_PERMISSIONS.READ),
|
|
865
|
+
(0,swagger_.ApiOperation)({
|
|
866
|
+
summary: 'Get users directly assigned an action',
|
|
867
|
+
description: 'Returns userIds directly assigned the action (reverse lookup).'
|
|
868
|
+
}),
|
|
869
|
+
(0,nestjs_shared_.ApiResponseDto)(permission_dto/* .ActionUserResponseDto */.cB, true, 'single'),
|
|
870
|
+
(0,swagger_.ApiBody)({
|
|
871
|
+
type: permission_dto/* .GetActionUsersDto */.Ww
|
|
872
|
+
}),
|
|
873
|
+
user_action_permission_controller_ts_param(0, (0,common_.Body)()),
|
|
874
|
+
user_action_permission_controller_ts_metadata("design:type", Function),
|
|
875
|
+
user_action_permission_controller_ts_metadata("design:paramtypes", [
|
|
876
|
+
typeof permission_dto/* .GetActionUsersDto */.Ww === "undefined" ? Object : permission_dto/* .GetActionUsersDto */.Ww
|
|
877
|
+
]),
|
|
878
|
+
user_action_permission_controller_ts_metadata("design:returntype", Promise)
|
|
879
|
+
], UserActionPermissionController.prototype, "getActionUsers", null);
|
|
826
880
|
UserActionPermissionController = user_action_permission_controller_ts_decorate([
|
|
827
881
|
(0,swagger_.ApiTags)('IAM - User Action Permissions'),
|
|
828
882
|
(0,common_.Controller)('iam/permissions'),
|
package/fesm/867.js
CHANGED
|
@@ -66,10 +66,12 @@ const PERMISSION_OPERATION_MESSAGES = {
|
|
|
66
66
|
};
|
|
67
67
|
const ROLE_PERMISSION_MESSAGES = {
|
|
68
68
|
ACTIONS_SUCCESS: 'role.permission.actions.success',
|
|
69
|
-
USER_ROLES_SUCCESS: 'role.permission.user.roles.success'
|
|
69
|
+
USER_ROLES_SUCCESS: 'role.permission.user.roles.success',
|
|
70
|
+
ROLE_USERS_SUCCESS: 'role.permission.role.users.success'
|
|
70
71
|
};
|
|
71
72
|
const USER_ACTION_PERMISSION_MESSAGES = {
|
|
72
|
-
GET_SUCCESS: 'user.action.permission.get.success'
|
|
73
|
+
GET_SUCCESS: 'user.action.permission.get.success',
|
|
74
|
+
ACTION_USERS_SUCCESS: 'user.action.permission.action.users.success'
|
|
73
75
|
};
|
|
74
76
|
const COMPANY_ACTION_PERMISSION_MESSAGES = {
|
|
75
77
|
GET_SUCCESS: 'company.action.permission.get.success'
|
|
@@ -333,6 +335,26 @@ _ts_decorate([
|
|
|
333
335
|
(0,class_validator__rspack_import_2.IsUUID)(),
|
|
334
336
|
_ts_metadata("design:type", String)
|
|
335
337
|
], GetCompanyActionsDto.prototype, "companyId", void 0);
|
|
338
|
+
class GetRoleUsersDto {
|
|
339
|
+
roleId;
|
|
340
|
+
}
|
|
341
|
+
_ts_decorate([
|
|
342
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)({
|
|
343
|
+
description: 'Role ID to get assigned users for'
|
|
344
|
+
}),
|
|
345
|
+
(0,class_validator__rspack_import_2.IsUUID)(),
|
|
346
|
+
_ts_metadata("design:type", String)
|
|
347
|
+
], GetRoleUsersDto.prototype, "roleId", void 0);
|
|
348
|
+
class GetActionUsersDto {
|
|
349
|
+
actionId;
|
|
350
|
+
}
|
|
351
|
+
_ts_decorate([
|
|
352
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)({
|
|
353
|
+
description: 'Action ID to get assigned users for'
|
|
354
|
+
}),
|
|
355
|
+
(0,class_validator__rspack_import_2.IsUUID)(),
|
|
356
|
+
_ts_metadata("design:type", String)
|
|
357
|
+
], GetActionUsersDto.prototype, "actionId", void 0);
|
|
336
358
|
class GetUserRolesDto {
|
|
337
359
|
userId;
|
|
338
360
|
companyId;
|
|
@@ -551,6 +573,52 @@ _ts_decorate([
|
|
|
551
573
|
}),
|
|
552
574
|
_ts_metadata("design:type", typeof Date === "undefined" ? Object : Date)
|
|
553
575
|
], UserRoleResponseDto.prototype, "createdAt", void 0);
|
|
576
|
+
class RoleUserResponseDto {
|
|
577
|
+
id;
|
|
578
|
+
userId;
|
|
579
|
+
createdAt;
|
|
580
|
+
}
|
|
581
|
+
_ts_decorate([
|
|
582
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)({
|
|
583
|
+
description: 'Permission ID'
|
|
584
|
+
}),
|
|
585
|
+
_ts_metadata("design:type", String)
|
|
586
|
+
], RoleUserResponseDto.prototype, "id", void 0);
|
|
587
|
+
_ts_decorate([
|
|
588
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)({
|
|
589
|
+
description: 'User ID'
|
|
590
|
+
}),
|
|
591
|
+
_ts_metadata("design:type", String)
|
|
592
|
+
], RoleUserResponseDto.prototype, "userId", void 0);
|
|
593
|
+
_ts_decorate([
|
|
594
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)({
|
|
595
|
+
description: 'When this permission was created'
|
|
596
|
+
}),
|
|
597
|
+
_ts_metadata("design:type", typeof Date === "undefined" ? Object : Date)
|
|
598
|
+
], RoleUserResponseDto.prototype, "createdAt", void 0);
|
|
599
|
+
class ActionUserResponseDto {
|
|
600
|
+
id;
|
|
601
|
+
userId;
|
|
602
|
+
createdAt;
|
|
603
|
+
}
|
|
604
|
+
_ts_decorate([
|
|
605
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)({
|
|
606
|
+
description: 'Permission ID'
|
|
607
|
+
}),
|
|
608
|
+
_ts_metadata("design:type", String)
|
|
609
|
+
], ActionUserResponseDto.prototype, "id", void 0);
|
|
610
|
+
_ts_decorate([
|
|
611
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)({
|
|
612
|
+
description: 'User ID'
|
|
613
|
+
}),
|
|
614
|
+
_ts_metadata("design:type", String)
|
|
615
|
+
], ActionUserResponseDto.prototype, "userId", void 0);
|
|
616
|
+
_ts_decorate([
|
|
617
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)({
|
|
618
|
+
description: 'When this permission was created'
|
|
619
|
+
}),
|
|
620
|
+
_ts_metadata("design:type", typeof Date === "undefined" ? Object : Date)
|
|
621
|
+
], ActionUserResponseDto.prototype, "createdAt", void 0);
|
|
554
622
|
class FrontendActionDto {
|
|
555
623
|
code;
|
|
556
624
|
name;
|
|
@@ -639,18 +707,22 @@ _ts_decorate([
|
|
|
639
707
|
|
|
640
708
|
__webpack_require__.d(__webpack_exports__, {
|
|
641
709
|
$l: () => (RoleActionResponseDto),
|
|
710
|
+
A6: () => (GetRoleUsersDto),
|
|
642
711
|
CM: () => (GetUserActionsDto),
|
|
643
712
|
E4: () => (CompanyActionResponseDto),
|
|
644
713
|
LK: () => (UserRoleResponseDto),
|
|
714
|
+
MO: () => (RoleUserResponseDto),
|
|
645
715
|
Nx: () => (AssignCompanyActionsDto),
|
|
646
716
|
O_: () => (MyPermissionsQueryDto),
|
|
647
717
|
Q0: () => (GetUserRolesDto),
|
|
648
718
|
Uu: () => (PermissionItemDto),
|
|
719
|
+
Ww: () => (GetActionUsersDto),
|
|
649
720
|
Xz: () => (AssignUserRolesDto),
|
|
650
721
|
Yb: () => (FrontendActionDto),
|
|
651
722
|
Zn: () => (GetRoleActionsDto),
|
|
652
723
|
aG: () => (PermissionAction),
|
|
653
724
|
c8: () => (GetCompanyActionsDto),
|
|
725
|
+
cB: () => (ActionUserResponseDto),
|
|
654
726
|
cv: () => (AssignRoleActionsDto),
|
|
655
727
|
gF: () => (UserActionResponseDto),
|
|
656
728
|
ji: () => (MyPermissionsResponseDto),
|
|
@@ -2674,6 +2746,21 @@ class PermissionService {
|
|
|
2674
2746
|
};
|
|
2675
2747
|
});
|
|
2676
2748
|
}
|
|
2749
|
+
/** Get users directly assigned an action (reverse lookup: action -> users) */ async getUsersForAction(actionId) {
|
|
2750
|
+
const permissionRepo = await this.getPermissionRepository();
|
|
2751
|
+
const permissions = await permissionRepo.find({
|
|
2752
|
+
where: {
|
|
2753
|
+
permissionType: _enums_iam_permission_type_enum_js__rspack_import_14/* .IamPermissionType.USER_ACTION */.V.USER_ACTION,
|
|
2754
|
+
targetType: _enums_iam_entity_type_enum_js__rspack_import_15/* .IamEntityType.ACTION */.n.ACTION,
|
|
2755
|
+
targetId: actionId
|
|
2756
|
+
}
|
|
2757
|
+
});
|
|
2758
|
+
return permissions.map((p)=>({
|
|
2759
|
+
id: p.id,
|
|
2760
|
+
userId: p.sourceId,
|
|
2761
|
+
createdAt: p.createdAt
|
|
2762
|
+
}));
|
|
2763
|
+
}
|
|
2677
2764
|
// Role-Action Permissions
|
|
2678
2765
|
async assignRoleActions(dto) {
|
|
2679
2766
|
if (!this.iamConfigService.isRbacEnabled()) {
|
|
@@ -3020,6 +3107,21 @@ class PermissionService {
|
|
|
3020
3107
|
};
|
|
3021
3108
|
});
|
|
3022
3109
|
}
|
|
3110
|
+
/** Get users assigned a role (reverse lookup: role -> users) */ async getUsersForRole(roleId) {
|
|
3111
|
+
const permissionRepo = await this.getPermissionRepository();
|
|
3112
|
+
const permissions = await permissionRepo.find({
|
|
3113
|
+
where: {
|
|
3114
|
+
permissionType: _enums_iam_permission_type_enum_js__rspack_import_14/* .IamPermissionType.USER_ROLE */.V.USER_ROLE,
|
|
3115
|
+
targetType: _enums_iam_entity_type_enum_js__rspack_import_15/* .IamEntityType.ROLE */.n.ROLE,
|
|
3116
|
+
targetId: roleId
|
|
3117
|
+
}
|
|
3118
|
+
});
|
|
3119
|
+
return permissions.map((p)=>({
|
|
3120
|
+
id: p.id,
|
|
3121
|
+
userId: p.sourceId,
|
|
3122
|
+
createdAt: p.createdAt
|
|
3123
|
+
}));
|
|
3124
|
+
}
|
|
3023
3125
|
// Effective (Merged) Permissions — self-scoped, company-wide + branch-specific
|
|
3024
3126
|
/** Get user's effective roles: company-wide (branchId null) merged with branch-specific */ async getUserEffectiveRoles(userId, companyId, branchId) {
|
|
3025
3127
|
const permissionRepo = await this.getPermissionRepository();
|
package/fesm/config/index.js
CHANGED
|
@@ -79,10 +79,12 @@ const PERMISSION_OPERATION_MESSAGES = {
|
|
|
79
79
|
};
|
|
80
80
|
const ROLE_PERMISSION_MESSAGES = {
|
|
81
81
|
ACTIONS_SUCCESS: 'role.permission.actions.success',
|
|
82
|
-
USER_ROLES_SUCCESS: 'role.permission.user.roles.success'
|
|
82
|
+
USER_ROLES_SUCCESS: 'role.permission.user.roles.success',
|
|
83
|
+
ROLE_USERS_SUCCESS: 'role.permission.role.users.success'
|
|
83
84
|
};
|
|
84
85
|
const USER_ACTION_PERMISSION_MESSAGES = {
|
|
85
|
-
GET_SUCCESS: 'user.action.permission.get.success'
|
|
86
|
+
GET_SUCCESS: 'user.action.permission.get.success',
|
|
87
|
+
ACTION_USERS_SUCCESS: 'user.action.permission.action.users.success'
|
|
86
88
|
};
|
|
87
89
|
const COMPANY_ACTION_PERMISSION_MESSAGES = {
|
|
88
90
|
GET_SUCCESS: 'company.action.permission.get.success'
|
package/fesm/dtos/index.js
CHANGED
|
@@ -278,11 +278,13 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
278
278
|
__webpack_require__.d(__webpack_exports__, {
|
|
279
279
|
$l: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.$l),
|
|
280
280
|
$v: () => (/* reexport safe */ _role_dto_js__rspack_import_1.$v),
|
|
281
|
+
A6: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.A6),
|
|
281
282
|
AU: () => (/* reexport safe */ _action_dto_js__rspack_import_0.AU),
|
|
282
283
|
CM: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.CM),
|
|
283
284
|
E4: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.E4),
|
|
284
285
|
H: () => (/* reexport safe */ _action_dto_js__rspack_import_0.H),
|
|
285
286
|
LK: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.LK),
|
|
287
|
+
MO: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.MO),
|
|
286
288
|
Nx: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.Nx),
|
|
287
289
|
O_: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.O_),
|
|
288
290
|
Q0: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.Q0),
|
|
@@ -291,11 +293,13 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
291
293
|
Tm: () => (/* reexport safe */ _role_dto_js__rspack_import_1.Tm),
|
|
292
294
|
Uu: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.Uu),
|
|
293
295
|
Vw: () => (/* reexport safe */ _action_dto_js__rspack_import_0.Vw),
|
|
296
|
+
Ww: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.Ww),
|
|
294
297
|
Xz: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.Xz),
|
|
295
298
|
Yb: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.Yb),
|
|
296
299
|
Zn: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.Zn),
|
|
297
300
|
aG: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.aG),
|
|
298
301
|
c8: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.c8),
|
|
302
|
+
cB: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.cB),
|
|
299
303
|
cv: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.cv),
|
|
300
304
|
gF: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.gF),
|
|
301
305
|
gb: () => (/* reexport safe */ _action_dto_js__rspack_import_0.gb),
|
|
@@ -541,6 +545,26 @@ _ts_decorate([
|
|
|
541
545
|
(0,class_validator__rspack_import_2.IsUUID)(),
|
|
542
546
|
_ts_metadata("design:type", String)
|
|
543
547
|
], GetCompanyActionsDto.prototype, "companyId", void 0);
|
|
548
|
+
class GetRoleUsersDto {
|
|
549
|
+
roleId;
|
|
550
|
+
}
|
|
551
|
+
_ts_decorate([
|
|
552
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)({
|
|
553
|
+
description: 'Role ID to get assigned users for'
|
|
554
|
+
}),
|
|
555
|
+
(0,class_validator__rspack_import_2.IsUUID)(),
|
|
556
|
+
_ts_metadata("design:type", String)
|
|
557
|
+
], GetRoleUsersDto.prototype, "roleId", void 0);
|
|
558
|
+
class GetActionUsersDto {
|
|
559
|
+
actionId;
|
|
560
|
+
}
|
|
561
|
+
_ts_decorate([
|
|
562
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)({
|
|
563
|
+
description: 'Action ID to get assigned users for'
|
|
564
|
+
}),
|
|
565
|
+
(0,class_validator__rspack_import_2.IsUUID)(),
|
|
566
|
+
_ts_metadata("design:type", String)
|
|
567
|
+
], GetActionUsersDto.prototype, "actionId", void 0);
|
|
544
568
|
class GetUserRolesDto {
|
|
545
569
|
userId;
|
|
546
570
|
companyId;
|
|
@@ -759,6 +783,52 @@ _ts_decorate([
|
|
|
759
783
|
}),
|
|
760
784
|
_ts_metadata("design:type", typeof Date === "undefined" ? Object : Date)
|
|
761
785
|
], UserRoleResponseDto.prototype, "createdAt", void 0);
|
|
786
|
+
class RoleUserResponseDto {
|
|
787
|
+
id;
|
|
788
|
+
userId;
|
|
789
|
+
createdAt;
|
|
790
|
+
}
|
|
791
|
+
_ts_decorate([
|
|
792
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)({
|
|
793
|
+
description: 'Permission ID'
|
|
794
|
+
}),
|
|
795
|
+
_ts_metadata("design:type", String)
|
|
796
|
+
], RoleUserResponseDto.prototype, "id", void 0);
|
|
797
|
+
_ts_decorate([
|
|
798
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)({
|
|
799
|
+
description: 'User ID'
|
|
800
|
+
}),
|
|
801
|
+
_ts_metadata("design:type", String)
|
|
802
|
+
], RoleUserResponseDto.prototype, "userId", void 0);
|
|
803
|
+
_ts_decorate([
|
|
804
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)({
|
|
805
|
+
description: 'When this permission was created'
|
|
806
|
+
}),
|
|
807
|
+
_ts_metadata("design:type", typeof Date === "undefined" ? Object : Date)
|
|
808
|
+
], RoleUserResponseDto.prototype, "createdAt", void 0);
|
|
809
|
+
class ActionUserResponseDto {
|
|
810
|
+
id;
|
|
811
|
+
userId;
|
|
812
|
+
createdAt;
|
|
813
|
+
}
|
|
814
|
+
_ts_decorate([
|
|
815
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)({
|
|
816
|
+
description: 'Permission ID'
|
|
817
|
+
}),
|
|
818
|
+
_ts_metadata("design:type", String)
|
|
819
|
+
], ActionUserResponseDto.prototype, "id", void 0);
|
|
820
|
+
_ts_decorate([
|
|
821
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)({
|
|
822
|
+
description: 'User ID'
|
|
823
|
+
}),
|
|
824
|
+
_ts_metadata("design:type", String)
|
|
825
|
+
], ActionUserResponseDto.prototype, "userId", void 0);
|
|
826
|
+
_ts_decorate([
|
|
827
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)({
|
|
828
|
+
description: 'When this permission was created'
|
|
829
|
+
}),
|
|
830
|
+
_ts_metadata("design:type", typeof Date === "undefined" ? Object : Date)
|
|
831
|
+
], ActionUserResponseDto.prototype, "createdAt", void 0);
|
|
762
832
|
class FrontendActionDto {
|
|
763
833
|
code;
|
|
764
834
|
name;
|
|
@@ -847,18 +917,22 @@ _ts_decorate([
|
|
|
847
917
|
|
|
848
918
|
__webpack_require__.d(__webpack_exports__, {
|
|
849
919
|
$l: () => (RoleActionResponseDto),
|
|
920
|
+
A6: () => (GetRoleUsersDto),
|
|
850
921
|
CM: () => (GetUserActionsDto),
|
|
851
922
|
E4: () => (CompanyActionResponseDto),
|
|
852
923
|
LK: () => (UserRoleResponseDto),
|
|
924
|
+
MO: () => (RoleUserResponseDto),
|
|
853
925
|
Nx: () => (AssignCompanyActionsDto),
|
|
854
926
|
O_: () => (MyPermissionsQueryDto),
|
|
855
927
|
Q0: () => (GetUserRolesDto),
|
|
856
928
|
Uu: () => (PermissionItemDto),
|
|
929
|
+
Ww: () => (GetActionUsersDto),
|
|
857
930
|
Xz: () => (AssignUserRolesDto),
|
|
858
931
|
Yb: () => (FrontendActionDto),
|
|
859
932
|
Zn: () => (GetRoleActionsDto),
|
|
860
933
|
aG: () => (PermissionAction),
|
|
861
934
|
c8: () => (GetCompanyActionsDto),
|
|
935
|
+
cB: () => (ActionUserResponseDto),
|
|
862
936
|
cv: () => (AssignRoleActionsDto),
|
|
863
937
|
gF: () => (UserActionResponseDto),
|
|
864
938
|
ji: () => (MyPermissionsResponseDto),
|
|
@@ -1065,6 +1139,7 @@ var __webpack_exports__ = __webpack_exec__(890);var __webpack_exports__ActionRes
|
|
|
1065
1139
|
var __webpack_exports__ActionTreeDto = __webpack_exports__.gb;
|
|
1066
1140
|
var __webpack_exports__ActionTreeForPermissionDto = __webpack_exports__.y9;
|
|
1067
1141
|
var __webpack_exports__ActionTreeQueryDto = __webpack_exports__.AU;
|
|
1142
|
+
var __webpack_exports__ActionUserResponseDto = __webpack_exports__.cB;
|
|
1068
1143
|
var __webpack_exports__AssignCompanyActionsDto = __webpack_exports__.Nx;
|
|
1069
1144
|
var __webpack_exports__AssignRoleActionsDto = __webpack_exports__.cv;
|
|
1070
1145
|
var __webpack_exports__AssignUserActionsDto = __webpack_exports__.zs;
|
|
@@ -1073,8 +1148,10 @@ var __webpack_exports__CompanyActionResponseDto = __webpack_exports__.E4;
|
|
|
1073
1148
|
var __webpack_exports__CreateActionDto = __webpack_exports__.Sk;
|
|
1074
1149
|
var __webpack_exports__CreateRoleDto = __webpack_exports__.St;
|
|
1075
1150
|
var __webpack_exports__FrontendActionDto = __webpack_exports__.Yb;
|
|
1151
|
+
var __webpack_exports__GetActionUsersDto = __webpack_exports__.Ww;
|
|
1076
1152
|
var __webpack_exports__GetCompanyActionsDto = __webpack_exports__.c8;
|
|
1077
1153
|
var __webpack_exports__GetRoleActionsDto = __webpack_exports__.Zn;
|
|
1154
|
+
var __webpack_exports__GetRoleUsersDto = __webpack_exports__.A6;
|
|
1078
1155
|
var __webpack_exports__GetUserActionsDto = __webpack_exports__.CM;
|
|
1079
1156
|
var __webpack_exports__GetUserRolesDto = __webpack_exports__.Q0;
|
|
1080
1157
|
var __webpack_exports__MyPermissionsQueryDto = __webpack_exports__.O_;
|
|
@@ -1084,8 +1161,9 @@ var __webpack_exports__PermissionItemDto = __webpack_exports__.Uu;
|
|
|
1084
1161
|
var __webpack_exports__PermissionOperationResultDto = __webpack_exports__.xJ;
|
|
1085
1162
|
var __webpack_exports__RoleActionResponseDto = __webpack_exports__.$l;
|
|
1086
1163
|
var __webpack_exports__RoleResponseDto = __webpack_exports__.Tm;
|
|
1164
|
+
var __webpack_exports__RoleUserResponseDto = __webpack_exports__.MO;
|
|
1087
1165
|
var __webpack_exports__UpdateActionDto = __webpack_exports__.H;
|
|
1088
1166
|
var __webpack_exports__UpdateRoleDto = __webpack_exports__.$v;
|
|
1089
1167
|
var __webpack_exports__UserActionResponseDto = __webpack_exports__.gF;
|
|
1090
1168
|
var __webpack_exports__UserRoleResponseDto = __webpack_exports__.LK;
|
|
1091
|
-
export { __webpack_exports__ActionResponseDto as ActionResponseDto, __webpack_exports__ActionTreeDto as ActionTreeDto, __webpack_exports__ActionTreeForPermissionDto as ActionTreeForPermissionDto, __webpack_exports__ActionTreeQueryDto as ActionTreeQueryDto, __webpack_exports__AssignCompanyActionsDto as AssignCompanyActionsDto, __webpack_exports__AssignRoleActionsDto as AssignRoleActionsDto, __webpack_exports__AssignUserActionsDto as AssignUserActionsDto, __webpack_exports__AssignUserRolesDto as AssignUserRolesDto, __webpack_exports__CompanyActionResponseDto as CompanyActionResponseDto, __webpack_exports__CreateActionDto as CreateActionDto, __webpack_exports__CreateRoleDto as CreateRoleDto, __webpack_exports__FrontendActionDto as FrontendActionDto, __webpack_exports__GetCompanyActionsDto as GetCompanyActionsDto, __webpack_exports__GetRoleActionsDto as GetRoleActionsDto, __webpack_exports__GetUserActionsDto as GetUserActionsDto, __webpack_exports__GetUserRolesDto as GetUserRolesDto, __webpack_exports__MyPermissionsQueryDto as MyPermissionsQueryDto, __webpack_exports__MyPermissionsResponseDto as MyPermissionsResponseDto, __webpack_exports__PermissionAction as PermissionAction, __webpack_exports__PermissionItemDto as PermissionItemDto, __webpack_exports__PermissionOperationResultDto as PermissionOperationResultDto, __webpack_exports__RoleActionResponseDto as RoleActionResponseDto, __webpack_exports__RoleResponseDto as RoleResponseDto, __webpack_exports__UpdateActionDto as UpdateActionDto, __webpack_exports__UpdateRoleDto as UpdateRoleDto, __webpack_exports__UserActionResponseDto as UserActionResponseDto, __webpack_exports__UserRoleResponseDto as UserRoleResponseDto };
|
|
1169
|
+
export { __webpack_exports__ActionResponseDto as ActionResponseDto, __webpack_exports__ActionTreeDto as ActionTreeDto, __webpack_exports__ActionTreeForPermissionDto as ActionTreeForPermissionDto, __webpack_exports__ActionTreeQueryDto as ActionTreeQueryDto, __webpack_exports__ActionUserResponseDto as ActionUserResponseDto, __webpack_exports__AssignCompanyActionsDto as AssignCompanyActionsDto, __webpack_exports__AssignRoleActionsDto as AssignRoleActionsDto, __webpack_exports__AssignUserActionsDto as AssignUserActionsDto, __webpack_exports__AssignUserRolesDto as AssignUserRolesDto, __webpack_exports__CompanyActionResponseDto as CompanyActionResponseDto, __webpack_exports__CreateActionDto as CreateActionDto, __webpack_exports__CreateRoleDto as CreateRoleDto, __webpack_exports__FrontendActionDto as FrontendActionDto, __webpack_exports__GetActionUsersDto as GetActionUsersDto, __webpack_exports__GetCompanyActionsDto as GetCompanyActionsDto, __webpack_exports__GetRoleActionsDto as GetRoleActionsDto, __webpack_exports__GetRoleUsersDto as GetRoleUsersDto, __webpack_exports__GetUserActionsDto as GetUserActionsDto, __webpack_exports__GetUserRolesDto as GetUserRolesDto, __webpack_exports__MyPermissionsQueryDto as MyPermissionsQueryDto, __webpack_exports__MyPermissionsResponseDto as MyPermissionsResponseDto, __webpack_exports__PermissionAction as PermissionAction, __webpack_exports__PermissionItemDto as PermissionItemDto, __webpack_exports__PermissionOperationResultDto as PermissionOperationResultDto, __webpack_exports__RoleActionResponseDto as RoleActionResponseDto, __webpack_exports__RoleResponseDto as RoleResponseDto, __webpack_exports__RoleUserResponseDto as RoleUserResponseDto, __webpack_exports__UpdateActionDto as UpdateActionDto, __webpack_exports__UpdateRoleDto as UpdateRoleDto, __webpack_exports__UserActionResponseDto as UserActionResponseDto, __webpack_exports__UserRoleResponseDto as UserRoleResponseDto };
|
package/fesm/index.js
CHANGED
|
@@ -253,11 +253,13 @@ ${permissionMode === permission_type_enum/* .IAMPermissionMode.FULL */.w.FULL ?
|
|
|
253
253
|
__webpack_require__.d(__webpack_exports__, {
|
|
254
254
|
$l: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.$l),
|
|
255
255
|
$v: () => (/* reexport safe */ _role_dto_js__rspack_import_1.$v),
|
|
256
|
+
A6: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.A6),
|
|
256
257
|
AU: () => (/* reexport safe */ _action_dto_js__rspack_import_0.AU),
|
|
257
258
|
CM: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.CM),
|
|
258
259
|
E4: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.E4),
|
|
259
260
|
H: () => (/* reexport safe */ _action_dto_js__rspack_import_0.H),
|
|
260
261
|
LK: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.LK),
|
|
262
|
+
MO: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.MO),
|
|
261
263
|
Nx: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.Nx),
|
|
262
264
|
O_: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.O_),
|
|
263
265
|
Q0: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.Q0),
|
|
@@ -266,11 +268,13 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
266
268
|
Tm: () => (/* reexport safe */ _role_dto_js__rspack_import_1.Tm),
|
|
267
269
|
Uu: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.Uu),
|
|
268
270
|
Vw: () => (/* reexport safe */ _action_dto_js__rspack_import_0.Vw),
|
|
271
|
+
Ww: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.Ww),
|
|
269
272
|
Xz: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.Xz),
|
|
270
273
|
Yb: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.Yb),
|
|
271
274
|
Zn: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.Zn),
|
|
272
275
|
aG: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.aG),
|
|
273
276
|
c8: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.c8),
|
|
277
|
+
cB: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.cB),
|
|
274
278
|
cv: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.cv),
|
|
275
279
|
gF: () => (/* reexport safe */ _permission_dto_js__rspack_import_2.gF),
|
|
276
280
|
gb: () => (/* reexport safe */ _action_dto_js__rspack_import_0.gb),
|
|
@@ -408,6 +412,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
408
412
|
$l: () => (/* reexport safe */ _dtos_index_js__rspack_import_3.$l),
|
|
409
413
|
$m: () => (/* reexport safe */ _entities_index_js__rspack_import_4.$m),
|
|
410
414
|
$v: () => (/* reexport safe */ _dtos_index_js__rspack_import_3.$v),
|
|
415
|
+
A6: () => (/* reexport safe */ _dtos_index_js__rspack_import_3.A6),
|
|
411
416
|
AU: () => (/* reexport safe */ _dtos_index_js__rspack_import_3.AU),
|
|
412
417
|
CM: () => (/* reexport safe */ _dtos_index_js__rspack_import_3.CM),
|
|
413
418
|
D6: () => (/* reexport safe */ _services_index_js__rspack_import_8.D6),
|
|
@@ -419,6 +424,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
419
424
|
H: () => (/* reexport safe */ _dtos_index_js__rspack_import_3.H),
|
|
420
425
|
HP: () => (/* reexport safe */ _config_index_js__rspack_import_0.HP),
|
|
421
426
|
LK: () => (/* reexport safe */ _dtos_index_js__rspack_import_3.LK),
|
|
427
|
+
Ld: () => (/* reexport safe */ _entities_index_js__rspack_import_4.getIAMEntitiesByConfig),
|
|
428
|
+
MO: () => (/* reexport safe */ _dtos_index_js__rspack_import_3.MO),
|
|
422
429
|
M_: () => (/* reexport safe */ _config_index_js__rspack_import_0.M_),
|
|
423
430
|
NF: () => (/* reexport safe */ _controllers_index_js__rspack_import_1.NF),
|
|
424
431
|
Nt: () => (/* reexport safe */ _services_index_js__rspack_import_8.Nt),
|
|
@@ -437,6 +444,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
437
444
|
Uu: () => (/* reexport safe */ _dtos_index_js__rspack_import_3.Uu),
|
|
438
445
|
Vw: () => (/* reexport safe */ _dtos_index_js__rspack_import_3.Vw),
|
|
439
446
|
WK: () => (/* reexport safe */ _services_index_js__rspack_import_8.WK),
|
|
447
|
+
Ww: () => (/* reexport safe */ _dtos_index_js__rspack_import_3.Ww),
|
|
440
448
|
X2: () => (/* reexport safe */ _enums_index_js__rspack_import_5.X2),
|
|
441
449
|
XV: () => (/* reexport safe */ _config_index_js__rspack_import_0.XV),
|
|
442
450
|
Xh: () => (/* reexport safe */ _entities_index_js__rspack_import_4.Xh),
|
|
@@ -447,7 +455,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
447
455
|
aG: () => (/* reexport safe */ _dtos_index_js__rspack_import_3.aG),
|
|
448
456
|
aZ: () => (/* reexport safe */ _entities_index_js__rspack_import_4.aZ),
|
|
449
457
|
c8: () => (/* reexport safe */ _dtos_index_js__rspack_import_3.c8),
|
|
450
|
-
cB: () => (/* reexport safe */
|
|
458
|
+
cB: () => (/* reexport safe */ _dtos_index_js__rspack_import_3.cB),
|
|
451
459
|
cv: () => (/* reexport safe */ _dtos_index_js__rspack_import_3.cv),
|
|
452
460
|
eh: () => (/* reexport safe */ _config_index_js__rspack_import_0.eh),
|
|
453
461
|
gF: () => (/* reexport safe */ _dtos_index_js__rspack_import_3.gF),
|
|
@@ -742,6 +750,7 @@ var __webpack_exports__ActionTreeDto = __webpack_exports__.gb;
|
|
|
742
750
|
var __webpack_exports__ActionTreeForPermissionDto = __webpack_exports__.y9;
|
|
743
751
|
var __webpack_exports__ActionTreeQueryDto = __webpack_exports__.AU;
|
|
744
752
|
var __webpack_exports__ActionType = __webpack_exports__.X2;
|
|
753
|
+
var __webpack_exports__ActionUserResponseDto = __webpack_exports__.cB;
|
|
745
754
|
var __webpack_exports__AssignCompanyActionsDto = __webpack_exports__.Nx;
|
|
746
755
|
var __webpack_exports__AssignRoleActionsDto = __webpack_exports__.cv;
|
|
747
756
|
var __webpack_exports__AssignUserActionsDto = __webpack_exports__.zs;
|
|
@@ -752,8 +761,10 @@ var __webpack_exports__CompanyActionResponseDto = __webpack_exports__.E4;
|
|
|
752
761
|
var __webpack_exports__CreateActionDto = __webpack_exports__.Sk;
|
|
753
762
|
var __webpack_exports__CreateRoleDto = __webpack_exports__.St;
|
|
754
763
|
var __webpack_exports__FrontendActionDto = __webpack_exports__.Yb;
|
|
764
|
+
var __webpack_exports__GetActionUsersDto = __webpack_exports__.Ww;
|
|
755
765
|
var __webpack_exports__GetCompanyActionsDto = __webpack_exports__.c8;
|
|
756
766
|
var __webpack_exports__GetRoleActionsDto = __webpack_exports__.Zn;
|
|
767
|
+
var __webpack_exports__GetRoleUsersDto = __webpack_exports__.A6;
|
|
757
768
|
var __webpack_exports__GetUserActionsDto = __webpack_exports__.CM;
|
|
758
769
|
var __webpack_exports__GetUserRolesDto = __webpack_exports__.Q0;
|
|
759
770
|
var __webpack_exports__IAMAllEntities = __webpack_exports__.SB;
|
|
@@ -791,6 +802,7 @@ var __webpack_exports__RoleController = __webpack_exports__.lk;
|
|
|
791
802
|
var __webpack_exports__RolePermissionController = __webpack_exports__.uv;
|
|
792
803
|
var __webpack_exports__RoleResponseDto = __webpack_exports__.Tm;
|
|
793
804
|
var __webpack_exports__RoleService = __webpack_exports__.WK;
|
|
805
|
+
var __webpack_exports__RoleUserResponseDto = __webpack_exports__.MO;
|
|
794
806
|
var __webpack_exports__RoleWithCompany = __webpack_exports__.gP;
|
|
795
807
|
var __webpack_exports__USER_ACTION_PERMISSION_MESSAGES = __webpack_exports__.k;
|
|
796
808
|
var __webpack_exports__UpdateActionDto = __webpack_exports__.H;
|
|
@@ -800,7 +812,7 @@ var __webpack_exports__UserActionResponseDto = __webpack_exports__.gF;
|
|
|
800
812
|
var __webpack_exports__UserIamPermission = __webpack_exports__.yi;
|
|
801
813
|
var __webpack_exports__UserIamPermissionWithCompany = __webpack_exports__.tt;
|
|
802
814
|
var __webpack_exports__UserRoleResponseDto = __webpack_exports__.LK;
|
|
803
|
-
var __webpack_exports__getIAMEntitiesByConfig = __webpack_exports__.
|
|
815
|
+
var __webpack_exports__getIAMEntitiesByConfig = __webpack_exports__.Ld;
|
|
804
816
|
var __webpack_exports__iamSwaggerConfig = __webpack_exports__.sZ;
|
|
805
817
|
var __webpack_exports__validateCompanyAccess = __webpack_exports__.uK;
|
|
806
|
-
export { __webpack_exports__ACTION_MESSAGES as ACTION_MESSAGES, __webpack_exports__Action as Action, __webpack_exports__ActionController as ActionController, __webpack_exports__ActionResponseDto as ActionResponseDto, __webpack_exports__ActionService as ActionService, __webpack_exports__ActionTreeDto as ActionTreeDto, __webpack_exports__ActionTreeForPermissionDto as ActionTreeForPermissionDto, __webpack_exports__ActionTreeQueryDto as ActionTreeQueryDto, __webpack_exports__ActionType as ActionType, __webpack_exports__AssignCompanyActionsDto as AssignCompanyActionsDto, __webpack_exports__AssignRoleActionsDto as AssignRoleActionsDto, __webpack_exports__AssignUserActionsDto as AssignUserActionsDto, __webpack_exports__AssignUserRolesDto as AssignUserRolesDto, __webpack_exports__COMPANY_ACTION_PERMISSION_MESSAGES as COMPANY_ACTION_PERMISSION_MESSAGES, __webpack_exports__CompanyActionPermissionController as CompanyActionPermissionController, __webpack_exports__CompanyActionResponseDto as CompanyActionResponseDto, __webpack_exports__CreateActionDto as CreateActionDto, __webpack_exports__CreateRoleDto as CreateRoleDto, __webpack_exports__FrontendActionDto as FrontendActionDto, __webpack_exports__GetCompanyActionsDto as GetCompanyActionsDto, __webpack_exports__GetRoleActionsDto as GetRoleActionsDto, __webpack_exports__GetUserActionsDto as GetUserActionsDto, __webpack_exports__GetUserRolesDto as GetUserRolesDto, __webpack_exports__IAMAllEntities as IAMAllEntities, __webpack_exports__IAMCompanyEntities as IAMCompanyEntities, __webpack_exports__IAMConfigService as IAMConfigService, __webpack_exports__IAMCoreEntities as IAMCoreEntities, __webpack_exports__IAMDataSourceService as IAMDataSourceService, __webpack_exports__IAMModule as IAMModule, __webpack_exports__IAMPermissionMode as IAMPermissionMode, __webpack_exports__IAM_EVENT_ACTIONS as IAM_EVENT_ACTIONS, __webpack_exports__IAM_EVENT_ENTITIES as IAM_EVENT_ENTITIES, __webpack_exports__IAM_EVENT_MODULE as IAM_EVENT_MODULE, __webpack_exports__IAM_MODE_MESSAGES as IAM_MODE_MESSAGES, __webpack_exports__IAM_MODULE_OPTIONS as IAM_MODULE_OPTIONS, __webpack_exports__IamEntityType as IamEntityType, __webpack_exports__IamPermissionType as IamPermissionType, __webpack_exports__MY_PERMISSION_MESSAGES as MY_PERMISSION_MESSAGES, __webpack_exports__MyPermissionController as MyPermissionController, __webpack_exports__MyPermissionsQueryDto as MyPermissionsQueryDto, __webpack_exports__MyPermissionsResponseDto as MyPermissionsResponseDto, __webpack_exports__PERMISSION_OPERATION_MESSAGES as PERMISSION_OPERATION_MESSAGES, __webpack_exports__PermissionAction as PermissionAction, __webpack_exports__PermissionBase as PermissionBase, __webpack_exports__PermissionCacheService as PermissionCacheService, __webpack_exports__PermissionItemDto as PermissionItemDto, __webpack_exports__PermissionModeHelper as PermissionModeHelper, __webpack_exports__PermissionOperationResultDto as PermissionOperationResultDto, __webpack_exports__PermissionService as PermissionService, __webpack_exports__ROLE_MESSAGES as ROLE_MESSAGES, __webpack_exports__ROLE_PERMISSION_MESSAGES as ROLE_PERMISSION_MESSAGES, __webpack_exports__Role as Role, __webpack_exports__RoleActionResponseDto as RoleActionResponseDto, __webpack_exports__RoleBase as RoleBase, __webpack_exports__RoleController as RoleController, __webpack_exports__RolePermissionController as RolePermissionController, __webpack_exports__RoleResponseDto as RoleResponseDto, __webpack_exports__RoleService as RoleService, __webpack_exports__RoleWithCompany as RoleWithCompany, __webpack_exports__USER_ACTION_PERMISSION_MESSAGES as USER_ACTION_PERMISSION_MESSAGES, __webpack_exports__UpdateActionDto as UpdateActionDto, __webpack_exports__UpdateRoleDto as UpdateRoleDto, __webpack_exports__UserActionPermissionController as UserActionPermissionController, __webpack_exports__UserActionResponseDto as UserActionResponseDto, __webpack_exports__UserIamPermission as UserIamPermission, __webpack_exports__UserIamPermissionWithCompany as UserIamPermissionWithCompany, __webpack_exports__UserRoleResponseDto as UserRoleResponseDto, __webpack_exports__getIAMEntitiesByConfig as getIAMEntitiesByConfig, __webpack_exports__iamSwaggerConfig as iamSwaggerConfig, __webpack_exports__validateCompanyAccess as validateCompanyAccess };
|
|
818
|
+
export { __webpack_exports__ACTION_MESSAGES as ACTION_MESSAGES, __webpack_exports__Action as Action, __webpack_exports__ActionController as ActionController, __webpack_exports__ActionResponseDto as ActionResponseDto, __webpack_exports__ActionService as ActionService, __webpack_exports__ActionTreeDto as ActionTreeDto, __webpack_exports__ActionTreeForPermissionDto as ActionTreeForPermissionDto, __webpack_exports__ActionTreeQueryDto as ActionTreeQueryDto, __webpack_exports__ActionType as ActionType, __webpack_exports__ActionUserResponseDto as ActionUserResponseDto, __webpack_exports__AssignCompanyActionsDto as AssignCompanyActionsDto, __webpack_exports__AssignRoleActionsDto as AssignRoleActionsDto, __webpack_exports__AssignUserActionsDto as AssignUserActionsDto, __webpack_exports__AssignUserRolesDto as AssignUserRolesDto, __webpack_exports__COMPANY_ACTION_PERMISSION_MESSAGES as COMPANY_ACTION_PERMISSION_MESSAGES, __webpack_exports__CompanyActionPermissionController as CompanyActionPermissionController, __webpack_exports__CompanyActionResponseDto as CompanyActionResponseDto, __webpack_exports__CreateActionDto as CreateActionDto, __webpack_exports__CreateRoleDto as CreateRoleDto, __webpack_exports__FrontendActionDto as FrontendActionDto, __webpack_exports__GetActionUsersDto as GetActionUsersDto, __webpack_exports__GetCompanyActionsDto as GetCompanyActionsDto, __webpack_exports__GetRoleActionsDto as GetRoleActionsDto, __webpack_exports__GetRoleUsersDto as GetRoleUsersDto, __webpack_exports__GetUserActionsDto as GetUserActionsDto, __webpack_exports__GetUserRolesDto as GetUserRolesDto, __webpack_exports__IAMAllEntities as IAMAllEntities, __webpack_exports__IAMCompanyEntities as IAMCompanyEntities, __webpack_exports__IAMConfigService as IAMConfigService, __webpack_exports__IAMCoreEntities as IAMCoreEntities, __webpack_exports__IAMDataSourceService as IAMDataSourceService, __webpack_exports__IAMModule as IAMModule, __webpack_exports__IAMPermissionMode as IAMPermissionMode, __webpack_exports__IAM_EVENT_ACTIONS as IAM_EVENT_ACTIONS, __webpack_exports__IAM_EVENT_ENTITIES as IAM_EVENT_ENTITIES, __webpack_exports__IAM_EVENT_MODULE as IAM_EVENT_MODULE, __webpack_exports__IAM_MODE_MESSAGES as IAM_MODE_MESSAGES, __webpack_exports__IAM_MODULE_OPTIONS as IAM_MODULE_OPTIONS, __webpack_exports__IamEntityType as IamEntityType, __webpack_exports__IamPermissionType as IamPermissionType, __webpack_exports__MY_PERMISSION_MESSAGES as MY_PERMISSION_MESSAGES, __webpack_exports__MyPermissionController as MyPermissionController, __webpack_exports__MyPermissionsQueryDto as MyPermissionsQueryDto, __webpack_exports__MyPermissionsResponseDto as MyPermissionsResponseDto, __webpack_exports__PERMISSION_OPERATION_MESSAGES as PERMISSION_OPERATION_MESSAGES, __webpack_exports__PermissionAction as PermissionAction, __webpack_exports__PermissionBase as PermissionBase, __webpack_exports__PermissionCacheService as PermissionCacheService, __webpack_exports__PermissionItemDto as PermissionItemDto, __webpack_exports__PermissionModeHelper as PermissionModeHelper, __webpack_exports__PermissionOperationResultDto as PermissionOperationResultDto, __webpack_exports__PermissionService as PermissionService, __webpack_exports__ROLE_MESSAGES as ROLE_MESSAGES, __webpack_exports__ROLE_PERMISSION_MESSAGES as ROLE_PERMISSION_MESSAGES, __webpack_exports__Role as Role, __webpack_exports__RoleActionResponseDto as RoleActionResponseDto, __webpack_exports__RoleBase as RoleBase, __webpack_exports__RoleController as RoleController, __webpack_exports__RolePermissionController as RolePermissionController, __webpack_exports__RoleResponseDto as RoleResponseDto, __webpack_exports__RoleService as RoleService, __webpack_exports__RoleUserResponseDto as RoleUserResponseDto, __webpack_exports__RoleWithCompany as RoleWithCompany, __webpack_exports__USER_ACTION_PERMISSION_MESSAGES as USER_ACTION_PERMISSION_MESSAGES, __webpack_exports__UpdateActionDto as UpdateActionDto, __webpack_exports__UpdateRoleDto as UpdateRoleDto, __webpack_exports__UserActionPermissionController as UserActionPermissionController, __webpack_exports__UserActionResponseDto as UserActionResponseDto, __webpack_exports__UserIamPermission as UserIamPermission, __webpack_exports__UserIamPermissionWithCompany as UserIamPermissionWithCompany, __webpack_exports__UserRoleResponseDto as UserRoleResponseDto, __webpack_exports__getIAMEntitiesByConfig as getIAMEntitiesByConfig, __webpack_exports__iamSwaggerConfig as iamSwaggerConfig, __webpack_exports__validateCompanyAccess as validateCompanyAccess };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flusys/nestjs-iam",
|
|
3
|
-
"version": "8.0.0
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "Identity and Access Management (IAM) module for NestJS applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./fesm/index.js",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"express": "^5.0.0"
|
|
84
84
|
},
|
|
85
85
|
"dependencies": {
|
|
86
|
-
"@flusys/nestjs-core": "8.0.0
|
|
87
|
-
"@flusys/nestjs-shared": "8.0.0
|
|
86
|
+
"@flusys/nestjs-core": "8.0.0",
|
|
87
|
+
"@flusys/nestjs-shared": "8.0.0"
|
|
88
88
|
}
|
|
89
89
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AssignCompanyActionsDto, AssignRoleActionsDto, AssignUserActionsDto, AssignUserRolesDto, CompanyActionResponseDto, MyPermissionsResponseDto, PermissionOperationResultDto, RoleActionResponseDto, UserActionResponseDto, UserRoleResponseDto } from '../dtos/permission.dto.js';
|
|
1
|
+
import { ActionUserResponseDto, AssignCompanyActionsDto, AssignRoleActionsDto, AssignUserActionsDto, AssignUserRolesDto, CompanyActionResponseDto, MyPermissionsResponseDto, PermissionOperationResultDto, RoleActionResponseDto, RoleUserResponseDto, UserActionResponseDto, UserRoleResponseDto } from '../dtos/permission.dto.js';
|
|
2
2
|
import { IAMConfigService } from './iam-config.service.js';
|
|
3
3
|
import { IAMDataSourceService } from './iam-datasource.service.js';
|
|
4
4
|
import { PermissionCacheService } from './permission-cache.service.js';
|
|
@@ -13,12 +13,14 @@ export declare class PermissionService {
|
|
|
13
13
|
private getActionsMap;
|
|
14
14
|
assignUserActions(dto: AssignUserActionsDto): Promise<PermissionOperationResultDto>;
|
|
15
15
|
getUserActions(userId: string, companyId: string | undefined, branchId: string | undefined): Promise<UserActionResponseDto[]>;
|
|
16
|
+
getUsersForAction(actionId: string): Promise<ActionUserResponseDto[]>;
|
|
16
17
|
assignRoleActions(dto: AssignRoleActionsDto): Promise<PermissionOperationResultDto>;
|
|
17
18
|
getRoleActions(roleId: string): Promise<RoleActionResponseDto[]>;
|
|
18
19
|
assignCompanyActions(dto: AssignCompanyActionsDto): Promise<PermissionOperationResultDto>;
|
|
19
20
|
getCompanyActions(companyId: string, isOnlyId?: boolean): Promise<CompanyActionResponseDto[] | string[]>;
|
|
20
21
|
assignUserRoles(dto: AssignUserRolesDto): Promise<PermissionOperationResultDto>;
|
|
21
22
|
getUserRoles(userId: string, branchId?: string | undefined, companyId?: string | undefined): Promise<UserRoleResponseDto[]>;
|
|
23
|
+
getUsersForRole(roleId: string): Promise<RoleUserResponseDto[]>;
|
|
22
24
|
getUserEffectiveRoles(userId: string, companyId?: string | null, branchId?: string | null): Promise<UserRoleResponseDto[]>;
|
|
23
25
|
getUserEffectiveActions(userId: string, companyId?: string | null, branchId?: string | null): Promise<UserActionResponseDto[]>;
|
|
24
26
|
getMyPermissions(userId: string, branchId: string | null, companyId?: string | null, parentCodes?: string[]): Promise<MyPermissionsResponseDto>;
|