@forklaunch/interfaces-iam 0.6.2 → 0.6.4
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 -7
- package/lib/interfaces/index.d.mts +128 -36
- package/lib/interfaces/index.d.ts +128 -36
- package/lib/interfaces/index.js +8 -4
- package/lib/types/index.d.mts +76 -50
- package/lib/types/index.d.ts +76 -50
- package/lib/types/index.js +8 -4
- package/package.json +5 -5
|
@@ -30,15 +30,12 @@ export interface UserService<
|
|
|
30
30
|
): Promise<Params['UserDto'][]>;
|
|
31
31
|
deleteUser(idDto: Params['IdDto'], em?: EntityManager): Promise<void>;
|
|
32
32
|
deleteBatchUsers(idsDto: Params['IdsDto'], em?: EntityManager): Promise<void>;
|
|
33
|
-
|
|
34
|
-
verifyHasRole(
|
|
33
|
+
surfaceRoles(
|
|
35
34
|
idDto: Params['IdDto'],
|
|
36
|
-
roleId: string,
|
|
37
35
|
em?: EntityManager
|
|
38
|
-
): Promise<
|
|
39
|
-
|
|
36
|
+
): Promise<Params['UserDto']['roles']>;
|
|
37
|
+
surfacePermissions(
|
|
40
38
|
idDto: Params['IdDto'],
|
|
41
|
-
permissionId: string,
|
|
42
39
|
em?: EntityManager
|
|
43
|
-
): Promise<
|
|
40
|
+
): Promise<Params['UserDto']['roles'][0]['permissions']>;
|
|
44
41
|
}
|
|
@@ -1,47 +1,139 @@
|
|
|
1
1
|
import { EntityManager } from '@mikro-orm/core';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
OrganizationServiceParameters,
|
|
4
|
+
PermissionServiceParameters,
|
|
5
|
+
RoleServiceParameters,
|
|
6
|
+
UserServiceParameters
|
|
7
|
+
} from '../types/index.mjs';
|
|
3
8
|
import '@forklaunch/common';
|
|
4
9
|
|
|
5
|
-
interface OrganizationService<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
interface OrganizationService<
|
|
11
|
+
OrganizationStatus,
|
|
12
|
+
Params extends
|
|
13
|
+
OrganizationServiceParameters<OrganizationStatus> = OrganizationServiceParameters<OrganizationStatus>
|
|
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>;
|
|
10
28
|
}
|
|
11
29
|
|
|
12
|
-
interface PermissionService<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
30
|
+
interface PermissionService<
|
|
31
|
+
Params extends PermissionServiceParameters = PermissionServiceParameters
|
|
32
|
+
> {
|
|
33
|
+
createPermission(
|
|
34
|
+
permissionDto: Params['CreatePermissionDto'],
|
|
35
|
+
em?: EntityManager
|
|
36
|
+
): Promise<Params['PermissionDto']>;
|
|
37
|
+
createBatchPermissions(
|
|
38
|
+
permissionDtos: Params['CreatePermissionDto'][],
|
|
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>;
|
|
21
62
|
}
|
|
22
63
|
|
|
23
|
-
interface RoleService<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
64
|
+
interface RoleService<
|
|
65
|
+
Params extends RoleServiceParameters = RoleServiceParameters
|
|
66
|
+
> {
|
|
67
|
+
createRole(
|
|
68
|
+
roleDto: Params['CreateRoleDto'],
|
|
69
|
+
em?: EntityManager
|
|
70
|
+
): Promise<Params['RoleDto']>;
|
|
71
|
+
createBatchRoles(
|
|
72
|
+
roleDtos: Params['CreateRoleDto'][],
|
|
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>;
|
|
32
93
|
}
|
|
33
94
|
|
|
34
|
-
interface UserService<
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
95
|
+
interface UserService<
|
|
96
|
+
Params extends UserServiceParameters = UserServiceParameters
|
|
97
|
+
> {
|
|
98
|
+
createUser(
|
|
99
|
+
userDto: Params['CreateUserDto'],
|
|
100
|
+
em?: EntityManager
|
|
101
|
+
): Promise<Params['UserDto']>;
|
|
102
|
+
createBatchUsers(
|
|
103
|
+
userDtos: Params['CreateUserDto'][],
|
|
104
|
+
em?: EntityManager
|
|
105
|
+
): Promise<Params['UserDto'][]>;
|
|
106
|
+
getUser(
|
|
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']>;
|
|
45
132
|
}
|
|
46
133
|
|
|
47
|
-
export type {
|
|
134
|
+
export type {
|
|
135
|
+
OrganizationService,
|
|
136
|
+
PermissionService,
|
|
137
|
+
RoleService,
|
|
138
|
+
UserService
|
|
139
|
+
};
|
|
@@ -1,47 +1,139 @@
|
|
|
1
1
|
import { EntityManager } from '@mikro-orm/core';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
OrganizationServiceParameters,
|
|
4
|
+
PermissionServiceParameters,
|
|
5
|
+
RoleServiceParameters,
|
|
6
|
+
UserServiceParameters
|
|
7
|
+
} from '../types/index.js';
|
|
3
8
|
import '@forklaunch/common';
|
|
4
9
|
|
|
5
|
-
interface OrganizationService<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
interface OrganizationService<
|
|
11
|
+
OrganizationStatus,
|
|
12
|
+
Params extends
|
|
13
|
+
OrganizationServiceParameters<OrganizationStatus> = OrganizationServiceParameters<OrganizationStatus>
|
|
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>;
|
|
10
28
|
}
|
|
11
29
|
|
|
12
|
-
interface PermissionService<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
30
|
+
interface PermissionService<
|
|
31
|
+
Params extends PermissionServiceParameters = PermissionServiceParameters
|
|
32
|
+
> {
|
|
33
|
+
createPermission(
|
|
34
|
+
permissionDto: Params['CreatePermissionDto'],
|
|
35
|
+
em?: EntityManager
|
|
36
|
+
): Promise<Params['PermissionDto']>;
|
|
37
|
+
createBatchPermissions(
|
|
38
|
+
permissionDtos: Params['CreatePermissionDto'][],
|
|
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>;
|
|
21
62
|
}
|
|
22
63
|
|
|
23
|
-
interface RoleService<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
64
|
+
interface RoleService<
|
|
65
|
+
Params extends RoleServiceParameters = RoleServiceParameters
|
|
66
|
+
> {
|
|
67
|
+
createRole(
|
|
68
|
+
roleDto: Params['CreateRoleDto'],
|
|
69
|
+
em?: EntityManager
|
|
70
|
+
): Promise<Params['RoleDto']>;
|
|
71
|
+
createBatchRoles(
|
|
72
|
+
roleDtos: Params['CreateRoleDto'][],
|
|
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>;
|
|
32
93
|
}
|
|
33
94
|
|
|
34
|
-
interface UserService<
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
95
|
+
interface UserService<
|
|
96
|
+
Params extends UserServiceParameters = UserServiceParameters
|
|
97
|
+
> {
|
|
98
|
+
createUser(
|
|
99
|
+
userDto: Params['CreateUserDto'],
|
|
100
|
+
em?: EntityManager
|
|
101
|
+
): Promise<Params['UserDto']>;
|
|
102
|
+
createBatchUsers(
|
|
103
|
+
userDtos: Params['CreateUserDto'][],
|
|
104
|
+
em?: EntityManager
|
|
105
|
+
): Promise<Params['UserDto'][]>;
|
|
106
|
+
getUser(
|
|
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']>;
|
|
45
132
|
}
|
|
46
133
|
|
|
47
|
-
export type {
|
|
134
|
+
export type {
|
|
135
|
+
OrganizationService,
|
|
136
|
+
PermissionService,
|
|
137
|
+
RoleService,
|
|
138
|
+
UserService
|
|
139
|
+
};
|
package/lib/interfaces/index.js
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
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 (from && typeof from ===
|
|
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, {
|
|
10
|
+
__defProp(to, key, {
|
|
11
|
+
get: () => from[key],
|
|
12
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
13
|
+
});
|
|
11
14
|
}
|
|
12
15
|
return to;
|
|
13
16
|
};
|
|
14
|
-
var __toCommonJS = (mod) =>
|
|
17
|
+
var __toCommonJS = (mod) =>
|
|
18
|
+
__copyProps(__defProp({}, '__esModule', { value: true }), mod);
|
|
15
19
|
|
|
16
20
|
// interfaces/index.ts
|
|
17
21
|
var interfaces_exports = {};
|
package/lib/types/index.d.mts
CHANGED
|
@@ -1,82 +1,108 @@
|
|
|
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> &
|
|
8
|
+
type UpdatePermissionDto = Partial<CreatePermissionDto> &
|
|
9
|
+
IdDto & {
|
|
9
10
|
removeFromRolesIds?: string[];
|
|
10
|
-
};
|
|
11
|
-
type PermissionDto = CreatePermissionDto &
|
|
11
|
+
};
|
|
12
|
+
type PermissionDto = CreatePermissionDto &
|
|
13
|
+
IdDto &
|
|
14
|
+
Partial<RecordTimingDto> & {
|
|
12
15
|
slug: string;
|
|
13
16
|
providerFields?: unknown;
|
|
14
|
-
};
|
|
17
|
+
};
|
|
15
18
|
type PermissionServiceParameters = {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
CreatePermissionDto: CreatePermissionDto;
|
|
20
|
+
PermissionDto: PermissionDto;
|
|
21
|
+
UpdatePermissionDto: UpdatePermissionDto;
|
|
22
|
+
IdDto: IdDto;
|
|
23
|
+
IdsDto: IdsDto;
|
|
21
24
|
};
|
|
22
25
|
|
|
23
26
|
type CreateRoleDto = Partial<IdDto> & {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
name: string;
|
|
28
|
+
permissionIds?: string[];
|
|
29
|
+
providerFields?: unknown;
|
|
27
30
|
};
|
|
28
31
|
type UpdateRoleDto = Partial<CreateRoleDto> & IdDto;
|
|
29
|
-
type RoleDto = Omit<CreateRoleDto, 'permissionIds'> &
|
|
32
|
+
type RoleDto = Omit<CreateRoleDto, 'permissionIds'> &
|
|
33
|
+
IdDto &
|
|
34
|
+
Partial<RecordTimingDto> & {
|
|
30
35
|
permissions: PermissionDto[];
|
|
31
|
-
};
|
|
36
|
+
};
|
|
32
37
|
type RoleServiceParameters = {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
CreateRoleDto: CreateRoleDto;
|
|
39
|
+
RoleDto: RoleDto;
|
|
40
|
+
UpdateRoleDto: UpdateRoleDto;
|
|
41
|
+
IdDto: IdDto;
|
|
42
|
+
IdsDto: IdsDto;
|
|
38
43
|
};
|
|
39
44
|
|
|
40
45
|
type CreateUserDto = Partial<IdDto> & {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
email: string;
|
|
47
|
+
password: string;
|
|
48
|
+
firstName: string;
|
|
49
|
+
lastName: string;
|
|
50
|
+
organization: string;
|
|
51
|
+
roles: string[];
|
|
52
|
+
phoneNumber?: string;
|
|
53
|
+
subscription?: string;
|
|
54
|
+
providerFields?: unknown;
|
|
50
55
|
};
|
|
51
56
|
type UpdateUserDto = Partial<Omit<CreateUserDto, 'organization'>> & IdDto;
|
|
52
|
-
type UserDto = Omit<CreateUserDto, 'roles' | 'password' | 'organization'> &
|
|
57
|
+
type UserDto = Omit<CreateUserDto, 'roles' | 'password' | 'organization'> &
|
|
58
|
+
IdDto &
|
|
59
|
+
Partial<RecordTimingDto> & {
|
|
53
60
|
roles: RoleDto[];
|
|
54
|
-
};
|
|
61
|
+
};
|
|
55
62
|
type UserServiceParameters = {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
63
|
+
CreateUserDto: CreateUserDto;
|
|
64
|
+
UserDto: UserDto;
|
|
65
|
+
UpdateUserDto: UpdateUserDto;
|
|
66
|
+
IdDto: IdDto;
|
|
67
|
+
IdsDto: IdsDto;
|
|
61
68
|
};
|
|
62
69
|
|
|
63
70
|
type CreateOrganizationDto = Partial<IdDto> & {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
71
|
+
name: string;
|
|
72
|
+
domain: string;
|
|
73
|
+
subscription: string;
|
|
74
|
+
logoUrl?: string;
|
|
75
|
+
providerFields?: unknown;
|
|
69
76
|
};
|
|
70
77
|
type UpdateOrganizationDto = Partial<CreateOrganizationDto> & IdDto;
|
|
71
|
-
type OrganizationDto<OrganizationStatus> = CreateOrganizationDto &
|
|
78
|
+
type OrganizationDto<OrganizationStatus> = CreateOrganizationDto &
|
|
79
|
+
IdDto &
|
|
80
|
+
Partial<RecordTimingDto> & {
|
|
72
81
|
users: UserDto[];
|
|
73
82
|
status: OrganizationStatus[keyof OrganizationStatus];
|
|
74
|
-
};
|
|
83
|
+
};
|
|
75
84
|
type OrganizationServiceParameters<OrganizationStatus> = {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
85
|
+
CreateOrganizationDto: CreateOrganizationDto;
|
|
86
|
+
OrganizationDto: OrganizationDto<OrganizationStatus>;
|
|
87
|
+
UpdateOrganizationDto: UpdateOrganizationDto;
|
|
88
|
+
IdDto: IdDto;
|
|
80
89
|
};
|
|
81
90
|
|
|
82
|
-
export type {
|
|
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
|
+
};
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,82 +1,108 @@
|
|
|
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> &
|
|
8
|
+
type UpdatePermissionDto = Partial<CreatePermissionDto> &
|
|
9
|
+
IdDto & {
|
|
9
10
|
removeFromRolesIds?: string[];
|
|
10
|
-
};
|
|
11
|
-
type PermissionDto = CreatePermissionDto &
|
|
11
|
+
};
|
|
12
|
+
type PermissionDto = CreatePermissionDto &
|
|
13
|
+
IdDto &
|
|
14
|
+
Partial<RecordTimingDto> & {
|
|
12
15
|
slug: string;
|
|
13
16
|
providerFields?: unknown;
|
|
14
|
-
};
|
|
17
|
+
};
|
|
15
18
|
type PermissionServiceParameters = {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
CreatePermissionDto: CreatePermissionDto;
|
|
20
|
+
PermissionDto: PermissionDto;
|
|
21
|
+
UpdatePermissionDto: UpdatePermissionDto;
|
|
22
|
+
IdDto: IdDto;
|
|
23
|
+
IdsDto: IdsDto;
|
|
21
24
|
};
|
|
22
25
|
|
|
23
26
|
type CreateRoleDto = Partial<IdDto> & {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
name: string;
|
|
28
|
+
permissionIds?: string[];
|
|
29
|
+
providerFields?: unknown;
|
|
27
30
|
};
|
|
28
31
|
type UpdateRoleDto = Partial<CreateRoleDto> & IdDto;
|
|
29
|
-
type RoleDto = Omit<CreateRoleDto, 'permissionIds'> &
|
|
32
|
+
type RoleDto = Omit<CreateRoleDto, 'permissionIds'> &
|
|
33
|
+
IdDto &
|
|
34
|
+
Partial<RecordTimingDto> & {
|
|
30
35
|
permissions: PermissionDto[];
|
|
31
|
-
};
|
|
36
|
+
};
|
|
32
37
|
type RoleServiceParameters = {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
CreateRoleDto: CreateRoleDto;
|
|
39
|
+
RoleDto: RoleDto;
|
|
40
|
+
UpdateRoleDto: UpdateRoleDto;
|
|
41
|
+
IdDto: IdDto;
|
|
42
|
+
IdsDto: IdsDto;
|
|
38
43
|
};
|
|
39
44
|
|
|
40
45
|
type CreateUserDto = Partial<IdDto> & {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
email: string;
|
|
47
|
+
password: string;
|
|
48
|
+
firstName: string;
|
|
49
|
+
lastName: string;
|
|
50
|
+
organization: string;
|
|
51
|
+
roles: string[];
|
|
52
|
+
phoneNumber?: string;
|
|
53
|
+
subscription?: string;
|
|
54
|
+
providerFields?: unknown;
|
|
50
55
|
};
|
|
51
56
|
type UpdateUserDto = Partial<Omit<CreateUserDto, 'organization'>> & IdDto;
|
|
52
|
-
type UserDto = Omit<CreateUserDto, 'roles' | 'password' | 'organization'> &
|
|
57
|
+
type UserDto = Omit<CreateUserDto, 'roles' | 'password' | 'organization'> &
|
|
58
|
+
IdDto &
|
|
59
|
+
Partial<RecordTimingDto> & {
|
|
53
60
|
roles: RoleDto[];
|
|
54
|
-
};
|
|
61
|
+
};
|
|
55
62
|
type UserServiceParameters = {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
63
|
+
CreateUserDto: CreateUserDto;
|
|
64
|
+
UserDto: UserDto;
|
|
65
|
+
UpdateUserDto: UpdateUserDto;
|
|
66
|
+
IdDto: IdDto;
|
|
67
|
+
IdsDto: IdsDto;
|
|
61
68
|
};
|
|
62
69
|
|
|
63
70
|
type CreateOrganizationDto = Partial<IdDto> & {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
71
|
+
name: string;
|
|
72
|
+
domain: string;
|
|
73
|
+
subscription: string;
|
|
74
|
+
logoUrl?: string;
|
|
75
|
+
providerFields?: unknown;
|
|
69
76
|
};
|
|
70
77
|
type UpdateOrganizationDto = Partial<CreateOrganizationDto> & IdDto;
|
|
71
|
-
type OrganizationDto<OrganizationStatus> = CreateOrganizationDto &
|
|
78
|
+
type OrganizationDto<OrganizationStatus> = CreateOrganizationDto &
|
|
79
|
+
IdDto &
|
|
80
|
+
Partial<RecordTimingDto> & {
|
|
72
81
|
users: UserDto[];
|
|
73
82
|
status: OrganizationStatus[keyof OrganizationStatus];
|
|
74
|
-
};
|
|
83
|
+
};
|
|
75
84
|
type OrganizationServiceParameters<OrganizationStatus> = {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
85
|
+
CreateOrganizationDto: CreateOrganizationDto;
|
|
86
|
+
OrganizationDto: OrganizationDto<OrganizationStatus>;
|
|
87
|
+
UpdateOrganizationDto: UpdateOrganizationDto;
|
|
88
|
+
IdDto: IdDto;
|
|
80
89
|
};
|
|
81
90
|
|
|
82
|
-
export type {
|
|
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
|
+
};
|
package/lib/types/index.js
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
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 (from && typeof from ===
|
|
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, {
|
|
10
|
+
__defProp(to, key, {
|
|
11
|
+
get: () => from[key],
|
|
12
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
13
|
+
});
|
|
11
14
|
}
|
|
12
15
|
return to;
|
|
13
16
|
};
|
|
14
|
-
var __toCommonJS = (mod) =>
|
|
17
|
+
var __toCommonJS = (mod) =>
|
|
18
|
+
__copyProps(__defProp({}, '__esModule', { value: true }), mod);
|
|
15
19
|
|
|
16
20
|
// types/index.ts
|
|
17
21
|
var types_exports = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forklaunch/interfaces-iam",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.4",
|
|
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.7",
|
|
34
|
+
"@mikro-orm/core": "^6.5.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
37
|
+
"@typescript/native-preview": "7.0.0-dev.20250911.1",
|
|
38
38
|
"depcheck": "^1.4.7",
|
|
39
39
|
"prettier": "^3.6.2",
|
|
40
|
-
"typedoc": "^0.28.
|
|
40
|
+
"typedoc": "^0.28.12"
|
|
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",
|