@forklaunch/implementation-iam-base 0.8.24 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/domain/schemas/index.d.mts +8 -2
- package/lib/domain/schemas/index.d.ts +8 -2
- package/lib/domain/schemas/index.js +4 -2
- package/lib/domain/schemas/index.mjs +4 -2
- package/lib/domain/types/index.d.mts +186 -28
- package/lib/domain/types/index.d.ts +186 -28
- package/lib/eject/domain/schemas/user.schema.ts +2 -1
- package/lib/eject/domain/types/iamEntities.types.ts +54 -36
- package/lib/eject/domain/types/organization.mapper.types.ts +7 -4
- package/lib/eject/domain/types/permission.mapper.types.ts +9 -5
- package/lib/eject/domain/types/role.mapper.types.ts +7 -4
- package/lib/eject/domain/types/user.mapper.types.ts +7 -4
- package/lib/eject/services/organization.service.ts +27 -19
- package/lib/eject/services/permission.service.ts +82 -57
- package/lib/eject/services/role.service.ts +36 -18
- package/lib/eject/services/user.service.ts +54 -42
- package/lib/services/index.d.mts +9 -10
- package/lib/services/index.d.ts +9 -10
- package/lib/services/index.js +127 -75
- package/lib/services/index.mjs +127 -75
- package/package.json +9 -8
|
@@ -33,6 +33,7 @@ declare const BaseOrganizationServiceSchemas: <SchemaValidator extends _forklaun
|
|
|
33
33
|
email: _sinclair_typebox.TString;
|
|
34
34
|
firstName: _sinclair_typebox.TString;
|
|
35
35
|
lastName: _sinclair_typebox.TString;
|
|
36
|
+
organization: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
36
37
|
roles: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
37
38
|
id: _sinclair_typebox.TString;
|
|
38
39
|
name: _sinclair_typebox.TString;
|
|
@@ -87,6 +88,7 @@ declare const BaseOrganizationServiceSchemas: <SchemaValidator extends _forklaun
|
|
|
87
88
|
email: zod_v3.ZodString;
|
|
88
89
|
firstName: zod_v3.ZodString;
|
|
89
90
|
lastName: zod_v3.ZodString;
|
|
91
|
+
organization: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
90
92
|
roles: zod_v3.ZodArray<zod_v3.ZodObject<{
|
|
91
93
|
id: zod_v3.ZodString;
|
|
92
94
|
name: zod_v3.ZodString;
|
|
@@ -166,6 +168,7 @@ declare const BaseOrganizationServiceSchemas: <SchemaValidator extends _forklaun
|
|
|
166
168
|
providerFields?: unknown;
|
|
167
169
|
createdAt?: Date | undefined;
|
|
168
170
|
updatedAt?: Date | undefined;
|
|
171
|
+
organization?: string | undefined;
|
|
169
172
|
phoneNumber?: string | undefined;
|
|
170
173
|
subscription?: string | undefined;
|
|
171
174
|
}, {
|
|
@@ -190,6 +193,7 @@ declare const BaseOrganizationServiceSchemas: <SchemaValidator extends _forklaun
|
|
|
190
193
|
providerFields?: unknown;
|
|
191
194
|
createdAt?: unknown;
|
|
192
195
|
updatedAt?: unknown;
|
|
196
|
+
organization?: string | undefined;
|
|
193
197
|
phoneNumber?: string | undefined;
|
|
194
198
|
subscription?: string | undefined;
|
|
195
199
|
}>, "many">;
|
|
@@ -339,7 +343,7 @@ declare const BaseUserServiceSchemas: <SchemaValidator extends _forklaunch_valid
|
|
|
339
343
|
password: _sinclair_typebox.TString;
|
|
340
344
|
firstName: _sinclair_typebox.TString;
|
|
341
345
|
lastName: _sinclair_typebox.TString;
|
|
342
|
-
organization: _sinclair_typebox.TString
|
|
346
|
+
organization: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
343
347
|
roles: _sinclair_typebox.TArray<_sinclair_typebox.TString>;
|
|
344
348
|
phoneNumber: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
345
349
|
subscription: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
@@ -361,6 +365,7 @@ declare const BaseUserServiceSchemas: <SchemaValidator extends _forklaunch_valid
|
|
|
361
365
|
email: _sinclair_typebox.TString;
|
|
362
366
|
firstName: _sinclair_typebox.TString;
|
|
363
367
|
lastName: _sinclair_typebox.TString;
|
|
368
|
+
organization: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
364
369
|
roles: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
365
370
|
id: _sinclair_typebox.TString;
|
|
366
371
|
name: _sinclair_typebox.TString;
|
|
@@ -389,7 +394,7 @@ declare const BaseUserServiceSchemas: <SchemaValidator extends _forklaunch_valid
|
|
|
389
394
|
password: zod_v3.ZodString;
|
|
390
395
|
firstName: zod_v3.ZodString;
|
|
391
396
|
lastName: zod_v3.ZodString;
|
|
392
|
-
organization: zod_v3.ZodString
|
|
397
|
+
organization: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
393
398
|
roles: zod_v3.ZodArray<zod_v3.ZodString, "many">;
|
|
394
399
|
phoneNumber: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
395
400
|
subscription: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
@@ -411,6 +416,7 @@ declare const BaseUserServiceSchemas: <SchemaValidator extends _forklaunch_valid
|
|
|
411
416
|
email: zod_v3.ZodString;
|
|
412
417
|
firstName: zod_v3.ZodString;
|
|
413
418
|
lastName: zod_v3.ZodString;
|
|
419
|
+
organization: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
414
420
|
roles: zod_v3.ZodArray<zod_v3.ZodObject<{
|
|
415
421
|
id: zod_v3.ZodString;
|
|
416
422
|
name: zod_v3.ZodString;
|
|
@@ -33,6 +33,7 @@ declare const BaseOrganizationServiceSchemas: <SchemaValidator extends _forklaun
|
|
|
33
33
|
email: _sinclair_typebox.TString;
|
|
34
34
|
firstName: _sinclair_typebox.TString;
|
|
35
35
|
lastName: _sinclair_typebox.TString;
|
|
36
|
+
organization: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
36
37
|
roles: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
37
38
|
id: _sinclair_typebox.TString;
|
|
38
39
|
name: _sinclair_typebox.TString;
|
|
@@ -87,6 +88,7 @@ declare const BaseOrganizationServiceSchemas: <SchemaValidator extends _forklaun
|
|
|
87
88
|
email: zod_v3.ZodString;
|
|
88
89
|
firstName: zod_v3.ZodString;
|
|
89
90
|
lastName: zod_v3.ZodString;
|
|
91
|
+
organization: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
90
92
|
roles: zod_v3.ZodArray<zod_v3.ZodObject<{
|
|
91
93
|
id: zod_v3.ZodString;
|
|
92
94
|
name: zod_v3.ZodString;
|
|
@@ -166,6 +168,7 @@ declare const BaseOrganizationServiceSchemas: <SchemaValidator extends _forklaun
|
|
|
166
168
|
providerFields?: unknown;
|
|
167
169
|
createdAt?: Date | undefined;
|
|
168
170
|
updatedAt?: Date | undefined;
|
|
171
|
+
organization?: string | undefined;
|
|
169
172
|
phoneNumber?: string | undefined;
|
|
170
173
|
subscription?: string | undefined;
|
|
171
174
|
}, {
|
|
@@ -190,6 +193,7 @@ declare const BaseOrganizationServiceSchemas: <SchemaValidator extends _forklaun
|
|
|
190
193
|
providerFields?: unknown;
|
|
191
194
|
createdAt?: unknown;
|
|
192
195
|
updatedAt?: unknown;
|
|
196
|
+
organization?: string | undefined;
|
|
193
197
|
phoneNumber?: string | undefined;
|
|
194
198
|
subscription?: string | undefined;
|
|
195
199
|
}>, "many">;
|
|
@@ -339,7 +343,7 @@ declare const BaseUserServiceSchemas: <SchemaValidator extends _forklaunch_valid
|
|
|
339
343
|
password: _sinclair_typebox.TString;
|
|
340
344
|
firstName: _sinclair_typebox.TString;
|
|
341
345
|
lastName: _sinclair_typebox.TString;
|
|
342
|
-
organization: _sinclair_typebox.TString
|
|
346
|
+
organization: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
343
347
|
roles: _sinclair_typebox.TArray<_sinclair_typebox.TString>;
|
|
344
348
|
phoneNumber: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
345
349
|
subscription: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
@@ -361,6 +365,7 @@ declare const BaseUserServiceSchemas: <SchemaValidator extends _forklaunch_valid
|
|
|
361
365
|
email: _sinclair_typebox.TString;
|
|
362
366
|
firstName: _sinclair_typebox.TString;
|
|
363
367
|
lastName: _sinclair_typebox.TString;
|
|
368
|
+
organization: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
364
369
|
roles: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
365
370
|
id: _sinclair_typebox.TString;
|
|
366
371
|
name: _sinclair_typebox.TString;
|
|
@@ -389,7 +394,7 @@ declare const BaseUserServiceSchemas: <SchemaValidator extends _forklaunch_valid
|
|
|
389
394
|
password: zod_v3.ZodString;
|
|
390
395
|
firstName: zod_v3.ZodString;
|
|
391
396
|
lastName: zod_v3.ZodString;
|
|
392
|
-
organization: zod_v3.ZodString
|
|
397
|
+
organization: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
393
398
|
roles: zod_v3.ZodArray<zod_v3.ZodString, "many">;
|
|
394
399
|
phoneNumber: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
395
400
|
subscription: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
@@ -411,6 +416,7 @@ declare const BaseUserServiceSchemas: <SchemaValidator extends _forklaunch_valid
|
|
|
411
416
|
email: zod_v3.ZodString;
|
|
412
417
|
firstName: zod_v3.ZodString;
|
|
413
418
|
lastName: zod_v3.ZodString;
|
|
419
|
+
organization: zod_v3.ZodOptional<zod_v3.ZodString>;
|
|
414
420
|
roles: zod_v3.ZodArray<zod_v3.ZodObject<{
|
|
415
421
|
id: zod_v3.ZodString;
|
|
416
422
|
name: zod_v3.ZodString;
|
|
@@ -98,7 +98,7 @@ var CreateUserSchema = {
|
|
|
98
98
|
password: import_typebox3.string,
|
|
99
99
|
firstName: import_typebox3.string,
|
|
100
100
|
lastName: import_typebox3.string,
|
|
101
|
-
organization: import_typebox3.string,
|
|
101
|
+
organization: (0, import_typebox3.optional)(import_typebox3.string),
|
|
102
102
|
roles: (0, import_typebox3.array)(import_typebox3.string),
|
|
103
103
|
phoneNumber: (0, import_typebox3.optional)(import_typebox3.string),
|
|
104
104
|
subscription: (0, import_typebox3.optional)(import_typebox3.string),
|
|
@@ -120,6 +120,7 @@ var UserSchema = ({ uuidId }) => ({
|
|
|
120
120
|
email: import_typebox3.email,
|
|
121
121
|
firstName: import_typebox3.string,
|
|
122
122
|
lastName: import_typebox3.string,
|
|
123
|
+
organization: (0, import_typebox3.optional)(import_typebox3.string),
|
|
123
124
|
roles: (0, import_typebox3.array)(RoleSchema({ uuidId })),
|
|
124
125
|
phoneNumber: (0, import_typebox3.optional)(import_typebox3.string),
|
|
125
126
|
subscription: (0, import_typebox3.optional)(import_typebox3.string),
|
|
@@ -235,7 +236,7 @@ var CreateUserSchema2 = {
|
|
|
235
236
|
password: import_zod3.string,
|
|
236
237
|
firstName: import_zod3.string,
|
|
237
238
|
lastName: import_zod3.string,
|
|
238
|
-
organization: import_zod3.string,
|
|
239
|
+
organization: (0, import_zod3.optional)(import_zod3.string),
|
|
239
240
|
roles: (0, import_zod3.array)(import_zod3.string),
|
|
240
241
|
phoneNumber: (0, import_zod3.optional)(import_zod3.string),
|
|
241
242
|
subscription: (0, import_zod3.optional)(import_zod3.string),
|
|
@@ -257,6 +258,7 @@ var UserSchema2 = ({ uuidId }) => ({
|
|
|
257
258
|
email: import_zod3.email,
|
|
258
259
|
firstName: import_zod3.string,
|
|
259
260
|
lastName: import_zod3.string,
|
|
261
|
+
organization: (0, import_zod3.optional)(import_zod3.string),
|
|
260
262
|
roles: (0, import_zod3.array)(RoleSchema2({ uuidId })),
|
|
261
263
|
phoneNumber: (0, import_zod3.optional)(import_zod3.string),
|
|
262
264
|
subscription: (0, import_zod3.optional)(import_zod3.string),
|
|
@@ -99,7 +99,7 @@ var CreateUserSchema = {
|
|
|
99
99
|
password: string3,
|
|
100
100
|
firstName: string3,
|
|
101
101
|
lastName: string3,
|
|
102
|
-
organization: string3,
|
|
102
|
+
organization: optional3(string3),
|
|
103
103
|
roles: array3(string3),
|
|
104
104
|
phoneNumber: optional3(string3),
|
|
105
105
|
subscription: optional3(string3),
|
|
@@ -121,6 +121,7 @@ var UserSchema = ({ uuidId }) => ({
|
|
|
121
121
|
email,
|
|
122
122
|
firstName: string3,
|
|
123
123
|
lastName: string3,
|
|
124
|
+
organization: optional3(string3),
|
|
124
125
|
roles: array3(RoleSchema({ uuidId })),
|
|
125
126
|
phoneNumber: optional3(string3),
|
|
126
127
|
subscription: optional3(string3),
|
|
@@ -266,7 +267,7 @@ var CreateUserSchema2 = {
|
|
|
266
267
|
password: string7,
|
|
267
268
|
firstName: string7,
|
|
268
269
|
lastName: string7,
|
|
269
|
-
organization: string7,
|
|
270
|
+
organization: optional7(string7),
|
|
270
271
|
roles: array7(string7),
|
|
271
272
|
phoneNumber: optional7(string7),
|
|
272
273
|
subscription: optional7(string7),
|
|
@@ -288,6 +289,7 @@ var UserSchema2 = ({ uuidId }) => ({
|
|
|
288
289
|
email: email2,
|
|
289
290
|
firstName: string7,
|
|
290
291
|
lastName: string7,
|
|
292
|
+
organization: optional7(string7),
|
|
291
293
|
roles: array7(RoleSchema2({ uuidId })),
|
|
292
294
|
phoneNumber: optional7(string7),
|
|
293
295
|
subscription: optional7(string7),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OrganizationDto, CreateOrganizationDto, UpdateOrganizationDto, PermissionDto, CreatePermissionDto, UpdatePermissionDto, UpdateRoleDto, RoleDto, CreateRoleDto, UserDto, CreateUserDto, UpdateUserDto } from '@forklaunch/interfaces-iam/types';
|
|
2
|
-
import
|
|
3
|
-
import { EntityManager } from '@mikro-orm/core';
|
|
2
|
+
import * as _mikro_orm_core from '@mikro-orm/core';
|
|
3
|
+
import { InferEntity, EntityManager } from '@mikro-orm/core';
|
|
4
4
|
|
|
5
5
|
type OrganizationDtos<OrganizationStatus> = {
|
|
6
6
|
OrganizationMapper: OrganizationDto<OrganizationStatus>;
|
|
@@ -24,76 +24,234 @@ type UserDtos = {
|
|
|
24
24
|
UpdateUserMapper: UpdateUserDto;
|
|
25
25
|
};
|
|
26
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
|
+
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
31
|
+
readonly status: _mikro_orm_core.UniversalPropertyOptionsBuilder<any, _mikro_orm_core.EmptyOptions, "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" | ("~options" | "~type" | "$type" | "strictNullable") | "nativeEnumName">;
|
|
32
|
+
}, undefined, never, never, false>, never, {
|
|
33
|
+
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
34
|
+
primary: true;
|
|
35
|
+
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
36
|
+
readonly status: _mikro_orm_core.UniversalPropertyOptionsBuilder<any, _mikro_orm_core.EmptyOptions, "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" | ("~options" | "~type" | "$type" | "strictNullable") | "nativeEnumName">;
|
|
37
|
+
}, _mikro_orm_core.EntityCtor<_mikro_orm_core.InferEntityFromProperties<{
|
|
38
|
+
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
39
|
+
primary: true;
|
|
40
|
+
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
41
|
+
readonly status: _mikro_orm_core.UniversalPropertyOptionsBuilder<any, _mikro_orm_core.EmptyOptions, "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" | ("~options" | "~type" | "$type" | "strictNullable") | "nativeEnumName">;
|
|
42
|
+
}, undefined, never, never, false>>>;
|
|
43
|
+
declare const Role: _mikro_orm_core.EntitySchemaWithMeta<"Role", string, _mikro_orm_core.InferEntityFromProperties<{
|
|
44
|
+
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
45
|
+
primary: true;
|
|
46
|
+
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
47
|
+
readonly permissions: () => _mikro_orm_core.PropertyChain<_mikro_orm_core.InferEntityFromProperties<{
|
|
48
|
+
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
49
|
+
primary: true;
|
|
50
|
+
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
51
|
+
readonly slug: _mikro_orm_core.UniversalPropertyOptionsBuilder<string, _mikro_orm_core.EmptyOptions, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
52
|
+
}, undefined, never, never, false>, _mikro_orm_core.EmptyOptions & {
|
|
53
|
+
kind: "m:n";
|
|
54
|
+
}>;
|
|
55
|
+
}, undefined, never, never, false>, never, {
|
|
56
|
+
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
57
|
+
primary: true;
|
|
58
|
+
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
59
|
+
readonly permissions: () => _mikro_orm_core.PropertyChain<_mikro_orm_core.InferEntityFromProperties<{
|
|
60
|
+
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
61
|
+
primary: true;
|
|
62
|
+
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
63
|
+
readonly slug: _mikro_orm_core.UniversalPropertyOptionsBuilder<string, _mikro_orm_core.EmptyOptions, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
64
|
+
}, undefined, never, never, false>, _mikro_orm_core.EmptyOptions & {
|
|
65
|
+
kind: "m:n";
|
|
66
|
+
}>;
|
|
67
|
+
}, _mikro_orm_core.EntityCtor<_mikro_orm_core.InferEntityFromProperties<{
|
|
68
|
+
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
69
|
+
primary: true;
|
|
70
|
+
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
71
|
+
readonly permissions: () => _mikro_orm_core.PropertyChain<_mikro_orm_core.InferEntityFromProperties<{
|
|
72
|
+
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
73
|
+
primary: true;
|
|
74
|
+
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
75
|
+
readonly slug: _mikro_orm_core.UniversalPropertyOptionsBuilder<string, _mikro_orm_core.EmptyOptions, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
76
|
+
}, undefined, never, never, false>, _mikro_orm_core.EmptyOptions & {
|
|
77
|
+
kind: "m:n";
|
|
78
|
+
}>;
|
|
79
|
+
}, undefined, never, never, false>>>;
|
|
80
|
+
declare const Permission: _mikro_orm_core.EntitySchemaWithMeta<"Permission", string, _mikro_orm_core.InferEntityFromProperties<{
|
|
81
|
+
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
82
|
+
primary: true;
|
|
83
|
+
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
84
|
+
readonly slug: _mikro_orm_core.UniversalPropertyOptionsBuilder<string, _mikro_orm_core.EmptyOptions, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
85
|
+
}, undefined, never, never, false>, never, {
|
|
86
|
+
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
87
|
+
primary: true;
|
|
88
|
+
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
89
|
+
readonly slug: _mikro_orm_core.UniversalPropertyOptionsBuilder<string, _mikro_orm_core.EmptyOptions, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
90
|
+
}, _mikro_orm_core.EntityCtor<_mikro_orm_core.InferEntityFromProperties<{
|
|
91
|
+
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
92
|
+
primary: true;
|
|
93
|
+
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
94
|
+
readonly slug: _mikro_orm_core.UniversalPropertyOptionsBuilder<string, _mikro_orm_core.EmptyOptions, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
95
|
+
}, undefined, never, never, false>>>;
|
|
96
|
+
declare const User: _mikro_orm_core.EntitySchemaWithMeta<"User", string, _mikro_orm_core.InferEntityFromProperties<{
|
|
97
|
+
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
98
|
+
primary: true;
|
|
99
|
+
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
100
|
+
readonly organization: () => _mikro_orm_core.PropertyChain<_mikro_orm_core.InferEntityFromProperties<{
|
|
101
|
+
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
102
|
+
primary: true;
|
|
103
|
+
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
104
|
+
readonly status: _mikro_orm_core.UniversalPropertyOptionsBuilder<any, _mikro_orm_core.EmptyOptions, "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" | ("~options" | "~type" | "$type" | "strictNullable") | "nativeEnumName">;
|
|
105
|
+
}, undefined, never, never, false>, Omit<_mikro_orm_core.EmptyOptions & {
|
|
106
|
+
kind: "m:1";
|
|
107
|
+
}, "nullable"> & {
|
|
108
|
+
nullable: true;
|
|
109
|
+
}>;
|
|
110
|
+
}, undefined, never, never, false>, never, {
|
|
111
|
+
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
112
|
+
primary: true;
|
|
113
|
+
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
114
|
+
readonly organization: () => _mikro_orm_core.PropertyChain<_mikro_orm_core.InferEntityFromProperties<{
|
|
115
|
+
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
116
|
+
primary: true;
|
|
117
|
+
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
118
|
+
readonly status: _mikro_orm_core.UniversalPropertyOptionsBuilder<any, _mikro_orm_core.EmptyOptions, "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" | ("~options" | "~type" | "$type" | "strictNullable") | "nativeEnumName">;
|
|
119
|
+
}, undefined, never, never, false>, Omit<_mikro_orm_core.EmptyOptions & {
|
|
120
|
+
kind: "m:1";
|
|
121
|
+
}, "nullable"> & {
|
|
122
|
+
nullable: true;
|
|
123
|
+
}>;
|
|
124
|
+
}, _mikro_orm_core.EntityCtor<_mikro_orm_core.InferEntityFromProperties<{
|
|
125
|
+
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
126
|
+
primary: true;
|
|
127
|
+
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
128
|
+
readonly organization: () => _mikro_orm_core.PropertyChain<_mikro_orm_core.InferEntityFromProperties<{
|
|
129
|
+
readonly id: Pick<_mikro_orm_core.UniversalPropertyOptionsBuilder<string, Omit<_mikro_orm_core.EmptyOptions, "primary"> & {
|
|
130
|
+
primary: true;
|
|
131
|
+
}, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>, keyof _mikro_orm_core.PropertyOptions<any> | ("~options" | "~type" | "$type" | "strictNullable")>;
|
|
132
|
+
readonly status: _mikro_orm_core.UniversalPropertyOptionsBuilder<any, _mikro_orm_core.EmptyOptions, "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" | ("~options" | "~type" | "$type" | "strictNullable") | "nativeEnumName">;
|
|
133
|
+
}, undefined, never, never, false>, Omit<_mikro_orm_core.EmptyOptions & {
|
|
134
|
+
kind: "m:1";
|
|
135
|
+
}, "nullable"> & {
|
|
136
|
+
nullable: true;
|
|
137
|
+
}>;
|
|
138
|
+
}, undefined, never, never, false>>>;
|
|
139
|
+
|
|
27
140
|
type OrganizationEntities<OrganizationStatus> = {
|
|
28
|
-
OrganizationMapper:
|
|
29
|
-
|
|
30
|
-
|
|
141
|
+
OrganizationMapper: {
|
|
142
|
+
'~entity': (typeof Organization)['~entity'] & {
|
|
143
|
+
status: OrganizationStatus[keyof OrganizationStatus];
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
CreateOrganizationMapper: {
|
|
147
|
+
'~entity': (typeof Organization)['~entity'] & {
|
|
148
|
+
status: OrganizationStatus[keyof OrganizationStatus];
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
UpdateOrganizationMapper: {
|
|
152
|
+
'~entity': (typeof Organization)['~entity'] & {
|
|
153
|
+
status: OrganizationStatus[keyof OrganizationStatus];
|
|
154
|
+
};
|
|
155
|
+
};
|
|
31
156
|
};
|
|
32
157
|
type PermissionEntities = {
|
|
33
|
-
PermissionMapper:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
158
|
+
PermissionMapper: {
|
|
159
|
+
'~entity': (typeof Permission)['~entity'];
|
|
160
|
+
};
|
|
161
|
+
CreatePermissionMapper: {
|
|
162
|
+
'~entity': (typeof Permission)['~entity'];
|
|
163
|
+
};
|
|
164
|
+
UpdatePermissionMapper: {
|
|
165
|
+
'~entity': (typeof Permission)['~entity'];
|
|
166
|
+
};
|
|
167
|
+
RoleEntityMapper: {
|
|
168
|
+
'~entity': (typeof Role)['~entity'];
|
|
169
|
+
};
|
|
37
170
|
};
|
|
38
171
|
type RoleEntities = {
|
|
39
|
-
RoleMapper:
|
|
40
|
-
|
|
41
|
-
|
|
172
|
+
RoleMapper: {
|
|
173
|
+
'~entity': (typeof Role)['~entity'];
|
|
174
|
+
};
|
|
175
|
+
CreateRoleMapper: {
|
|
176
|
+
'~entity': (typeof Role)['~entity'];
|
|
177
|
+
};
|
|
178
|
+
UpdateRoleMapper: {
|
|
179
|
+
'~entity': (typeof Role)['~entity'];
|
|
180
|
+
};
|
|
42
181
|
};
|
|
43
182
|
type UserEntities = {
|
|
44
|
-
UserMapper:
|
|
45
|
-
|
|
46
|
-
|
|
183
|
+
UserMapper: {
|
|
184
|
+
'~entity': (typeof User)['~entity'];
|
|
185
|
+
};
|
|
186
|
+
CreateUserMapper: {
|
|
187
|
+
'~entity': (typeof User)['~entity'];
|
|
188
|
+
};
|
|
189
|
+
UpdateUserMapper: {
|
|
190
|
+
'~entity': (typeof User)['~entity'];
|
|
191
|
+
};
|
|
47
192
|
};
|
|
48
193
|
|
|
49
194
|
type OrganizationMappers<OrganizationStatus, MapperEntities extends OrganizationEntities<OrganizationStatus>, MapperDomains extends OrganizationDtos<OrganizationStatus>> = {
|
|
50
195
|
OrganizationMapper: {
|
|
51
|
-
|
|
196
|
+
entity: MapperEntities['OrganizationMapper'];
|
|
197
|
+
toDto: (entity: InferEntity<MapperEntities['OrganizationMapper']>) => Promise<MapperDomains['OrganizationMapper']>;
|
|
52
198
|
};
|
|
53
199
|
CreateOrganizationMapper: {
|
|
54
|
-
|
|
200
|
+
entity: MapperEntities['CreateOrganizationMapper'];
|
|
201
|
+
toEntity: (dto: MapperDomains['CreateOrganizationMapper'], em: EntityManager, ...args: unknown[]) => Promise<InferEntity<MapperEntities['CreateOrganizationMapper']>>;
|
|
55
202
|
};
|
|
56
203
|
UpdateOrganizationMapper: {
|
|
57
|
-
|
|
204
|
+
entity: MapperEntities['UpdateOrganizationMapper'];
|
|
205
|
+
toEntity: (dto: MapperDomains['UpdateOrganizationMapper'], em: EntityManager, ...args: unknown[]) => Promise<InferEntity<MapperEntities['UpdateOrganizationMapper']>>;
|
|
58
206
|
};
|
|
59
207
|
};
|
|
60
208
|
|
|
61
209
|
type PermissionMappers<MapperEntities extends PermissionEntities, MapperDomains extends PermissionDtos> = {
|
|
62
210
|
PermissionMapper: {
|
|
63
|
-
|
|
211
|
+
entity: MapperEntities['PermissionMapper'];
|
|
212
|
+
toDto: (entity: InferEntity<MapperEntities['PermissionMapper']>) => Promise<MapperDomains['PermissionMapper']>;
|
|
64
213
|
};
|
|
65
214
|
CreatePermissionMapper: {
|
|
66
|
-
|
|
215
|
+
entity: MapperEntities['CreatePermissionMapper'];
|
|
216
|
+
toEntity: (dto: MapperDomains['CreatePermissionMapper'], em: EntityManager, ...args: unknown[]) => Promise<InferEntity<MapperEntities['CreatePermissionMapper']>>;
|
|
67
217
|
};
|
|
68
218
|
UpdatePermissionMapper: {
|
|
69
|
-
|
|
219
|
+
entity: MapperEntities['UpdatePermissionMapper'];
|
|
220
|
+
toEntity: (dto: MapperDomains['UpdatePermissionMapper'], em: EntityManager, ...args: unknown[]) => Promise<InferEntity<MapperEntities['UpdatePermissionMapper']>>;
|
|
70
221
|
};
|
|
71
222
|
RoleEntityMapper: {
|
|
72
|
-
|
|
223
|
+
entity: MapperEntities['RoleEntityMapper'];
|
|
224
|
+
toEntity: (dto: MapperDomains['RoleEntityMapper'], em: EntityManager, ...args: unknown[]) => Promise<InferEntity<MapperEntities['RoleEntityMapper']>>;
|
|
73
225
|
};
|
|
74
226
|
};
|
|
75
227
|
|
|
76
228
|
type RoleMappers<MapperEntities extends RoleEntities, MapperDomains extends RoleDtos> = {
|
|
77
229
|
RoleMapper: {
|
|
78
|
-
|
|
230
|
+
entity: MapperEntities['RoleMapper'];
|
|
231
|
+
toDto: (entity: InferEntity<MapperEntities['RoleMapper']>) => Promise<MapperDomains['RoleMapper']>;
|
|
79
232
|
};
|
|
80
233
|
CreateRoleMapper: {
|
|
81
|
-
|
|
234
|
+
entity: MapperEntities['CreateRoleMapper'];
|
|
235
|
+
toEntity: (dto: MapperDomains['CreateRoleMapper'], em: EntityManager, ...args: unknown[]) => Promise<InferEntity<MapperEntities['CreateRoleMapper']>>;
|
|
82
236
|
};
|
|
83
237
|
UpdateRoleMapper: {
|
|
84
|
-
|
|
238
|
+
entity: MapperEntities['UpdateRoleMapper'];
|
|
239
|
+
toEntity: (dto: MapperDomains['UpdateRoleMapper'], em: EntityManager, ...args: unknown[]) => Promise<InferEntity<MapperEntities['UpdateRoleMapper']>>;
|
|
85
240
|
};
|
|
86
241
|
};
|
|
87
242
|
|
|
88
243
|
type UserMappers<MapperEntities extends UserEntities, MapperDomains extends UserDtos> = {
|
|
89
244
|
UserMapper: {
|
|
90
|
-
|
|
245
|
+
entity: MapperEntities['UserMapper'];
|
|
246
|
+
toDto: (entity: InferEntity<MapperEntities['UserMapper']>) => Promise<MapperDomains['UserMapper']>;
|
|
91
247
|
};
|
|
92
248
|
CreateUserMapper: {
|
|
93
|
-
|
|
249
|
+
entity: MapperEntities['CreateUserMapper'];
|
|
250
|
+
toEntity: (dto: MapperDomains['CreateUserMapper'], em: EntityManager, ...args: unknown[]) => Promise<InferEntity<MapperEntities['CreateUserMapper']>>;
|
|
94
251
|
};
|
|
95
252
|
UpdateUserMapper: {
|
|
96
|
-
|
|
253
|
+
entity: MapperEntities['UpdateUserMapper'];
|
|
254
|
+
toEntity: (dto: MapperDomains['UpdateUserMapper'], em: EntityManager, ...args: unknown[]) => Promise<InferEntity<MapperEntities['UpdateUserMapper']>>;
|
|
97
255
|
};
|
|
98
256
|
};
|
|
99
257
|
|