@forklaunch/interfaces-iam 0.6.4 → 0.7.1
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/lib/eject/domain/interfaces/user.service.interface.ts +4 -0
- package/lib/interfaces/index.d.mts +37 -128
- package/lib/interfaces/index.d.ts +37 -128
- package/lib/interfaces/index.js +4 -8
- package/lib/types/index.d.mts +50 -76
- package/lib/types/index.d.ts +50 -76
- package/lib/types/index.js +4 -8
- package/package.json +5 -5
|
@@ -12,6 +12,10 @@ export interface UserService<
|
|
|
12
12
|
userDtos: Params['CreateUserDto'][],
|
|
13
13
|
em?: EntityManager
|
|
14
14
|
): Promise<Params['UserDto'][]>;
|
|
15
|
+
getOrganizationIdByUserId(
|
|
16
|
+
idDto: Params['IdDto'],
|
|
17
|
+
em?: EntityManager
|
|
18
|
+
): Promise<string>;
|
|
15
19
|
getUser(
|
|
16
20
|
idDto: Params['IdDto'],
|
|
17
21
|
em?: EntityManager
|
|
@@ -1,139 +1,48 @@
|
|
|
1
1
|
import { EntityManager } from '@mikro-orm/core';
|
|
2
|
-
import {
|
|
3
|
-
OrganizationServiceParameters,
|
|
4
|
-
PermissionServiceParameters,
|
|
5
|
-
RoleServiceParameters,
|
|
6
|
-
UserServiceParameters
|
|
7
|
-
} from '../types/index.mjs';
|
|
2
|
+
import { OrganizationServiceParameters, PermissionServiceParameters, RoleServiceParameters, UserServiceParameters } from '../types/index.mjs';
|
|
8
3
|
import '@forklaunch/common';
|
|
9
4
|
|
|
10
|
-
interface OrganizationService<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
createOrganization(
|
|
16
|
-
organizationDto: Params['CreateOrganizationDto'],
|
|
17
|
-
em?: EntityManager
|
|
18
|
-
): Promise<Params['OrganizationDto']>;
|
|
19
|
-
getOrganization(
|
|
20
|
-
idDto: Params['IdDto'],
|
|
21
|
-
em?: EntityManager
|
|
22
|
-
): Promise<Params['OrganizationDto']>;
|
|
23
|
-
updateOrganization(
|
|
24
|
-
organizationDto: Params['UpdateOrganizationDto'],
|
|
25
|
-
em?: EntityManager
|
|
26
|
-
): Promise<Params['OrganizationDto']>;
|
|
27
|
-
deleteOrganization(idDto: Params['IdDto'], em?: EntityManager): Promise<void>;
|
|
5
|
+
interface OrganizationService<OrganizationStatus, Params extends OrganizationServiceParameters<OrganizationStatus> = OrganizationServiceParameters<OrganizationStatus>> {
|
|
6
|
+
createOrganization(organizationDto: Params['CreateOrganizationDto'], em?: EntityManager): Promise<Params['OrganizationDto']>;
|
|
7
|
+
getOrganization(idDto: Params['IdDto'], em?: EntityManager): Promise<Params['OrganizationDto']>;
|
|
8
|
+
updateOrganization(organizationDto: Params['UpdateOrganizationDto'], em?: EntityManager): Promise<Params['OrganizationDto']>;
|
|
9
|
+
deleteOrganization(idDto: Params['IdDto'], em?: EntityManager): Promise<void>;
|
|
28
10
|
}
|
|
29
11
|
|
|
30
|
-
interface PermissionService<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
em?: EntityManager
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
em?: EntityManager
|
|
40
|
-
): Promise<Params['PermissionDto'][]>;
|
|
41
|
-
getPermission(
|
|
42
|
-
idDto: Params['IdDto'],
|
|
43
|
-
em?: EntityManager
|
|
44
|
-
): Promise<Params['PermissionDto']>;
|
|
45
|
-
getBatchPermissions(
|
|
46
|
-
idsDto: Params['IdsDto'],
|
|
47
|
-
em?: EntityManager
|
|
48
|
-
): Promise<Params['PermissionDto'][]>;
|
|
49
|
-
updatePermission(
|
|
50
|
-
permissionDto: Params['UpdatePermissionDto'],
|
|
51
|
-
em?: EntityManager
|
|
52
|
-
): Promise<Params['PermissionDto']>;
|
|
53
|
-
updateBatchPermissions(
|
|
54
|
-
permissionDtos: Params['UpdatePermissionDto'][],
|
|
55
|
-
em?: EntityManager
|
|
56
|
-
): Promise<Params['PermissionDto'][]>;
|
|
57
|
-
deletePermission(idDto: Params['IdDto'], em?: EntityManager): Promise<void>;
|
|
58
|
-
deleteBatchPermissions(
|
|
59
|
-
idsDto: Params['IdsDto'],
|
|
60
|
-
em?: EntityManager
|
|
61
|
-
): Promise<void>;
|
|
12
|
+
interface PermissionService<Params extends PermissionServiceParameters = PermissionServiceParameters> {
|
|
13
|
+
createPermission(permissionDto: Params['CreatePermissionDto'], em?: EntityManager): Promise<Params['PermissionDto']>;
|
|
14
|
+
createBatchPermissions(permissionDtos: Params['CreatePermissionDto'][], em?: EntityManager): Promise<Params['PermissionDto'][]>;
|
|
15
|
+
getPermission(idDto: Params['IdDto'], em?: EntityManager): Promise<Params['PermissionDto']>;
|
|
16
|
+
getBatchPermissions(idsDto: Params['IdsDto'], em?: EntityManager): Promise<Params['PermissionDto'][]>;
|
|
17
|
+
updatePermission(permissionDto: Params['UpdatePermissionDto'], em?: EntityManager): Promise<Params['PermissionDto']>;
|
|
18
|
+
updateBatchPermissions(permissionDtos: Params['UpdatePermissionDto'][], em?: EntityManager): Promise<Params['PermissionDto'][]>;
|
|
19
|
+
deletePermission(idDto: Params['IdDto'], em?: EntityManager): Promise<void>;
|
|
20
|
+
deleteBatchPermissions(idsDto: Params['IdsDto'], em?: EntityManager): Promise<void>;
|
|
62
21
|
}
|
|
63
22
|
|
|
64
|
-
interface RoleService<
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
em?: EntityManager
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
em?: EntityManager
|
|
74
|
-
): Promise<Params['RoleDto'][]>;
|
|
75
|
-
getRole(
|
|
76
|
-
idDto: Params['IdDto'],
|
|
77
|
-
em?: EntityManager
|
|
78
|
-
): Promise<Params['RoleDto']>;
|
|
79
|
-
getBatchRoles(
|
|
80
|
-
idsDto: Params['IdsDto'],
|
|
81
|
-
em?: EntityManager
|
|
82
|
-
): Promise<Params['RoleDto'][]>;
|
|
83
|
-
updateRole(
|
|
84
|
-
roleDto: Params['UpdateRoleDto'],
|
|
85
|
-
em?: EntityManager
|
|
86
|
-
): Promise<Params['RoleDto']>;
|
|
87
|
-
updateBatchRoles(
|
|
88
|
-
roleDtos: Params['UpdateRoleDto'][],
|
|
89
|
-
em?: EntityManager
|
|
90
|
-
): Promise<Params['RoleDto'][]>;
|
|
91
|
-
deleteRole(idDto: Params['IdDto'], em?: EntityManager): Promise<void>;
|
|
92
|
-
deleteBatchRoles(idsDto: Params['IdsDto'], em?: EntityManager): Promise<void>;
|
|
23
|
+
interface RoleService<Params extends RoleServiceParameters = RoleServiceParameters> {
|
|
24
|
+
createRole(roleDto: Params['CreateRoleDto'], em?: EntityManager): Promise<Params['RoleDto']>;
|
|
25
|
+
createBatchRoles(roleDtos: Params['CreateRoleDto'][], em?: EntityManager): Promise<Params['RoleDto'][]>;
|
|
26
|
+
getRole(idDto: Params['IdDto'], em?: EntityManager): Promise<Params['RoleDto']>;
|
|
27
|
+
getBatchRoles(idsDto: Params['IdsDto'], em?: EntityManager): Promise<Params['RoleDto'][]>;
|
|
28
|
+
updateRole(roleDto: Params['UpdateRoleDto'], em?: EntityManager): Promise<Params['RoleDto']>;
|
|
29
|
+
updateBatchRoles(roleDtos: Params['UpdateRoleDto'][], em?: EntityManager): Promise<Params['RoleDto'][]>;
|
|
30
|
+
deleteRole(idDto: Params['IdDto'], em?: EntityManager): Promise<void>;
|
|
31
|
+
deleteBatchRoles(idsDto: Params['IdsDto'], em?: EntityManager): Promise<void>;
|
|
93
32
|
}
|
|
94
33
|
|
|
95
|
-
interface UserService<
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
em?: EntityManager
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
em?: EntityManager
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
idDto: Params['IdDto'],
|
|
108
|
-
em?: EntityManager
|
|
109
|
-
): Promise<Params['UserDto']>;
|
|
110
|
-
getBatchUsers(
|
|
111
|
-
idsDto: Params['IdsDto'],
|
|
112
|
-
em?: EntityManager
|
|
113
|
-
): Promise<Params['UserDto'][]>;
|
|
114
|
-
updateUser(
|
|
115
|
-
userDto: Params['UpdateUserDto'],
|
|
116
|
-
em?: EntityManager
|
|
117
|
-
): Promise<Params['UserDto']>;
|
|
118
|
-
updateBatchUsers(
|
|
119
|
-
userDtos: Params['UpdateUserDto'][],
|
|
120
|
-
em?: EntityManager
|
|
121
|
-
): Promise<Params['UserDto'][]>;
|
|
122
|
-
deleteUser(idDto: Params['IdDto'], em?: EntityManager): Promise<void>;
|
|
123
|
-
deleteBatchUsers(idsDto: Params['IdsDto'], em?: EntityManager): Promise<void>;
|
|
124
|
-
surfaceRoles(
|
|
125
|
-
idDto: Params['IdDto'],
|
|
126
|
-
em?: EntityManager
|
|
127
|
-
): Promise<Params['UserDto']['roles']>;
|
|
128
|
-
surfacePermissions(
|
|
129
|
-
idDto: Params['IdDto'],
|
|
130
|
-
em?: EntityManager
|
|
131
|
-
): Promise<Params['UserDto']['roles'][0]['permissions']>;
|
|
34
|
+
interface UserService<Params extends UserServiceParameters = UserServiceParameters> {
|
|
35
|
+
createUser(userDto: Params['CreateUserDto'], em?: EntityManager): Promise<Params['UserDto']>;
|
|
36
|
+
createBatchUsers(userDtos: Params['CreateUserDto'][], em?: EntityManager): Promise<Params['UserDto'][]>;
|
|
37
|
+
getOrganizationIdByUserId(idDto: Params['IdDto'], em?: EntityManager): Promise<string>;
|
|
38
|
+
getUser(idDto: Params['IdDto'], em?: EntityManager): Promise<Params['UserDto']>;
|
|
39
|
+
getBatchUsers(idsDto: Params['IdsDto'], em?: EntityManager): Promise<Params['UserDto'][]>;
|
|
40
|
+
updateUser(userDto: Params['UpdateUserDto'], em?: EntityManager): Promise<Params['UserDto']>;
|
|
41
|
+
updateBatchUsers(userDtos: Params['UpdateUserDto'][], em?: EntityManager): Promise<Params['UserDto'][]>;
|
|
42
|
+
deleteUser(idDto: Params['IdDto'], em?: EntityManager): Promise<void>;
|
|
43
|
+
deleteBatchUsers(idsDto: Params['IdsDto'], em?: EntityManager): Promise<void>;
|
|
44
|
+
surfaceRoles(idDto: Params['IdDto'], em?: EntityManager): Promise<Params['UserDto']['roles']>;
|
|
45
|
+
surfacePermissions(idDto: Params['IdDto'], em?: EntityManager): Promise<Params['UserDto']['roles'][0]['permissions']>;
|
|
132
46
|
}
|
|
133
47
|
|
|
134
|
-
export type {
|
|
135
|
-
OrganizationService,
|
|
136
|
-
PermissionService,
|
|
137
|
-
RoleService,
|
|
138
|
-
UserService
|
|
139
|
-
};
|
|
48
|
+
export type { OrganizationService, PermissionService, RoleService, UserService };
|
|
@@ -1,139 +1,48 @@
|
|
|
1
1
|
import { EntityManager } from '@mikro-orm/core';
|
|
2
|
-
import {
|
|
3
|
-
OrganizationServiceParameters,
|
|
4
|
-
PermissionServiceParameters,
|
|
5
|
-
RoleServiceParameters,
|
|
6
|
-
UserServiceParameters
|
|
7
|
-
} from '../types/index.js';
|
|
2
|
+
import { OrganizationServiceParameters, PermissionServiceParameters, RoleServiceParameters, UserServiceParameters } from '../types/index.js';
|
|
8
3
|
import '@forklaunch/common';
|
|
9
4
|
|
|
10
|
-
interface OrganizationService<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
createOrganization(
|
|
16
|
-
organizationDto: Params['CreateOrganizationDto'],
|
|
17
|
-
em?: EntityManager
|
|
18
|
-
): Promise<Params['OrganizationDto']>;
|
|
19
|
-
getOrganization(
|
|
20
|
-
idDto: Params['IdDto'],
|
|
21
|
-
em?: EntityManager
|
|
22
|
-
): Promise<Params['OrganizationDto']>;
|
|
23
|
-
updateOrganization(
|
|
24
|
-
organizationDto: Params['UpdateOrganizationDto'],
|
|
25
|
-
em?: EntityManager
|
|
26
|
-
): Promise<Params['OrganizationDto']>;
|
|
27
|
-
deleteOrganization(idDto: Params['IdDto'], em?: EntityManager): Promise<void>;
|
|
5
|
+
interface OrganizationService<OrganizationStatus, Params extends OrganizationServiceParameters<OrganizationStatus> = OrganizationServiceParameters<OrganizationStatus>> {
|
|
6
|
+
createOrganization(organizationDto: Params['CreateOrganizationDto'], em?: EntityManager): Promise<Params['OrganizationDto']>;
|
|
7
|
+
getOrganization(idDto: Params['IdDto'], em?: EntityManager): Promise<Params['OrganizationDto']>;
|
|
8
|
+
updateOrganization(organizationDto: Params['UpdateOrganizationDto'], em?: EntityManager): Promise<Params['OrganizationDto']>;
|
|
9
|
+
deleteOrganization(idDto: Params['IdDto'], em?: EntityManager): Promise<void>;
|
|
28
10
|
}
|
|
29
11
|
|
|
30
|
-
interface PermissionService<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
em?: EntityManager
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
em?: EntityManager
|
|
40
|
-
): Promise<Params['PermissionDto'][]>;
|
|
41
|
-
getPermission(
|
|
42
|
-
idDto: Params['IdDto'],
|
|
43
|
-
em?: EntityManager
|
|
44
|
-
): Promise<Params['PermissionDto']>;
|
|
45
|
-
getBatchPermissions(
|
|
46
|
-
idsDto: Params['IdsDto'],
|
|
47
|
-
em?: EntityManager
|
|
48
|
-
): Promise<Params['PermissionDto'][]>;
|
|
49
|
-
updatePermission(
|
|
50
|
-
permissionDto: Params['UpdatePermissionDto'],
|
|
51
|
-
em?: EntityManager
|
|
52
|
-
): Promise<Params['PermissionDto']>;
|
|
53
|
-
updateBatchPermissions(
|
|
54
|
-
permissionDtos: Params['UpdatePermissionDto'][],
|
|
55
|
-
em?: EntityManager
|
|
56
|
-
): Promise<Params['PermissionDto'][]>;
|
|
57
|
-
deletePermission(idDto: Params['IdDto'], em?: EntityManager): Promise<void>;
|
|
58
|
-
deleteBatchPermissions(
|
|
59
|
-
idsDto: Params['IdsDto'],
|
|
60
|
-
em?: EntityManager
|
|
61
|
-
): Promise<void>;
|
|
12
|
+
interface PermissionService<Params extends PermissionServiceParameters = PermissionServiceParameters> {
|
|
13
|
+
createPermission(permissionDto: Params['CreatePermissionDto'], em?: EntityManager): Promise<Params['PermissionDto']>;
|
|
14
|
+
createBatchPermissions(permissionDtos: Params['CreatePermissionDto'][], em?: EntityManager): Promise<Params['PermissionDto'][]>;
|
|
15
|
+
getPermission(idDto: Params['IdDto'], em?: EntityManager): Promise<Params['PermissionDto']>;
|
|
16
|
+
getBatchPermissions(idsDto: Params['IdsDto'], em?: EntityManager): Promise<Params['PermissionDto'][]>;
|
|
17
|
+
updatePermission(permissionDto: Params['UpdatePermissionDto'], em?: EntityManager): Promise<Params['PermissionDto']>;
|
|
18
|
+
updateBatchPermissions(permissionDtos: Params['UpdatePermissionDto'][], em?: EntityManager): Promise<Params['PermissionDto'][]>;
|
|
19
|
+
deletePermission(idDto: Params['IdDto'], em?: EntityManager): Promise<void>;
|
|
20
|
+
deleteBatchPermissions(idsDto: Params['IdsDto'], em?: EntityManager): Promise<void>;
|
|
62
21
|
}
|
|
63
22
|
|
|
64
|
-
interface RoleService<
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
em?: EntityManager
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
em?: EntityManager
|
|
74
|
-
): Promise<Params['RoleDto'][]>;
|
|
75
|
-
getRole(
|
|
76
|
-
idDto: Params['IdDto'],
|
|
77
|
-
em?: EntityManager
|
|
78
|
-
): Promise<Params['RoleDto']>;
|
|
79
|
-
getBatchRoles(
|
|
80
|
-
idsDto: Params['IdsDto'],
|
|
81
|
-
em?: EntityManager
|
|
82
|
-
): Promise<Params['RoleDto'][]>;
|
|
83
|
-
updateRole(
|
|
84
|
-
roleDto: Params['UpdateRoleDto'],
|
|
85
|
-
em?: EntityManager
|
|
86
|
-
): Promise<Params['RoleDto']>;
|
|
87
|
-
updateBatchRoles(
|
|
88
|
-
roleDtos: Params['UpdateRoleDto'][],
|
|
89
|
-
em?: EntityManager
|
|
90
|
-
): Promise<Params['RoleDto'][]>;
|
|
91
|
-
deleteRole(idDto: Params['IdDto'], em?: EntityManager): Promise<void>;
|
|
92
|
-
deleteBatchRoles(idsDto: Params['IdsDto'], em?: EntityManager): Promise<void>;
|
|
23
|
+
interface RoleService<Params extends RoleServiceParameters = RoleServiceParameters> {
|
|
24
|
+
createRole(roleDto: Params['CreateRoleDto'], em?: EntityManager): Promise<Params['RoleDto']>;
|
|
25
|
+
createBatchRoles(roleDtos: Params['CreateRoleDto'][], em?: EntityManager): Promise<Params['RoleDto'][]>;
|
|
26
|
+
getRole(idDto: Params['IdDto'], em?: EntityManager): Promise<Params['RoleDto']>;
|
|
27
|
+
getBatchRoles(idsDto: Params['IdsDto'], em?: EntityManager): Promise<Params['RoleDto'][]>;
|
|
28
|
+
updateRole(roleDto: Params['UpdateRoleDto'], em?: EntityManager): Promise<Params['RoleDto']>;
|
|
29
|
+
updateBatchRoles(roleDtos: Params['UpdateRoleDto'][], em?: EntityManager): Promise<Params['RoleDto'][]>;
|
|
30
|
+
deleteRole(idDto: Params['IdDto'], em?: EntityManager): Promise<void>;
|
|
31
|
+
deleteBatchRoles(idsDto: Params['IdsDto'], em?: EntityManager): Promise<void>;
|
|
93
32
|
}
|
|
94
33
|
|
|
95
|
-
interface UserService<
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
em?: EntityManager
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
em?: EntityManager
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
idDto: Params['IdDto'],
|
|
108
|
-
em?: EntityManager
|
|
109
|
-
): Promise<Params['UserDto']>;
|
|
110
|
-
getBatchUsers(
|
|
111
|
-
idsDto: Params['IdsDto'],
|
|
112
|
-
em?: EntityManager
|
|
113
|
-
): Promise<Params['UserDto'][]>;
|
|
114
|
-
updateUser(
|
|
115
|
-
userDto: Params['UpdateUserDto'],
|
|
116
|
-
em?: EntityManager
|
|
117
|
-
): Promise<Params['UserDto']>;
|
|
118
|
-
updateBatchUsers(
|
|
119
|
-
userDtos: Params['UpdateUserDto'][],
|
|
120
|
-
em?: EntityManager
|
|
121
|
-
): Promise<Params['UserDto'][]>;
|
|
122
|
-
deleteUser(idDto: Params['IdDto'], em?: EntityManager): Promise<void>;
|
|
123
|
-
deleteBatchUsers(idsDto: Params['IdsDto'], em?: EntityManager): Promise<void>;
|
|
124
|
-
surfaceRoles(
|
|
125
|
-
idDto: Params['IdDto'],
|
|
126
|
-
em?: EntityManager
|
|
127
|
-
): Promise<Params['UserDto']['roles']>;
|
|
128
|
-
surfacePermissions(
|
|
129
|
-
idDto: Params['IdDto'],
|
|
130
|
-
em?: EntityManager
|
|
131
|
-
): Promise<Params['UserDto']['roles'][0]['permissions']>;
|
|
34
|
+
interface UserService<Params extends UserServiceParameters = UserServiceParameters> {
|
|
35
|
+
createUser(userDto: Params['CreateUserDto'], em?: EntityManager): Promise<Params['UserDto']>;
|
|
36
|
+
createBatchUsers(userDtos: Params['CreateUserDto'][], em?: EntityManager): Promise<Params['UserDto'][]>;
|
|
37
|
+
getOrganizationIdByUserId(idDto: Params['IdDto'], em?: EntityManager): Promise<string>;
|
|
38
|
+
getUser(idDto: Params['IdDto'], em?: EntityManager): Promise<Params['UserDto']>;
|
|
39
|
+
getBatchUsers(idsDto: Params['IdsDto'], em?: EntityManager): Promise<Params['UserDto'][]>;
|
|
40
|
+
updateUser(userDto: Params['UpdateUserDto'], em?: EntityManager): Promise<Params['UserDto']>;
|
|
41
|
+
updateBatchUsers(userDtos: Params['UpdateUserDto'][], em?: EntityManager): Promise<Params['UserDto'][]>;
|
|
42
|
+
deleteUser(idDto: Params['IdDto'], em?: EntityManager): Promise<void>;
|
|
43
|
+
deleteBatchUsers(idsDto: Params['IdsDto'], em?: EntityManager): Promise<void>;
|
|
44
|
+
surfaceRoles(idDto: Params['IdDto'], em?: EntityManager): Promise<Params['UserDto']['roles']>;
|
|
45
|
+
surfacePermissions(idDto: Params['IdDto'], em?: EntityManager): Promise<Params['UserDto']['roles'][0]['permissions']>;
|
|
132
46
|
}
|
|
133
47
|
|
|
134
|
-
export type {
|
|
135
|
-
OrganizationService,
|
|
136
|
-
PermissionService,
|
|
137
|
-
RoleService,
|
|
138
|
-
UserService
|
|
139
|
-
};
|
|
48
|
+
export type { OrganizationService, PermissionService, RoleService, UserService };
|
package/lib/interfaces/index.js
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
6
|
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
8
|
for (let key of __getOwnPropNames(from))
|
|
9
9
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, {
|
|
11
|
-
get: () => from[key],
|
|
12
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
13
|
-
});
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
11
|
}
|
|
15
12
|
return to;
|
|
16
13
|
};
|
|
17
|
-
var __toCommonJS = (mod) =>
|
|
18
|
-
__copyProps(__defProp({}, '__esModule', { value: true }), mod);
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
15
|
|
|
20
16
|
// interfaces/index.ts
|
|
21
17
|
var interfaces_exports = {};
|
package/lib/types/index.d.mts
CHANGED
|
@@ -1,108 +1,82 @@
|
|
|
1
1
|
import { IdDto, RecordTimingDto, IdsDto } from '@forklaunch/common';
|
|
2
2
|
|
|
3
3
|
type CreatePermissionDto = Partial<IdDto> & {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
slug: string;
|
|
5
|
+
addToRolesIds?: string[];
|
|
6
|
+
providerFields?: unknown;
|
|
7
7
|
};
|
|
8
|
-
type UpdatePermissionDto = Partial<CreatePermissionDto> &
|
|
9
|
-
IdDto & {
|
|
8
|
+
type UpdatePermissionDto = Partial<CreatePermissionDto> & IdDto & {
|
|
10
9
|
removeFromRolesIds?: string[];
|
|
11
|
-
|
|
12
|
-
type PermissionDto = CreatePermissionDto &
|
|
13
|
-
IdDto &
|
|
14
|
-
Partial<RecordTimingDto> & {
|
|
10
|
+
};
|
|
11
|
+
type PermissionDto = CreatePermissionDto & IdDto & Partial<RecordTimingDto> & {
|
|
15
12
|
slug: string;
|
|
16
13
|
providerFields?: unknown;
|
|
17
|
-
|
|
14
|
+
};
|
|
18
15
|
type PermissionServiceParameters = {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
CreatePermissionDto: CreatePermissionDto;
|
|
17
|
+
PermissionDto: PermissionDto;
|
|
18
|
+
UpdatePermissionDto: UpdatePermissionDto;
|
|
19
|
+
IdDto: IdDto;
|
|
20
|
+
IdsDto: IdsDto;
|
|
24
21
|
};
|
|
25
22
|
|
|
26
23
|
type CreateRoleDto = Partial<IdDto> & {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
name: string;
|
|
25
|
+
permissionIds?: string[];
|
|
26
|
+
providerFields?: unknown;
|
|
30
27
|
};
|
|
31
28
|
type UpdateRoleDto = Partial<CreateRoleDto> & IdDto;
|
|
32
|
-
type RoleDto = Omit<CreateRoleDto, 'permissionIds'> &
|
|
33
|
-
IdDto &
|
|
34
|
-
Partial<RecordTimingDto> & {
|
|
29
|
+
type RoleDto = Omit<CreateRoleDto, 'permissionIds'> & IdDto & Partial<RecordTimingDto> & {
|
|
35
30
|
permissions: PermissionDto[];
|
|
36
|
-
|
|
31
|
+
};
|
|
37
32
|
type RoleServiceParameters = {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
33
|
+
CreateRoleDto: CreateRoleDto;
|
|
34
|
+
RoleDto: RoleDto;
|
|
35
|
+
UpdateRoleDto: UpdateRoleDto;
|
|
36
|
+
IdDto: IdDto;
|
|
37
|
+
IdsDto: IdsDto;
|
|
43
38
|
};
|
|
44
39
|
|
|
45
40
|
type CreateUserDto = Partial<IdDto> & {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
41
|
+
email: string;
|
|
42
|
+
password: string;
|
|
43
|
+
firstName: string;
|
|
44
|
+
lastName: string;
|
|
45
|
+
organization: string;
|
|
46
|
+
roles: string[];
|
|
47
|
+
phoneNumber?: string;
|
|
48
|
+
subscription?: string;
|
|
49
|
+
providerFields?: unknown;
|
|
55
50
|
};
|
|
56
51
|
type UpdateUserDto = Partial<Omit<CreateUserDto, 'organization'>> & IdDto;
|
|
57
|
-
type UserDto = Omit<CreateUserDto, 'roles' | 'password' | 'organization'> &
|
|
58
|
-
IdDto &
|
|
59
|
-
Partial<RecordTimingDto> & {
|
|
52
|
+
type UserDto = Omit<CreateUserDto, 'roles' | 'password' | 'organization'> & IdDto & Partial<RecordTimingDto> & {
|
|
60
53
|
roles: RoleDto[];
|
|
61
|
-
|
|
54
|
+
};
|
|
62
55
|
type UserServiceParameters = {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
56
|
+
CreateUserDto: CreateUserDto;
|
|
57
|
+
UserDto: UserDto;
|
|
58
|
+
UpdateUserDto: UpdateUserDto;
|
|
59
|
+
IdDto: IdDto;
|
|
60
|
+
IdsDto: IdsDto;
|
|
68
61
|
};
|
|
69
62
|
|
|
70
63
|
type CreateOrganizationDto = Partial<IdDto> & {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
64
|
+
name: string;
|
|
65
|
+
domain: string;
|
|
66
|
+
subscription: string;
|
|
67
|
+
logoUrl?: string;
|
|
68
|
+
providerFields?: unknown;
|
|
76
69
|
};
|
|
77
70
|
type UpdateOrganizationDto = Partial<CreateOrganizationDto> & IdDto;
|
|
78
|
-
type OrganizationDto<OrganizationStatus> = CreateOrganizationDto &
|
|
79
|
-
IdDto &
|
|
80
|
-
Partial<RecordTimingDto> & {
|
|
71
|
+
type OrganizationDto<OrganizationStatus> = CreateOrganizationDto & IdDto & Partial<RecordTimingDto> & {
|
|
81
72
|
users: UserDto[];
|
|
82
73
|
status: OrganizationStatus[keyof OrganizationStatus];
|
|
83
|
-
|
|
74
|
+
};
|
|
84
75
|
type OrganizationServiceParameters<OrganizationStatus> = {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
76
|
+
CreateOrganizationDto: CreateOrganizationDto;
|
|
77
|
+
OrganizationDto: OrganizationDto<OrganizationStatus>;
|
|
78
|
+
UpdateOrganizationDto: UpdateOrganizationDto;
|
|
79
|
+
IdDto: IdDto;
|
|
89
80
|
};
|
|
90
81
|
|
|
91
|
-
export type {
|
|
92
|
-
CreateOrganizationDto,
|
|
93
|
-
CreatePermissionDto,
|
|
94
|
-
CreateRoleDto,
|
|
95
|
-
CreateUserDto,
|
|
96
|
-
OrganizationDto,
|
|
97
|
-
OrganizationServiceParameters,
|
|
98
|
-
PermissionDto,
|
|
99
|
-
PermissionServiceParameters,
|
|
100
|
-
RoleDto,
|
|
101
|
-
RoleServiceParameters,
|
|
102
|
-
UpdateOrganizationDto,
|
|
103
|
-
UpdatePermissionDto,
|
|
104
|
-
UpdateRoleDto,
|
|
105
|
-
UpdateUserDto,
|
|
106
|
-
UserDto,
|
|
107
|
-
UserServiceParameters
|
|
108
|
-
};
|
|
82
|
+
export type { CreateOrganizationDto, CreatePermissionDto, CreateRoleDto, CreateUserDto, OrganizationDto, OrganizationServiceParameters, PermissionDto, PermissionServiceParameters, RoleDto, RoleServiceParameters, UpdateOrganizationDto, UpdatePermissionDto, UpdateRoleDto, UpdateUserDto, UserDto, UserServiceParameters };
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,108 +1,82 @@
|
|
|
1
1
|
import { IdDto, RecordTimingDto, IdsDto } from '@forklaunch/common';
|
|
2
2
|
|
|
3
3
|
type CreatePermissionDto = Partial<IdDto> & {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
slug: string;
|
|
5
|
+
addToRolesIds?: string[];
|
|
6
|
+
providerFields?: unknown;
|
|
7
7
|
};
|
|
8
|
-
type UpdatePermissionDto = Partial<CreatePermissionDto> &
|
|
9
|
-
IdDto & {
|
|
8
|
+
type UpdatePermissionDto = Partial<CreatePermissionDto> & IdDto & {
|
|
10
9
|
removeFromRolesIds?: string[];
|
|
11
|
-
|
|
12
|
-
type PermissionDto = CreatePermissionDto &
|
|
13
|
-
IdDto &
|
|
14
|
-
Partial<RecordTimingDto> & {
|
|
10
|
+
};
|
|
11
|
+
type PermissionDto = CreatePermissionDto & IdDto & Partial<RecordTimingDto> & {
|
|
15
12
|
slug: string;
|
|
16
13
|
providerFields?: unknown;
|
|
17
|
-
|
|
14
|
+
};
|
|
18
15
|
type PermissionServiceParameters = {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
CreatePermissionDto: CreatePermissionDto;
|
|
17
|
+
PermissionDto: PermissionDto;
|
|
18
|
+
UpdatePermissionDto: UpdatePermissionDto;
|
|
19
|
+
IdDto: IdDto;
|
|
20
|
+
IdsDto: IdsDto;
|
|
24
21
|
};
|
|
25
22
|
|
|
26
23
|
type CreateRoleDto = Partial<IdDto> & {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
name: string;
|
|
25
|
+
permissionIds?: string[];
|
|
26
|
+
providerFields?: unknown;
|
|
30
27
|
};
|
|
31
28
|
type UpdateRoleDto = Partial<CreateRoleDto> & IdDto;
|
|
32
|
-
type RoleDto = Omit<CreateRoleDto, 'permissionIds'> &
|
|
33
|
-
IdDto &
|
|
34
|
-
Partial<RecordTimingDto> & {
|
|
29
|
+
type RoleDto = Omit<CreateRoleDto, 'permissionIds'> & IdDto & Partial<RecordTimingDto> & {
|
|
35
30
|
permissions: PermissionDto[];
|
|
36
|
-
|
|
31
|
+
};
|
|
37
32
|
type RoleServiceParameters = {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
33
|
+
CreateRoleDto: CreateRoleDto;
|
|
34
|
+
RoleDto: RoleDto;
|
|
35
|
+
UpdateRoleDto: UpdateRoleDto;
|
|
36
|
+
IdDto: IdDto;
|
|
37
|
+
IdsDto: IdsDto;
|
|
43
38
|
};
|
|
44
39
|
|
|
45
40
|
type CreateUserDto = Partial<IdDto> & {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
41
|
+
email: string;
|
|
42
|
+
password: string;
|
|
43
|
+
firstName: string;
|
|
44
|
+
lastName: string;
|
|
45
|
+
organization: string;
|
|
46
|
+
roles: string[];
|
|
47
|
+
phoneNumber?: string;
|
|
48
|
+
subscription?: string;
|
|
49
|
+
providerFields?: unknown;
|
|
55
50
|
};
|
|
56
51
|
type UpdateUserDto = Partial<Omit<CreateUserDto, 'organization'>> & IdDto;
|
|
57
|
-
type UserDto = Omit<CreateUserDto, 'roles' | 'password' | 'organization'> &
|
|
58
|
-
IdDto &
|
|
59
|
-
Partial<RecordTimingDto> & {
|
|
52
|
+
type UserDto = Omit<CreateUserDto, 'roles' | 'password' | 'organization'> & IdDto & Partial<RecordTimingDto> & {
|
|
60
53
|
roles: RoleDto[];
|
|
61
|
-
|
|
54
|
+
};
|
|
62
55
|
type UserServiceParameters = {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
56
|
+
CreateUserDto: CreateUserDto;
|
|
57
|
+
UserDto: UserDto;
|
|
58
|
+
UpdateUserDto: UpdateUserDto;
|
|
59
|
+
IdDto: IdDto;
|
|
60
|
+
IdsDto: IdsDto;
|
|
68
61
|
};
|
|
69
62
|
|
|
70
63
|
type CreateOrganizationDto = Partial<IdDto> & {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
64
|
+
name: string;
|
|
65
|
+
domain: string;
|
|
66
|
+
subscription: string;
|
|
67
|
+
logoUrl?: string;
|
|
68
|
+
providerFields?: unknown;
|
|
76
69
|
};
|
|
77
70
|
type UpdateOrganizationDto = Partial<CreateOrganizationDto> & IdDto;
|
|
78
|
-
type OrganizationDto<OrganizationStatus> = CreateOrganizationDto &
|
|
79
|
-
IdDto &
|
|
80
|
-
Partial<RecordTimingDto> & {
|
|
71
|
+
type OrganizationDto<OrganizationStatus> = CreateOrganizationDto & IdDto & Partial<RecordTimingDto> & {
|
|
81
72
|
users: UserDto[];
|
|
82
73
|
status: OrganizationStatus[keyof OrganizationStatus];
|
|
83
|
-
|
|
74
|
+
};
|
|
84
75
|
type OrganizationServiceParameters<OrganizationStatus> = {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
76
|
+
CreateOrganizationDto: CreateOrganizationDto;
|
|
77
|
+
OrganizationDto: OrganizationDto<OrganizationStatus>;
|
|
78
|
+
UpdateOrganizationDto: UpdateOrganizationDto;
|
|
79
|
+
IdDto: IdDto;
|
|
89
80
|
};
|
|
90
81
|
|
|
91
|
-
export type {
|
|
92
|
-
CreateOrganizationDto,
|
|
93
|
-
CreatePermissionDto,
|
|
94
|
-
CreateRoleDto,
|
|
95
|
-
CreateUserDto,
|
|
96
|
-
OrganizationDto,
|
|
97
|
-
OrganizationServiceParameters,
|
|
98
|
-
PermissionDto,
|
|
99
|
-
PermissionServiceParameters,
|
|
100
|
-
RoleDto,
|
|
101
|
-
RoleServiceParameters,
|
|
102
|
-
UpdateOrganizationDto,
|
|
103
|
-
UpdatePermissionDto,
|
|
104
|
-
UpdateRoleDto,
|
|
105
|
-
UpdateUserDto,
|
|
106
|
-
UserDto,
|
|
107
|
-
UserServiceParameters
|
|
108
|
-
};
|
|
82
|
+
export type { CreateOrganizationDto, CreatePermissionDto, CreateRoleDto, CreateUserDto, OrganizationDto, OrganizationServiceParameters, PermissionDto, PermissionServiceParameters, RoleDto, RoleServiceParameters, UpdateOrganizationDto, UpdatePermissionDto, UpdateRoleDto, UpdateUserDto, UserDto, UserServiceParameters };
|
package/lib/types/index.js
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
6
|
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
8
|
for (let key of __getOwnPropNames(from))
|
|
9
9
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, {
|
|
11
|
-
get: () => from[key],
|
|
12
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
13
|
-
});
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
11
|
}
|
|
15
12
|
return to;
|
|
16
13
|
};
|
|
17
|
-
var __toCommonJS = (mod) =>
|
|
18
|
-
__copyProps(__defProp({}, '__esModule', { value: true }), mod);
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
15
|
|
|
20
16
|
// types/index.ts
|
|
21
17
|
var types_exports = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forklaunch/interfaces-iam",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "IAM interfaces for forklaunch",
|
|
5
5
|
"homepage": "https://github.com/forklaunch/forklaunch-js#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
"lib/**"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@forklaunch/common": "^0.6.
|
|
34
|
-
"@mikro-orm/core": "^6.5.
|
|
33
|
+
"@forklaunch/common": "^0.6.13",
|
|
34
|
+
"@mikro-orm/core": "^6.5.5"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
37
|
+
"@typescript/native-preview": "7.0.0-dev.20250924.1",
|
|
38
38
|
"depcheck": "^1.4.7",
|
|
39
39
|
"prettier": "^3.6.2",
|
|
40
|
-
"typedoc": "^0.28.
|
|
40
|
+
"typedoc": "^0.28.13"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "tsgo --noEmit && tsup interfaces/index.ts types/index.ts --format cjs,esm --no-splitting --dts --tsconfig tsconfig.json --out-dir lib --clean && if [ -f eject-package.bash ]; then pnpm package:eject; fi",
|