@forklaunch/implementation-iam-base 1.0.26 → 1.0.28
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/domain/schemas/index.d.ts +5 -480
- package/lib/domain/schemas/index.d.ts.map +1 -0
- package/lib/domain/schemas/organization.schema.d.ts +204 -0
- package/lib/domain/schemas/organization.schema.d.ts.map +1 -0
- package/lib/domain/schemas/permission.schema.d.ts +50 -0
- package/lib/domain/schemas/permission.schema.d.ts.map +1 -0
- package/lib/domain/schemas/role.schema.d.ts +74 -0
- package/lib/domain/schemas/role.schema.d.ts.map +1 -0
- package/lib/domain/schemas/typebox/organization.schema.d.ts +114 -0
- package/lib/domain/schemas/typebox/organization.schema.d.ts.map +1 -0
- package/lib/domain/schemas/typebox/permission.schema.d.ts +47 -0
- package/lib/domain/schemas/typebox/permission.schema.d.ts.map +1 -0
- package/lib/domain/schemas/typebox/role.schema.d.ts +59 -0
- package/lib/domain/schemas/typebox/role.schema.d.ts.map +1 -0
- package/lib/domain/schemas/typebox/user.schema.d.ts +105 -0
- package/lib/domain/schemas/typebox/user.schema.d.ts.map +1 -0
- package/lib/domain/schemas/user.schema.d.ts +146 -0
- package/lib/domain/schemas/user.schema.d.ts.map +1 -0
- package/lib/domain/schemas/zod/organization.schema.d.ts +290 -0
- package/lib/domain/schemas/zod/organization.schema.d.ts.map +1 -0
- package/lib/domain/schemas/zod/permission.schema.d.ts +47 -0
- package/lib/domain/schemas/zod/permission.schema.d.ts.map +1 -0
- package/lib/domain/schemas/zod/role.schema.d.ts +83 -0
- package/lib/domain/schemas/zod/role.schema.d.ts.map +1 -0
- package/lib/domain/schemas/zod/user.schema.d.ts +181 -0
- package/lib/domain/schemas/zod/user.schema.d.ts.map +1 -0
- package/lib/domain/types/iamDto.types.d.ts +23 -0
- package/lib/domain/types/iamDto.types.d.ts.map +1 -0
- package/lib/domain/types/iamEntities.types.d.ts +55 -0
- package/lib/domain/types/iamEntities.types.d.ts.map +1 -0
- package/lib/domain/types/index.d.ts +7 -318
- package/lib/domain/types/index.d.ts.map +1 -0
- package/lib/domain/types/organization.mapper.types.d.ts +18 -0
- package/lib/domain/types/organization.mapper.types.d.ts.map +1 -0
- package/lib/domain/types/permission.mapper.types.d.ts +22 -0
- package/lib/domain/types/permission.mapper.types.d.ts.map +1 -0
- package/lib/domain/types/role.mapper.types.d.ts +18 -0
- package/lib/domain/types/role.mapper.types.d.ts.map +1 -0
- package/lib/domain/types/user.mapper.types.d.ts +18 -0
- package/lib/domain/types/user.mapper.types.d.ts.map +1 -0
- package/lib/persistence/entities/index.d.ts +173 -0
- package/lib/persistence/entities/index.d.ts.map +1 -0
- package/lib/services/index.d.ts +5 -101
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/organization.service.d.ts +24 -0
- package/lib/services/organization.service.d.ts.map +1 -0
- package/lib/services/permission.service.d.ts +35 -0
- package/lib/services/permission.service.d.ts.map +1 -0
- package/lib/services/role.service.d.ts +28 -0
- package/lib/services/role.service.d.ts.map +1 -0
- package/lib/services/user.service.d.ts +41 -0
- package/lib/services/user.service.d.ts.map +1 -0
- package/package.json +34 -13
- package/lib/domain/schemas/index.d.mts +0 -480
- package/lib/domain/types/index.d.mts +0 -318
- package/lib/services/index.d.mts +0 -103
|
@@ -1,318 +0,0 @@
|
|
|
1
|
-
import { OrganizationDto, CreateOrganizationDto, UpdateOrganizationDto, PermissionDto, CreatePermissionDto, UpdatePermissionDto, UpdateRoleDto, RoleDto, CreateRoleDto, UserDto, CreateUserDto, UpdateUserDto } from '@forklaunch/interfaces-iam/types';
|
|
2
|
-
import * as _mikro_orm_core from '@mikro-orm/core';
|
|
3
|
-
import { InferEntity, EntityManager } from '@mikro-orm/core';
|
|
4
|
-
|
|
5
|
-
type OrganizationDtos<OrganizationStatus> = {
|
|
6
|
-
OrganizationMapper: OrganizationDto<OrganizationStatus>;
|
|
7
|
-
CreateOrganizationMapper: CreateOrganizationDto;
|
|
8
|
-
UpdateOrganizationMapper: UpdateOrganizationDto;
|
|
9
|
-
};
|
|
10
|
-
type PermissionDtos = {
|
|
11
|
-
PermissionMapper: PermissionDto;
|
|
12
|
-
CreatePermissionMapper: CreatePermissionDto;
|
|
13
|
-
UpdatePermissionMapper: UpdatePermissionDto;
|
|
14
|
-
RoleEntityMapper: UpdateRoleDto;
|
|
15
|
-
};
|
|
16
|
-
type RoleDtos = {
|
|
17
|
-
RoleMapper: RoleDto;
|
|
18
|
-
CreateRoleMapper: CreateRoleDto;
|
|
19
|
-
UpdateRoleMapper: UpdateRoleDto;
|
|
20
|
-
};
|
|
21
|
-
type UserDtos = {
|
|
22
|
-
UserMapper: UserDto;
|
|
23
|
-
CreateUserMapper: CreateUserDto;
|
|
24
|
-
UpdateUserMapper: UpdateUserDto;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
declare const Organization: _mikro_orm_core.EntitySchemaWithMeta<"Organization", string, _mikro_orm_core.InferEntityFromProperties<{
|
|
28
|
-
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
29
|
-
primary: true;
|
|
30
|
-
} & {
|
|
31
|
-
readonly '~c': true;
|
|
32
|
-
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
33
|
-
readonly status: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<any, _mikro_orm_core.EmptyOptions & {
|
|
34
|
-
readonly '~c': true;
|
|
35
|
-
}, "name" | "serializedPrimaryKey" | "comment" | "array" | "fieldName" | "fieldNames" | "columnType" | "columnTypes" | "type" | "runtimeType" | "length" | "precision" | "scale" | "autoincrement" | "returning" | "onCreate" | "onUpdate" | "default" | "defaultRaw" | "formula" | "generated" | "nullable" | "unsigned" | "persist" | "hydrate" | "ref" | "hidden" | "version" | "concurrencyCheck" | "index" | "unique" | "check" | "lazy" | "primary" | "setter" | "getter" | "getterName" | "accessor" | "serializer" | "serializedName" | "groups" | "customOrder" | "extra" | "ignoreSchemaChanges" | "compliance" | ("~options" | "~type" | "$type" | "strictNullable") | "nativeEnumName">, "name" | "serializedPrimaryKey" | "comment" | "array" | "fieldName" | "fieldNames" | "columnType" | "columnTypes" | "type" | "runtimeType" | "length" | "precision" | "scale" | "autoincrement" | "returning" | "onCreate" | "onUpdate" | "default" | "defaultRaw" | "formula" | "generated" | "nullable" | "unsigned" | "persist" | "hydrate" | "ref" | "hidden" | "version" | "concurrencyCheck" | "index" | "unique" | "check" | "lazy" | "primary" | "setter" | "getter" | "getterName" | "accessor" | "serializer" | "serializedName" | "groups" | "customOrder" | "extra" | "ignoreSchemaChanges" | "compliance" | ("~options" | "~type" | "$type" | "strictNullable") | "nativeEnumName">;
|
|
36
|
-
}, undefined, never, never, false>, never, {
|
|
37
|
-
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
38
|
-
primary: true;
|
|
39
|
-
} & {
|
|
40
|
-
readonly '~c': true;
|
|
41
|
-
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
42
|
-
readonly status: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<any, _mikro_orm_core.EmptyOptions & {
|
|
43
|
-
readonly '~c': true;
|
|
44
|
-
}, "name" | "serializedPrimaryKey" | "comment" | "array" | "fieldName" | "fieldNames" | "columnType" | "columnTypes" | "type" | "runtimeType" | "length" | "precision" | "scale" | "autoincrement" | "returning" | "onCreate" | "onUpdate" | "default" | "defaultRaw" | "formula" | "generated" | "nullable" | "unsigned" | "persist" | "hydrate" | "ref" | "hidden" | "version" | "concurrencyCheck" | "index" | "unique" | "check" | "lazy" | "primary" | "setter" | "getter" | "getterName" | "accessor" | "serializer" | "serializedName" | "groups" | "customOrder" | "extra" | "ignoreSchemaChanges" | "compliance" | ("~options" | "~type" | "$type" | "strictNullable") | "nativeEnumName">, "name" | "serializedPrimaryKey" | "comment" | "array" | "fieldName" | "fieldNames" | "columnType" | "columnTypes" | "type" | "runtimeType" | "length" | "precision" | "scale" | "autoincrement" | "returning" | "onCreate" | "onUpdate" | "default" | "defaultRaw" | "formula" | "generated" | "nullable" | "unsigned" | "persist" | "hydrate" | "ref" | "hidden" | "version" | "concurrencyCheck" | "index" | "unique" | "check" | "lazy" | "primary" | "setter" | "getter" | "getterName" | "accessor" | "serializer" | "serializedName" | "groups" | "customOrder" | "extra" | "ignoreSchemaChanges" | "compliance" | ("~options" | "~type" | "$type" | "strictNullable") | "nativeEnumName">;
|
|
45
|
-
}, _mikro_orm_core.EntityCtor<_mikro_orm_core.InferEntityFromProperties<{
|
|
46
|
-
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
47
|
-
primary: true;
|
|
48
|
-
} & {
|
|
49
|
-
readonly '~c': true;
|
|
50
|
-
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
51
|
-
readonly status: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<any, _mikro_orm_core.EmptyOptions & {
|
|
52
|
-
readonly '~c': true;
|
|
53
|
-
}, "name" | "serializedPrimaryKey" | "comment" | "array" | "fieldName" | "fieldNames" | "columnType" | "columnTypes" | "type" | "runtimeType" | "length" | "precision" | "scale" | "autoincrement" | "returning" | "onCreate" | "onUpdate" | "default" | "defaultRaw" | "formula" | "generated" | "nullable" | "unsigned" | "persist" | "hydrate" | "ref" | "hidden" | "version" | "concurrencyCheck" | "index" | "unique" | "check" | "lazy" | "primary" | "setter" | "getter" | "getterName" | "accessor" | "serializer" | "serializedName" | "groups" | "customOrder" | "extra" | "ignoreSchemaChanges" | "compliance" | ("~options" | "~type" | "$type" | "strictNullable") | "nativeEnumName">, "name" | "serializedPrimaryKey" | "comment" | "array" | "fieldName" | "fieldNames" | "columnType" | "columnTypes" | "type" | "runtimeType" | "length" | "precision" | "scale" | "autoincrement" | "returning" | "onCreate" | "onUpdate" | "default" | "defaultRaw" | "formula" | "generated" | "nullable" | "unsigned" | "persist" | "hydrate" | "ref" | "hidden" | "version" | "concurrencyCheck" | "index" | "unique" | "check" | "lazy" | "primary" | "setter" | "getter" | "getterName" | "accessor" | "serializer" | "serializedName" | "groups" | "customOrder" | "extra" | "ignoreSchemaChanges" | "compliance" | ("~options" | "~type" | "$type" | "strictNullable") | "nativeEnumName">;
|
|
54
|
-
}, undefined, never, never, false>>, undefined>;
|
|
55
|
-
declare const Role: _mikro_orm_core.EntitySchemaWithMeta<"Role", string, _mikro_orm_core.InferEntityFromProperties<{
|
|
56
|
-
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
57
|
-
primary: true;
|
|
58
|
-
} & {
|
|
59
|
-
readonly '~c': true;
|
|
60
|
-
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
61
|
-
readonly permissions: () => _mikro_orm_core.PropertyChain<_mikro_orm_core.InferEntityFromProperties<{
|
|
62
|
-
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
63
|
-
primary: true;
|
|
64
|
-
} & {
|
|
65
|
-
readonly '~c': true;
|
|
66
|
-
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
67
|
-
readonly slug: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, _mikro_orm_core.EmptyOptions & {
|
|
68
|
-
readonly '~c': true;
|
|
69
|
-
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
70
|
-
}, undefined, never, never, false>, _mikro_orm_core.EmptyOptions & {
|
|
71
|
-
kind: "m:n";
|
|
72
|
-
}>;
|
|
73
|
-
}, undefined, never, never, false>, never, {
|
|
74
|
-
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
75
|
-
primary: true;
|
|
76
|
-
} & {
|
|
77
|
-
readonly '~c': true;
|
|
78
|
-
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
79
|
-
readonly permissions: () => _mikro_orm_core.PropertyChain<_mikro_orm_core.InferEntityFromProperties<{
|
|
80
|
-
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
81
|
-
primary: true;
|
|
82
|
-
} & {
|
|
83
|
-
readonly '~c': true;
|
|
84
|
-
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
85
|
-
readonly slug: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, _mikro_orm_core.EmptyOptions & {
|
|
86
|
-
readonly '~c': true;
|
|
87
|
-
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
88
|
-
}, undefined, never, never, false>, _mikro_orm_core.EmptyOptions & {
|
|
89
|
-
kind: "m:n";
|
|
90
|
-
}>;
|
|
91
|
-
}, _mikro_orm_core.EntityCtor<_mikro_orm_core.InferEntityFromProperties<{
|
|
92
|
-
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
93
|
-
primary: true;
|
|
94
|
-
} & {
|
|
95
|
-
readonly '~c': true;
|
|
96
|
-
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
97
|
-
readonly permissions: () => _mikro_orm_core.PropertyChain<_mikro_orm_core.InferEntityFromProperties<{
|
|
98
|
-
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
99
|
-
primary: true;
|
|
100
|
-
} & {
|
|
101
|
-
readonly '~c': true;
|
|
102
|
-
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
103
|
-
readonly slug: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, _mikro_orm_core.EmptyOptions & {
|
|
104
|
-
readonly '~c': true;
|
|
105
|
-
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
106
|
-
}, undefined, never, never, false>, _mikro_orm_core.EmptyOptions & {
|
|
107
|
-
kind: "m:n";
|
|
108
|
-
}>;
|
|
109
|
-
}, undefined, never, never, false>>, undefined>;
|
|
110
|
-
declare const Permission: _mikro_orm_core.EntitySchemaWithMeta<"Permission", string, _mikro_orm_core.InferEntityFromProperties<{
|
|
111
|
-
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
112
|
-
primary: true;
|
|
113
|
-
} & {
|
|
114
|
-
readonly '~c': true;
|
|
115
|
-
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
116
|
-
readonly slug: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, _mikro_orm_core.EmptyOptions & {
|
|
117
|
-
readonly '~c': true;
|
|
118
|
-
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
119
|
-
}, undefined, never, never, false>, never, {
|
|
120
|
-
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
121
|
-
primary: true;
|
|
122
|
-
} & {
|
|
123
|
-
readonly '~c': true;
|
|
124
|
-
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
125
|
-
readonly slug: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, _mikro_orm_core.EmptyOptions & {
|
|
126
|
-
readonly '~c': true;
|
|
127
|
-
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
128
|
-
}, _mikro_orm_core.EntityCtor<_mikro_orm_core.InferEntityFromProperties<{
|
|
129
|
-
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
130
|
-
primary: true;
|
|
131
|
-
} & {
|
|
132
|
-
readonly '~c': true;
|
|
133
|
-
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
134
|
-
readonly slug: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, _mikro_orm_core.EmptyOptions & {
|
|
135
|
-
readonly '~c': true;
|
|
136
|
-
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
137
|
-
}, undefined, never, never, false>>, undefined>;
|
|
138
|
-
declare const User: _mikro_orm_core.EntitySchemaWithMeta<"User", string, _mikro_orm_core.InferEntityFromProperties<{
|
|
139
|
-
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
140
|
-
primary: true;
|
|
141
|
-
} & {
|
|
142
|
-
readonly '~c': true;
|
|
143
|
-
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
144
|
-
readonly organization: () => _mikro_orm_core.PropertyChain<_mikro_orm_core.InferEntityFromProperties<{
|
|
145
|
-
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
146
|
-
primary: true;
|
|
147
|
-
} & {
|
|
148
|
-
readonly '~c': true;
|
|
149
|
-
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
150
|
-
readonly status: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<any, _mikro_orm_core.EmptyOptions & {
|
|
151
|
-
readonly '~c': true;
|
|
152
|
-
}, "name" | "serializedPrimaryKey" | "comment" | "array" | "fieldName" | "fieldNames" | "columnType" | "columnTypes" | "type" | "runtimeType" | "length" | "precision" | "scale" | "autoincrement" | "returning" | "onCreate" | "onUpdate" | "default" | "defaultRaw" | "formula" | "generated" | "nullable" | "unsigned" | "persist" | "hydrate" | "ref" | "hidden" | "version" | "concurrencyCheck" | "index" | "unique" | "check" | "lazy" | "primary" | "setter" | "getter" | "getterName" | "accessor" | "serializer" | "serializedName" | "groups" | "customOrder" | "extra" | "ignoreSchemaChanges" | "compliance" | ("~options" | "~type" | "$type" | "strictNullable") | "nativeEnumName">, "name" | "serializedPrimaryKey" | "comment" | "array" | "fieldName" | "fieldNames" | "columnType" | "columnTypes" | "type" | "runtimeType" | "length" | "precision" | "scale" | "autoincrement" | "returning" | "onCreate" | "onUpdate" | "default" | "defaultRaw" | "formula" | "generated" | "nullable" | "unsigned" | "persist" | "hydrate" | "ref" | "hidden" | "version" | "concurrencyCheck" | "index" | "unique" | "check" | "lazy" | "primary" | "setter" | "getter" | "getterName" | "accessor" | "serializer" | "serializedName" | "groups" | "customOrder" | "extra" | "ignoreSchemaChanges" | "compliance" | ("~options" | "~type" | "$type" | "strictNullable") | "nativeEnumName">;
|
|
153
|
-
}, undefined, never, never, false>, Omit<_mikro_orm_core.EmptyOptions & {
|
|
154
|
-
kind: "m:1";
|
|
155
|
-
}, "nullable"> & {
|
|
156
|
-
nullable: true;
|
|
157
|
-
}>;
|
|
158
|
-
}, undefined, never, never, false>, never, {
|
|
159
|
-
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
160
|
-
primary: true;
|
|
161
|
-
} & {
|
|
162
|
-
readonly '~c': true;
|
|
163
|
-
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
164
|
-
readonly organization: () => _mikro_orm_core.PropertyChain<_mikro_orm_core.InferEntityFromProperties<{
|
|
165
|
-
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
166
|
-
primary: true;
|
|
167
|
-
} & {
|
|
168
|
-
readonly '~c': true;
|
|
169
|
-
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
170
|
-
readonly status: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<any, _mikro_orm_core.EmptyOptions & {
|
|
171
|
-
readonly '~c': true;
|
|
172
|
-
}, "name" | "serializedPrimaryKey" | "comment" | "array" | "fieldName" | "fieldNames" | "columnType" | "columnTypes" | "type" | "runtimeType" | "length" | "precision" | "scale" | "autoincrement" | "returning" | "onCreate" | "onUpdate" | "default" | "defaultRaw" | "formula" | "generated" | "nullable" | "unsigned" | "persist" | "hydrate" | "ref" | "hidden" | "version" | "concurrencyCheck" | "index" | "unique" | "check" | "lazy" | "primary" | "setter" | "getter" | "getterName" | "accessor" | "serializer" | "serializedName" | "groups" | "customOrder" | "extra" | "ignoreSchemaChanges" | "compliance" | ("~options" | "~type" | "$type" | "strictNullable") | "nativeEnumName">, "name" | "serializedPrimaryKey" | "comment" | "array" | "fieldName" | "fieldNames" | "columnType" | "columnTypes" | "type" | "runtimeType" | "length" | "precision" | "scale" | "autoincrement" | "returning" | "onCreate" | "onUpdate" | "default" | "defaultRaw" | "formula" | "generated" | "nullable" | "unsigned" | "persist" | "hydrate" | "ref" | "hidden" | "version" | "concurrencyCheck" | "index" | "unique" | "check" | "lazy" | "primary" | "setter" | "getter" | "getterName" | "accessor" | "serializer" | "serializedName" | "groups" | "customOrder" | "extra" | "ignoreSchemaChanges" | "compliance" | ("~options" | "~type" | "$type" | "strictNullable") | "nativeEnumName">;
|
|
173
|
-
}, undefined, never, never, false>, Omit<_mikro_orm_core.EmptyOptions & {
|
|
174
|
-
kind: "m:1";
|
|
175
|
-
}, "nullable"> & {
|
|
176
|
-
nullable: true;
|
|
177
|
-
}>;
|
|
178
|
-
}, _mikro_orm_core.EntityCtor<_mikro_orm_core.InferEntityFromProperties<{
|
|
179
|
-
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
180
|
-
primary: true;
|
|
181
|
-
} & {
|
|
182
|
-
readonly '~c': true;
|
|
183
|
-
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
184
|
-
readonly organization: () => _mikro_orm_core.PropertyChain<_mikro_orm_core.InferEntityFromProperties<{
|
|
185
|
-
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
186
|
-
primary: true;
|
|
187
|
-
} & {
|
|
188
|
-
readonly '~c': true;
|
|
189
|
-
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
190
|
-
readonly status: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<any, _mikro_orm_core.EmptyOptions & {
|
|
191
|
-
readonly '~c': true;
|
|
192
|
-
}, "name" | "serializedPrimaryKey" | "comment" | "array" | "fieldName" | "fieldNames" | "columnType" | "columnTypes" | "type" | "runtimeType" | "length" | "precision" | "scale" | "autoincrement" | "returning" | "onCreate" | "onUpdate" | "default" | "defaultRaw" | "formula" | "generated" | "nullable" | "unsigned" | "persist" | "hydrate" | "ref" | "hidden" | "version" | "concurrencyCheck" | "index" | "unique" | "check" | "lazy" | "primary" | "setter" | "getter" | "getterName" | "accessor" | "serializer" | "serializedName" | "groups" | "customOrder" | "extra" | "ignoreSchemaChanges" | "compliance" | ("~options" | "~type" | "$type" | "strictNullable") | "nativeEnumName">, "name" | "serializedPrimaryKey" | "comment" | "array" | "fieldName" | "fieldNames" | "columnType" | "columnTypes" | "type" | "runtimeType" | "length" | "precision" | "scale" | "autoincrement" | "returning" | "onCreate" | "onUpdate" | "default" | "defaultRaw" | "formula" | "generated" | "nullable" | "unsigned" | "persist" | "hydrate" | "ref" | "hidden" | "version" | "concurrencyCheck" | "index" | "unique" | "check" | "lazy" | "primary" | "setter" | "getter" | "getterName" | "accessor" | "serializer" | "serializedName" | "groups" | "customOrder" | "extra" | "ignoreSchemaChanges" | "compliance" | ("~options" | "~type" | "$type" | "strictNullable") | "nativeEnumName">;
|
|
193
|
-
}, undefined, never, never, false>, Omit<_mikro_orm_core.EmptyOptions & {
|
|
194
|
-
kind: "m:1";
|
|
195
|
-
}, "nullable"> & {
|
|
196
|
-
nullable: true;
|
|
197
|
-
}>;
|
|
198
|
-
}, undefined, never, never, false>>, undefined>;
|
|
199
|
-
|
|
200
|
-
type OrganizationEntities<OrganizationStatus> = {
|
|
201
|
-
OrganizationMapper: {
|
|
202
|
-
'~entity': (typeof Organization)['~entity'] & {
|
|
203
|
-
status: OrganizationStatus[keyof OrganizationStatus];
|
|
204
|
-
};
|
|
205
|
-
};
|
|
206
|
-
CreateOrganizationMapper: {
|
|
207
|
-
'~entity': (typeof Organization)['~entity'] & {
|
|
208
|
-
status: OrganizationStatus[keyof OrganizationStatus];
|
|
209
|
-
};
|
|
210
|
-
};
|
|
211
|
-
UpdateOrganizationMapper: {
|
|
212
|
-
'~entity': (typeof Organization)['~entity'] & {
|
|
213
|
-
status: OrganizationStatus[keyof OrganizationStatus];
|
|
214
|
-
};
|
|
215
|
-
};
|
|
216
|
-
};
|
|
217
|
-
type PermissionEntities = {
|
|
218
|
-
PermissionMapper: {
|
|
219
|
-
'~entity': (typeof Permission)['~entity'];
|
|
220
|
-
};
|
|
221
|
-
CreatePermissionMapper: {
|
|
222
|
-
'~entity': (typeof Permission)['~entity'];
|
|
223
|
-
};
|
|
224
|
-
UpdatePermissionMapper: {
|
|
225
|
-
'~entity': (typeof Permission)['~entity'];
|
|
226
|
-
};
|
|
227
|
-
RoleEntityMapper: {
|
|
228
|
-
'~entity': (typeof Role)['~entity'];
|
|
229
|
-
};
|
|
230
|
-
};
|
|
231
|
-
type RoleEntities = {
|
|
232
|
-
RoleMapper: {
|
|
233
|
-
'~entity': (typeof Role)['~entity'];
|
|
234
|
-
};
|
|
235
|
-
CreateRoleMapper: {
|
|
236
|
-
'~entity': (typeof Role)['~entity'];
|
|
237
|
-
};
|
|
238
|
-
UpdateRoleMapper: {
|
|
239
|
-
'~entity': (typeof Role)['~entity'];
|
|
240
|
-
};
|
|
241
|
-
};
|
|
242
|
-
type UserEntities = {
|
|
243
|
-
UserMapper: {
|
|
244
|
-
'~entity': (typeof User)['~entity'];
|
|
245
|
-
};
|
|
246
|
-
CreateUserMapper: {
|
|
247
|
-
'~entity': (typeof User)['~entity'];
|
|
248
|
-
};
|
|
249
|
-
UpdateUserMapper: {
|
|
250
|
-
'~entity': (typeof User)['~entity'];
|
|
251
|
-
};
|
|
252
|
-
};
|
|
253
|
-
|
|
254
|
-
type OrganizationMappers<OrganizationStatus, MapperEntities extends OrganizationEntities<OrganizationStatus>, MapperDomains extends OrganizationDtos<OrganizationStatus>> = {
|
|
255
|
-
OrganizationMapper: {
|
|
256
|
-
entity: MapperEntities['OrganizationMapper'];
|
|
257
|
-
toDto: (entity: InferEntity<MapperEntities['OrganizationMapper']>) => Promise<MapperDomains['OrganizationMapper']>;
|
|
258
|
-
};
|
|
259
|
-
CreateOrganizationMapper: {
|
|
260
|
-
entity: MapperEntities['CreateOrganizationMapper'];
|
|
261
|
-
toEntity: (dto: MapperDomains['CreateOrganizationMapper'], em: EntityManager, ...args: unknown[]) => Promise<InferEntity<MapperEntities['CreateOrganizationMapper']>>;
|
|
262
|
-
};
|
|
263
|
-
UpdateOrganizationMapper: {
|
|
264
|
-
entity: MapperEntities['UpdateOrganizationMapper'];
|
|
265
|
-
toEntity: (dto: MapperDomains['UpdateOrganizationMapper'], em: EntityManager, ...args: unknown[]) => Promise<InferEntity<MapperEntities['UpdateOrganizationMapper']>>;
|
|
266
|
-
};
|
|
267
|
-
};
|
|
268
|
-
|
|
269
|
-
type PermissionMappers<MapperEntities extends PermissionEntities, MapperDomains extends PermissionDtos> = {
|
|
270
|
-
PermissionMapper: {
|
|
271
|
-
entity: MapperEntities['PermissionMapper'];
|
|
272
|
-
toDto: (entity: InferEntity<MapperEntities['PermissionMapper']>) => Promise<MapperDomains['PermissionMapper']>;
|
|
273
|
-
};
|
|
274
|
-
CreatePermissionMapper: {
|
|
275
|
-
entity: MapperEntities['CreatePermissionMapper'];
|
|
276
|
-
toEntity: (dto: MapperDomains['CreatePermissionMapper'], em: EntityManager, ...args: unknown[]) => Promise<InferEntity<MapperEntities['CreatePermissionMapper']>>;
|
|
277
|
-
};
|
|
278
|
-
UpdatePermissionMapper: {
|
|
279
|
-
entity: MapperEntities['UpdatePermissionMapper'];
|
|
280
|
-
toEntity: (dto: MapperDomains['UpdatePermissionMapper'], em: EntityManager, ...args: unknown[]) => Promise<InferEntity<MapperEntities['UpdatePermissionMapper']>>;
|
|
281
|
-
};
|
|
282
|
-
RoleEntityMapper: {
|
|
283
|
-
entity: MapperEntities['RoleEntityMapper'];
|
|
284
|
-
toEntity: (dto: MapperDomains['RoleEntityMapper'], em: EntityManager, ...args: unknown[]) => Promise<InferEntity<MapperEntities['RoleEntityMapper']>>;
|
|
285
|
-
};
|
|
286
|
-
};
|
|
287
|
-
|
|
288
|
-
type RoleMappers<MapperEntities extends RoleEntities, MapperDomains extends RoleDtos> = {
|
|
289
|
-
RoleMapper: {
|
|
290
|
-
entity: MapperEntities['RoleMapper'];
|
|
291
|
-
toDto: (entity: InferEntity<MapperEntities['RoleMapper']>) => Promise<MapperDomains['RoleMapper']>;
|
|
292
|
-
};
|
|
293
|
-
CreateRoleMapper: {
|
|
294
|
-
entity: MapperEntities['CreateRoleMapper'];
|
|
295
|
-
toEntity: (dto: MapperDomains['CreateRoleMapper'], em: EntityManager, ...args: unknown[]) => Promise<InferEntity<MapperEntities['CreateRoleMapper']>>;
|
|
296
|
-
};
|
|
297
|
-
UpdateRoleMapper: {
|
|
298
|
-
entity: MapperEntities['UpdateRoleMapper'];
|
|
299
|
-
toEntity: (dto: MapperDomains['UpdateRoleMapper'], em: EntityManager, ...args: unknown[]) => Promise<InferEntity<MapperEntities['UpdateRoleMapper']>>;
|
|
300
|
-
};
|
|
301
|
-
};
|
|
302
|
-
|
|
303
|
-
type UserMappers<MapperEntities extends UserEntities, MapperDomains extends UserDtos> = {
|
|
304
|
-
UserMapper: {
|
|
305
|
-
entity: MapperEntities['UserMapper'];
|
|
306
|
-
toDto: (entity: InferEntity<MapperEntities['UserMapper']>) => Promise<MapperDomains['UserMapper']>;
|
|
307
|
-
};
|
|
308
|
-
CreateUserMapper: {
|
|
309
|
-
entity: MapperEntities['CreateUserMapper'];
|
|
310
|
-
toEntity: (dto: MapperDomains['CreateUserMapper'], em: EntityManager, ...args: unknown[]) => Promise<InferEntity<MapperEntities['CreateUserMapper']>>;
|
|
311
|
-
};
|
|
312
|
-
UpdateUserMapper: {
|
|
313
|
-
entity: MapperEntities['UpdateUserMapper'];
|
|
314
|
-
toEntity: (dto: MapperDomains['UpdateUserMapper'], em: EntityManager, ...args: unknown[]) => Promise<InferEntity<MapperEntities['UpdateUserMapper']>>;
|
|
315
|
-
};
|
|
316
|
-
};
|
|
317
|
-
|
|
318
|
-
export type { OrganizationDtos, OrganizationEntities, OrganizationMappers, PermissionDtos, PermissionEntities, PermissionMappers, RoleDtos, RoleEntities, RoleMappers, UserDtos, UserEntities, UserMappers };
|
package/lib/services/index.d.mts
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { IdDto, IdsDto } from '@forklaunch/common';
|
|
2
|
-
import { OpenTelemetryCollector, MetricsDefinition, TelemetryOptions } from '@forklaunch/core/http';
|
|
3
|
-
import { OrganizationService, PermissionService, RoleService, UserService } from '@forklaunch/interfaces-iam/interfaces';
|
|
4
|
-
export * from '@forklaunch/interfaces-iam/interfaces';
|
|
5
|
-
import { CreateOrganizationDto, UpdateOrganizationDto, CreatePermissionDto, UpdatePermissionDto, CreateRoleDto, RoleDto, UpdateRoleDto, CreateUserDto, UpdateUserDto } from '@forklaunch/interfaces-iam/types';
|
|
6
|
-
export * from '@forklaunch/interfaces-iam/types';
|
|
7
|
-
import { AnySchemaValidator } from '@forklaunch/validator';
|
|
8
|
-
import { EntityManager, FilterQuery, InferEntity } from '@mikro-orm/core';
|
|
9
|
-
import { OrganizationEntities, OrganizationDtos, OrganizationMappers, PermissionEntities, PermissionDtos, PermissionMappers, RoleEntities, RoleDtos, RoleMappers, UserEntities, UserDtos, UserMappers } from '../domain/types/index.mjs';
|
|
10
|
-
|
|
11
|
-
declare class BaseOrganizationService<SchemaValidator extends AnySchemaValidator, OrganizationStatus = unknown, MapperEntities extends OrganizationEntities<OrganizationStatus> = OrganizationEntities<OrganizationStatus>, MapperDomains extends OrganizationDtos<OrganizationStatus> = OrganizationDtos<OrganizationStatus>> implements OrganizationService<OrganizationStatus> {
|
|
12
|
-
private evaluatedTelemetryOptions;
|
|
13
|
-
em: EntityManager;
|
|
14
|
-
protected openTelemetryCollector: OpenTelemetryCollector<MetricsDefinition>;
|
|
15
|
-
protected schemaValidator: SchemaValidator;
|
|
16
|
-
protected mappers: OrganizationMappers<OrganizationStatus, MapperEntities, MapperDomains>;
|
|
17
|
-
constructor(em: EntityManager, openTelemetryCollector: OpenTelemetryCollector<MetricsDefinition>, schemaValidator: SchemaValidator, mappers: OrganizationMappers<OrganizationStatus, MapperEntities, MapperDomains>, options?: {
|
|
18
|
-
telemetry?: TelemetryOptions;
|
|
19
|
-
});
|
|
20
|
-
createOrganization(organizationDto: CreateOrganizationDto, em?: EntityManager, ...args: unknown[]): Promise<MapperDomains['OrganizationMapper']>;
|
|
21
|
-
getOrganization(idDto: IdDto & FilterQuery<InferEntity<MapperEntities['OrganizationMapper']>>, em?: EntityManager): Promise<MapperDomains['OrganizationMapper']>;
|
|
22
|
-
updateOrganization(organizationDto: UpdateOrganizationDto, em?: EntityManager, ...args: unknown[]): Promise<MapperDomains['OrganizationMapper']>;
|
|
23
|
-
deleteOrganization(idDto: IdDto & FilterQuery<InferEntity<MapperEntities['OrganizationMapper']>>, em?: EntityManager): Promise<void>;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
declare class BasePermissionService<SchemaValidator extends AnySchemaValidator, MapperEntities extends PermissionEntities = PermissionEntities, MapperDomains extends PermissionDtos = PermissionDtos> implements PermissionService {
|
|
27
|
-
private evaluatedTelemetryOptions;
|
|
28
|
-
em: EntityManager;
|
|
29
|
-
protected roleServiceFactory: () => RoleService;
|
|
30
|
-
protected openTelemetryCollector: OpenTelemetryCollector<MetricsDefinition>;
|
|
31
|
-
protected schemaValidator: SchemaValidator;
|
|
32
|
-
protected mappers: PermissionMappers<MapperEntities, MapperDomains>;
|
|
33
|
-
constructor(em: EntityManager, roleServiceFactory: () => RoleService, openTelemetryCollector: OpenTelemetryCollector<MetricsDefinition>, schemaValidator: SchemaValidator, mappers: PermissionMappers<MapperEntities, MapperDomains>, options?: {
|
|
34
|
-
telemetry?: TelemetryOptions;
|
|
35
|
-
});
|
|
36
|
-
private updateRolesWithPermissions;
|
|
37
|
-
private removePermissionsFromRoles;
|
|
38
|
-
private getBatchRoles;
|
|
39
|
-
private createPermissionEntity;
|
|
40
|
-
private extractCreatePermissionEntityToEntityData;
|
|
41
|
-
createPermission(createPermissionEntity: CreatePermissionDto, em?: EntityManager, ...args: unknown[]): Promise<MapperDomains['PermissionMapper']>;
|
|
42
|
-
createBatchPermissions(permissionDtos: CreatePermissionDto[], em?: EntityManager): Promise<MapperDomains['PermissionMapper'][]>;
|
|
43
|
-
getPermission(idDto: IdDto, em?: EntityManager): Promise<MapperDomains['PermissionMapper']>;
|
|
44
|
-
getBatchPermissions(idsDto: IdsDto, em?: EntityManager): Promise<MapperDomains['PermissionMapper'][]>;
|
|
45
|
-
private updatePermissionDto;
|
|
46
|
-
updatePermission(permissionDto: UpdatePermissionDto, em?: EntityManager): Promise<MapperDomains['PermissionMapper']>;
|
|
47
|
-
updateBatchPermissions(permissionDtos: UpdatePermissionDto[], em?: EntityManager): Promise<MapperDomains['PermissionMapper'][]>;
|
|
48
|
-
deletePermission(idDto: IdDto, em?: EntityManager): Promise<void>;
|
|
49
|
-
deleteBatchPermissions(idsDto: IdsDto, em?: EntityManager): Promise<void>;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
declare class BaseRoleService<SchemaValidator extends AnySchemaValidator, MapperEntities extends RoleEntities = RoleEntities, MapperDomains extends RoleDtos = RoleDtos> implements RoleService {
|
|
53
|
-
private evaluatedTelemetryOptions;
|
|
54
|
-
em: EntityManager;
|
|
55
|
-
protected openTelemetryCollector: OpenTelemetryCollector<MetricsDefinition>;
|
|
56
|
-
protected schemaValidator: SchemaValidator;
|
|
57
|
-
protected mappers: RoleMappers<MapperEntities, MapperDomains>;
|
|
58
|
-
constructor(em: EntityManager, openTelemetryCollector: OpenTelemetryCollector<MetricsDefinition>, schemaValidator: SchemaValidator, mappers: RoleMappers<MapperEntities, MapperDomains>, options?: {
|
|
59
|
-
telemetry?: TelemetryOptions;
|
|
60
|
-
});
|
|
61
|
-
createRole(roleDto: CreateRoleDto, em?: EntityManager, ...args: unknown[]): Promise<RoleDto>;
|
|
62
|
-
createBatchRoles(roleDtos: CreateRoleDto[], em?: EntityManager, ...args: unknown[]): Promise<RoleDto[]>;
|
|
63
|
-
getRole({ id }: IdDto, em?: EntityManager): Promise<RoleDto>;
|
|
64
|
-
getBatchRoles({ ids }: IdsDto, em?: EntityManager): Promise<RoleDto[]>;
|
|
65
|
-
updateRole(roleDto: UpdateRoleDto, em?: EntityManager, ...args: unknown[]): Promise<RoleDto>;
|
|
66
|
-
updateBatchRoles(roleDtos: UpdateRoleDto[], em?: EntityManager, ...args: unknown[]): Promise<RoleDto[]>;
|
|
67
|
-
deleteRole(idDto: IdDto, em?: EntityManager): Promise<void>;
|
|
68
|
-
deleteBatchRoles(idsDto: IdsDto, em?: EntityManager): Promise<void>;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
declare class BaseUserService<SchemaValidator extends AnySchemaValidator, OrganizationStatus = unknown, MapperEntities extends UserEntities = UserEntities, MapperDomains extends UserDtos = UserDtos> implements UserService {
|
|
72
|
-
private evaluatedTelemetryOptions;
|
|
73
|
-
em: EntityManager;
|
|
74
|
-
protected roleServiceFactory: () => RoleService;
|
|
75
|
-
protected organizationServiceFactory: () => OrganizationService<OrganizationStatus>;
|
|
76
|
-
protected openTelemetryCollector: OpenTelemetryCollector<MetricsDefinition>;
|
|
77
|
-
protected schemaValidator: SchemaValidator;
|
|
78
|
-
protected mappers: UserMappers<MapperEntities, MapperDomains>;
|
|
79
|
-
constructor(em: EntityManager, roleServiceFactory: () => RoleService, organizationServiceFactory: () => OrganizationService<OrganizationStatus>, openTelemetryCollector: OpenTelemetryCollector<MetricsDefinition>, schemaValidator: SchemaValidator, mappers: UserMappers<MapperEntities, MapperDomains>, options?: {
|
|
80
|
-
telemetry?: TelemetryOptions;
|
|
81
|
-
});
|
|
82
|
-
createUser(userDto: CreateUserDto, em?: EntityManager, ...args: unknown[]): Promise<MapperDomains['UserMapper']>;
|
|
83
|
-
createBatchUsers(userDtos: CreateUserDto[], em?: EntityManager, ...args: unknown[]): Promise<MapperDomains['UserMapper'][]>;
|
|
84
|
-
getOrganizationIdByUserId(idDto: IdDto, em?: EntityManager): Promise<string | undefined>;
|
|
85
|
-
getUser(idDto: IdDto & FilterQuery<InferEntity<MapperEntities['UserMapper']>>, em?: EntityManager): Promise<MapperDomains['UserMapper']>;
|
|
86
|
-
getBatchUsers(idsDto: IdsDto & FilterQuery<InferEntity<MapperEntities['UserMapper']>>, em?: EntityManager): Promise<MapperDomains['UserMapper'][]>;
|
|
87
|
-
updateUser(userDto: UpdateUserDto, em?: EntityManager, ...args: unknown[]): Promise<MapperDomains['UserMapper']>;
|
|
88
|
-
updateBatchUsers(userDtos: UpdateUserDto[], em?: EntityManager, ...args: unknown[]): Promise<MapperDomains['UserMapper'][]>;
|
|
89
|
-
deleteUser(idDto: IdDto & {
|
|
90
|
-
organization?: {
|
|
91
|
-
id: string;
|
|
92
|
-
};
|
|
93
|
-
}, em?: EntityManager): Promise<void>;
|
|
94
|
-
deleteBatchUsers(idsDto: IdsDto & {
|
|
95
|
-
organization?: {
|
|
96
|
-
id: string;
|
|
97
|
-
};
|
|
98
|
-
}, em?: EntityManager): Promise<void>;
|
|
99
|
-
surfaceRoles(idDto: IdDto & FilterQuery<InferEntity<MapperEntities['UserMapper']>>, em?: EntityManager): Promise<MapperDomains['UserMapper']['roles']>;
|
|
100
|
-
surfacePermissions(idDto: IdDto & FilterQuery<InferEntity<MapperEntities['UserMapper']>>, em?: EntityManager): Promise<MapperDomains['UserMapper']['roles'][0]['permissions']>;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export { BaseOrganizationService, BasePermissionService, BaseRoleService, BaseUserService };
|