@forklaunch/implementation-iam-base 0.1.2 → 0.1.5

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.
Files changed (87) hide show
  1. package/lib/__test__/schemaEquality.test.d.ts +2 -0
  2. package/lib/__test__/schemaEquality.test.d.ts.map +1 -0
  3. package/lib/__test__/schemaEquality.test.js +175 -0
  4. package/lib/eject/schemas/index.ts +4 -0
  5. package/{schemas/typebox → lib/eject/schemas}/organization.schema.ts +13 -11
  6. package/{schemas/zod → lib/eject/schemas}/permission.schema.ts +7 -1
  7. package/lib/eject/schemas/role.schema.ts +37 -0
  8. package/{schemas/typebox → lib/eject/schemas}/user.schema.ts +20 -19
  9. package/lib/eject/services/index.ts +4 -0
  10. package/{services → lib/eject/services}/organization.service.ts +6 -6
  11. package/{services → lib/eject/services}/permission.service.ts +9 -6
  12. package/{services → lib/eject/services}/role.service.ts +6 -6
  13. package/{services → lib/eject/services}/user.service.ts +11 -9
  14. package/lib/jest.config.d.ts +4 -0
  15. package/lib/jest.config.d.ts.map +1 -0
  16. package/lib/jest.config.js +19 -0
  17. package/lib/schemas/index.d.ts +5 -0
  18. package/lib/schemas/index.d.ts.map +1 -0
  19. package/lib/schemas/index.js +4 -0
  20. package/lib/schemas/organization.schema.d.ts +192 -0
  21. package/lib/schemas/organization.schema.d.ts.map +1 -0
  22. package/lib/schemas/organization.schema.js +4 -0
  23. package/lib/schemas/permission.schema.d.ts +42 -0
  24. package/lib/schemas/permission.schema.d.ts.map +1 -0
  25. package/lib/schemas/permission.schema.js +4 -0
  26. package/lib/schemas/role.schema.d.ts +66 -0
  27. package/lib/schemas/role.schema.d.ts.map +1 -0
  28. package/lib/schemas/role.schema.js +4 -0
  29. package/lib/schemas/typebox/organization.schema.d.ts +106 -0
  30. package/lib/schemas/typebox/organization.schema.d.ts.map +1 -0
  31. package/lib/schemas/typebox/organization.schema.js +34 -0
  32. package/lib/schemas/typebox/permission.schema.d.ts +41 -0
  33. package/lib/schemas/typebox/permission.schema.d.ts.map +1 -0
  34. package/lib/schemas/typebox/permission.schema.js +25 -0
  35. package/lib/schemas/typebox/role.schema.d.ts +53 -0
  36. package/lib/schemas/typebox/role.schema.d.ts.map +1 -0
  37. package/lib/schemas/typebox/role.schema.js +26 -0
  38. package/lib/schemas/typebox/user.schema.d.ts +97 -0
  39. package/lib/schemas/typebox/user.schema.d.ts.map +1 -0
  40. package/lib/schemas/typebox/user.schema.js +41 -0
  41. package/lib/schemas/user.schema.d.ts +136 -0
  42. package/lib/schemas/user.schema.d.ts.map +1 -0
  43. package/lib/schemas/user.schema.js +4 -0
  44. package/lib/schemas/zod/organization.schema.d.ts +278 -0
  45. package/lib/schemas/zod/organization.schema.d.ts.map +1 -0
  46. package/lib/schemas/zod/organization.schema.js +34 -0
  47. package/lib/schemas/zod/permission.schema.d.ts +41 -0
  48. package/lib/schemas/zod/permission.schema.d.ts.map +1 -0
  49. package/lib/schemas/zod/permission.schema.js +25 -0
  50. package/lib/schemas/zod/role.schema.d.ts +77 -0
  51. package/lib/schemas/zod/role.schema.d.ts.map +1 -0
  52. package/lib/schemas/zod/role.schema.js +26 -0
  53. package/lib/schemas/zod/user.schema.d.ts +173 -0
  54. package/lib/schemas/zod/user.schema.d.ts.map +1 -0
  55. package/lib/schemas/zod/user.schema.js +41 -0
  56. package/lib/services/index.d.ts +5 -0
  57. package/lib/services/index.d.ts.map +1 -0
  58. package/lib/services/index.js +4 -0
  59. package/lib/services/organization.service.d.ts +45 -0
  60. package/lib/services/organization.service.d.ts.map +1 -0
  61. package/lib/services/organization.service.js +35 -0
  62. package/lib/services/permission.service.d.ts +62 -0
  63. package/lib/services/permission.service.d.ts.map +1 -0
  64. package/lib/services/permission.service.js +159 -0
  65. package/lib/services/role.service.d.ts +49 -0
  66. package/lib/services/role.service.d.ts.map +1 -0
  67. package/lib/services/role.service.js +57 -0
  68. package/lib/services/user.service.d.ts +54 -0
  69. package/lib/services/user.service.d.ts.map +1 -0
  70. package/lib/services/user.service.js +85 -0
  71. package/lib/tsconfig.tsbuildinfo +1 -0
  72. package/lib/vitest.config.d.ts +3 -0
  73. package/lib/vitest.config.d.ts.map +1 -0
  74. package/lib/vitest.config.js +7 -0
  75. package/package.json +22 -10
  76. package/__test__/schemaEquality.test.ts +0 -293
  77. package/index.ts +0 -8
  78. package/schemas/organization.schema.ts +0 -28
  79. package/schemas/permission.schema.ts +0 -28
  80. package/schemas/role.schema.ts +0 -28
  81. package/schemas/typebox/permission.schema.ts +0 -30
  82. package/schemas/typebox/role.schema.ts +0 -36
  83. package/schemas/user.schema.ts +0 -28
  84. package/schemas/zod/organization.schema.ts +0 -49
  85. package/schemas/zod/role.schema.ts +0 -36
  86. package/schemas/zod/user.schema.ts +0 -52
  87. package/tsconfig.json +0 -7
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=schemaEquality.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemaEquality.test.d.ts","sourceRoot":"","sources":["../../__test__/schemaEquality.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,175 @@
1
+ import { isTrue } from '@forklaunch/common';
2
+ import { DummyEnum, testSchemaEquality } from '@forklaunch/core/test';
3
+ import { CreateOrganizationSchema as TypeboxCreateOrganizationSchema, OrganizationSchema as TypeboxOrganizationSchema, UpdateOrganizationSchema as TypeboxUpdateOrganizationSchema } from '../schemas/typebox/organization.schema';
4
+ import { CreatePermissionSchema as TypeboxCreatePermissionSchema, PermissionSchema as TypeboxPermissionSchema, UpdatePermissionSchema as TypeboxUpdatePermissionSchema } from '../schemas/typebox/permission.schema';
5
+ import { CreateRoleSchema as TypeboxCreateRoleSchema, RoleSchema as TypeboxRoleSchema, UpdateRoleSchema as TypeboxUpdateRoleSchema } from '../schemas/typebox/role.schema';
6
+ import { CreateUserSchema as TypeboxCreateUserSchema, UpdateUserSchema as TypeboxUpdateUserSchema, UserSchema as TypeboxUserSchema } from '../schemas/typebox/user.schema';
7
+ import { CreateOrganizationSchema as ZodCreateOrganizationSchema, OrganizationSchema as ZodOrganizationSchema, UpdateOrganizationSchema as ZodUpdateOrganizationSchema } from '../schemas/zod/organization.schema';
8
+ import { CreatePermissionSchema as ZodCreatePermissionSchema, PermissionSchema as ZodPermissionSchema, UpdatePermissionSchema as ZodUpdatePermissionSchema } from '../schemas/zod/permission.schema';
9
+ import { CreateRoleSchema as ZodCreateRoleSchema, RoleSchema as ZodRoleSchema, UpdateRoleSchema as ZodUpdateRoleSchema } from '../schemas/zod/role.schema';
10
+ import { CreateUserSchema as ZodCreateUserSchema, UpdateUserSchema as ZodUpdateUserSchema, UserSchema as ZodUserSchema } from '../schemas/zod/user.schema';
11
+ const zodUpdatePermissionSchema = ZodUpdatePermissionSchema(false);
12
+ const typeboxUpdatePermissionSchema = TypeboxUpdatePermissionSchema(false);
13
+ const zodPermissionSchema = ZodPermissionSchema(false);
14
+ const typeboxPermissionSchema = TypeboxPermissionSchema(false);
15
+ const zodUpdateRoleSchema = ZodUpdateRoleSchema(false);
16
+ const typeboxUpdateRoleSchema = TypeboxUpdateRoleSchema(false);
17
+ const zodRoleSchema = ZodRoleSchema(false);
18
+ const typeboxRoleSchema = TypeboxRoleSchema(false);
19
+ const zodUpdateUserSchema = ZodUpdateUserSchema(false);
20
+ const typeboxUpdateUserSchema = TypeboxUpdateUserSchema(false);
21
+ const zodUserSchema = ZodUserSchema(false);
22
+ const typeboxUserSchema = TypeboxUserSchema(false);
23
+ const zodUpdateOrganizationSchema = ZodUpdateOrganizationSchema(false);
24
+ const typeboxUpdateOrganizationSchema = TypeboxUpdateOrganizationSchema(false);
25
+ const zodOrganizationSchema = ZodOrganizationSchema(false)(DummyEnum);
26
+ const typeboxOrganizationSchema = TypeboxOrganizationSchema(false)(DummyEnum);
27
+ describe('schema equality', () => {
28
+ it('should be equal for permission', () => {
29
+ expect(isTrue(testSchemaEquality(ZodCreatePermissionSchema, TypeboxCreatePermissionSchema, {
30
+ slug: 'test',
31
+ addToRolesIds: ['test'],
32
+ extraFields: {
33
+ test: 'test'
34
+ }
35
+ }))).toBeTruthy();
36
+ expect(isTrue(testSchemaEquality(zodUpdatePermissionSchema, typeboxUpdatePermissionSchema, {
37
+ id: 'test',
38
+ slug: 'test',
39
+ addToRolesIds: ['test'],
40
+ removeFromRolesIds: ['test'],
41
+ extraFields: {
42
+ test: 'test'
43
+ }
44
+ }))).toBeTruthy();
45
+ expect(isTrue(testSchemaEquality(zodPermissionSchema, typeboxPermissionSchema, {
46
+ id: 'test',
47
+ slug: 'test',
48
+ extraFields: {
49
+ test: 'test'
50
+ }
51
+ }))).toBeTruthy();
52
+ });
53
+ it('should be equal for role', () => {
54
+ expect(isTrue(testSchemaEquality(ZodCreateRoleSchema, TypeboxCreateRoleSchema, {
55
+ name: 'test',
56
+ permissionIds: ['test'],
57
+ extraFields: {
58
+ test: 'test'
59
+ }
60
+ }))).toBeTruthy();
61
+ expect(isTrue(testSchemaEquality(zodUpdateRoleSchema, typeboxUpdateRoleSchema, {
62
+ id: 'test',
63
+ name: 'test',
64
+ permissionIds: ['test'],
65
+ extraFields: {
66
+ test: 'test'
67
+ }
68
+ }))).toBeTruthy();
69
+ expect(isTrue(testSchemaEquality(zodRoleSchema, typeboxRoleSchema, {
70
+ id: 'test',
71
+ name: 'test',
72
+ permissions: [
73
+ {
74
+ id: 'test',
75
+ slug: 'test',
76
+ extraFields: { test: 'test' }
77
+ }
78
+ ],
79
+ extraFields: {
80
+ test: 'test'
81
+ }
82
+ }))).toBeTruthy();
83
+ });
84
+ it('should be equal for user', () => {
85
+ expect(isTrue(testSchemaEquality(ZodCreateUserSchema, TypeboxCreateUserSchema, {
86
+ email: 'test@test.com',
87
+ password: 'test',
88
+ firstName: 'test',
89
+ lastName: 'test',
90
+ organizationId: 'test',
91
+ roleIds: ['test'],
92
+ phoneNumber: 'test',
93
+ subscription: 'test',
94
+ extraFields: {
95
+ test: 'test'
96
+ }
97
+ }))).toBeTruthy();
98
+ expect(isTrue(testSchemaEquality(zodUpdateUserSchema, typeboxUpdateUserSchema, {
99
+ id: 'test',
100
+ email: 'test@test.com',
101
+ password: 'test',
102
+ firstName: 'test',
103
+ lastName: 'test',
104
+ roleIds: ['test'],
105
+ phoneNumber: 'test',
106
+ subscription: 'test',
107
+ extraFields: {
108
+ test: 'test'
109
+ }
110
+ }))).toBeTruthy();
111
+ expect(isTrue(testSchemaEquality(zodUserSchema, typeboxUserSchema, {
112
+ id: 'test',
113
+ email: 'test@test.com',
114
+ firstName: 'test',
115
+ lastName: 'test',
116
+ roles: [
117
+ {
118
+ id: 'test',
119
+ name: 'test',
120
+ permissions: [{ id: 'test', slug: 'test' }],
121
+ extraFields: {
122
+ test: 'test'
123
+ }
124
+ }
125
+ ],
126
+ phoneNumber: 'test',
127
+ subscription: 'test',
128
+ extraFields: {
129
+ test: 'test'
130
+ }
131
+ }))).toBeTruthy();
132
+ });
133
+ it('should be equal for organization', () => {
134
+ expect(isTrue(testSchemaEquality(ZodCreateOrganizationSchema, TypeboxCreateOrganizationSchema, {
135
+ name: 'test',
136
+ domain: 'test',
137
+ subscription: 'test',
138
+ logoUrl: 'test',
139
+ extraFields: { test: 'test' }
140
+ }))).toBeTruthy();
141
+ expect(isTrue(testSchemaEquality(zodUpdateOrganizationSchema, typeboxUpdateOrganizationSchema, {
142
+ id: 'test',
143
+ name: 'test',
144
+ domain: 'test',
145
+ subscription: 'test',
146
+ logoUrl: 'test',
147
+ extraFields: { test: 'test' }
148
+ }))).toBeTruthy();
149
+ expect(isTrue(testSchemaEquality(zodOrganizationSchema, typeboxOrganizationSchema, {
150
+ id: 'test',
151
+ name: 'test',
152
+ domain: 'test',
153
+ subscription: 'test',
154
+ logoUrl: 'test',
155
+ extraFields: { test: 'test' },
156
+ status: DummyEnum.A,
157
+ users: [
158
+ {
159
+ id: 'test',
160
+ email: 'test@test.com',
161
+ firstName: 'test',
162
+ lastName: 'test',
163
+ roles: [
164
+ {
165
+ id: 'test',
166
+ name: 'test',
167
+ permissions: [{ id: 'test', slug: 'test' }],
168
+ extraFields: { test: 'test' }
169
+ }
170
+ ]
171
+ }
172
+ ]
173
+ }))).toBeTruthy();
174
+ });
175
+ });
@@ -0,0 +1,4 @@
1
+ export * from './organization.schema';
2
+ export * from './permission.schema';
3
+ export * from './role.schema';
4
+ export * from './user.schema';
@@ -1,14 +1,14 @@
1
- import { IdiomaticSchema, LiteralSchema } from '@forklaunch/validator';
1
+ import { LiteralSchema } from '@forklaunch/validator';
2
2
  import {
3
3
  array,
4
4
  date,
5
5
  enum_,
6
6
  optional,
7
7
  string,
8
- TypeboxSchemaValidator,
9
8
  unknown,
10
9
  uuid
11
- } from '@forklaunch/validator/typebox';
10
+ } from '@{{app_name}}/core';
11
+ import { UserSchema } from './user.schema';
12
12
 
13
13
  export const CreateOrganizationSchema = {
14
14
  name: string,
@@ -29,21 +29,23 @@ export const UpdateOrganizationSchema = (uuidId: boolean) => ({
29
29
 
30
30
  export const OrganizationSchema =
31
31
  (uuidId: boolean) =>
32
- <
33
- UserDtoSchema extends IdiomaticSchema<TypeboxSchemaValidator>,
34
- OrganizationStatus extends Record<string, LiteralSchema>
35
- >(
36
- UserDtoSchema: UserDtoSchema,
37
- OrganizationStatus: OrganizationStatus
32
+ <OrganizationStatus extends Record<string, LiteralSchema>>(
33
+ organizationStatus: OrganizationStatus
38
34
  ) => ({
39
35
  id: uuidId ? uuid : string,
40
36
  name: string,
41
- users: array(UserDtoSchema),
37
+ users: array(UserSchema(uuidId)),
42
38
  domain: string,
43
39
  subscription: string,
44
- status: enum_(OrganizationStatus),
40
+ status: enum_(organizationStatus),
45
41
  logoUrl: optional(string),
46
42
  extraFields: optional(unknown),
47
43
  createdAt: optional(date),
48
44
  updatedAt: optional(date)
49
45
  });
46
+
47
+ export const BaseOrganizationServiceSchemas = (uuidId: boolean) => ({
48
+ CreateOrganizationSchema,
49
+ UpdateOrganizationSchema: UpdateOrganizationSchema(uuidId),
50
+ OrganizationSchema: OrganizationSchema(uuidId)
51
+ });
@@ -5,7 +5,7 @@ import {
5
5
  string,
6
6
  unknown,
7
7
  uuid
8
- } from '@forklaunch/validator/zod';
8
+ } from '@{{app_name}}/core';
9
9
 
10
10
  export const CreatePermissionSchema = {
11
11
  slug: string,
@@ -28,3 +28,9 @@ export const PermissionSchema = (uuidId: boolean) => ({
28
28
  createdAt: optional(date),
29
29
  updatedAt: optional(date)
30
30
  });
31
+
32
+ export const BasePermissionServiceSchemas = (uuidId: boolean) => ({
33
+ CreatePermissionSchema,
34
+ UpdatePermissionSchema: UpdatePermissionSchema(uuidId),
35
+ PermissionSchema: PermissionSchema(uuidId)
36
+ });
@@ -0,0 +1,37 @@
1
+ import {
2
+ array,
3
+ date,
4
+ optional,
5
+ string,
6
+ unknown,
7
+ uuid
8
+ } from '@{{app_name}}/core';
9
+ import { PermissionSchema } from './permission.schema';
10
+
11
+ export const CreateRoleSchema = {
12
+ name: string,
13
+ permissionIds: optional(array(string)),
14
+ extraFields: optional(unknown)
15
+ };
16
+
17
+ export const UpdateRoleSchema = (uuidId: boolean) => ({
18
+ id: uuidId ? uuid : string,
19
+ name: optional(string),
20
+ permissionIds: optional(array(string)),
21
+ extraFields: optional(unknown)
22
+ });
23
+
24
+ export const RoleSchema = (uuidId: boolean) => ({
25
+ id: uuidId ? uuid : string,
26
+ name: string,
27
+ permissions: array(PermissionSchema(uuidId)),
28
+ extraFields: optional(unknown),
29
+ createdAt: optional(date),
30
+ updatedAt: optional(date)
31
+ });
32
+
33
+ export const BaseRoleServiceSchemas = (uuidId: boolean) => ({
34
+ CreateRoleSchema,
35
+ UpdateRoleSchema: UpdateRoleSchema(uuidId),
36
+ RoleSchema: RoleSchema(uuidId)
37
+ });
@@ -1,14 +1,13 @@
1
- import { IdiomaticSchema } from '@forklaunch/validator';
2
1
  import {
3
2
  array,
4
3
  date,
5
4
  email,
6
5
  optional,
7
6
  string,
8
- TypeboxSchemaValidator,
9
7
  unknown,
10
8
  uuid
11
- } from '@forklaunch/validator/typebox';
9
+ } from '@{{app_name}}/core';
10
+ import { RoleSchema } from './role.schema';
12
11
 
13
12
  export const CreateUserSchema = {
14
13
  email: email,
@@ -34,19 +33,21 @@ export const UpdateUserSchema = (uuidId: boolean) => ({
34
33
  extraFields: optional(unknown)
35
34
  });
36
35
 
37
- export const UserSchema =
38
- (uuidId: boolean) =>
39
- <RoleDtoSchema extends IdiomaticSchema<TypeboxSchemaValidator>>(
40
- RoleDtoSchema: RoleDtoSchema
41
- ) => ({
42
- id: uuidId ? uuid : string,
43
- email: email,
44
- firstName: string,
45
- lastName: string,
46
- roles: array(RoleDtoSchema),
47
- phoneNumber: optional(string),
48
- subscription: optional(string),
49
- extraFields: optional(unknown),
50
- createdAt: optional(date),
51
- updatedAt: optional(date)
52
- });
36
+ export const UserSchema = (uuidId: boolean) => ({
37
+ id: uuidId ? uuid : string,
38
+ email: email,
39
+ firstName: string,
40
+ lastName: string,
41
+ roles: array(RoleSchema(uuidId)),
42
+ phoneNumber: optional(string),
43
+ subscription: optional(string),
44
+ extraFields: optional(unknown),
45
+ createdAt: optional(date),
46
+ updatedAt: optional(date)
47
+ });
48
+
49
+ export const BaseUserServiceSchemas = (uuidId: boolean) => ({
50
+ CreateUserSchema,
51
+ UpdateUserSchema: UpdateUserSchema(uuidId),
52
+ UserSchema: UserSchema(uuidId)
53
+ });
@@ -0,0 +1,4 @@
1
+ export * from './organization.service';
2
+ export * from './permission.service';
3
+ export * from './role.service';
4
+ export * from './user.service';
@@ -1,9 +1,3 @@
1
- import {
2
- CreateOrganizationDto,
3
- OrganizationDto,
4
- OrganizationService,
5
- UpdateOrganizationDto
6
- } from '@forklaunch/interfaces-iam';
7
1
  import { IdDto, InstanceTypeRecord } from '@forklaunch/common';
8
2
  import {
9
3
  InternalDtoMapper,
@@ -16,6 +10,12 @@ import {
16
10
  OpenTelemetryCollector
17
11
  } from '@forklaunch/core/http';
18
12
  import { MapNestedDtoArraysToCollections } from '@forklaunch/core/services';
13
+ import { OrganizationService } from '@forklaunch/interfaces-iam/interfaces';
14
+ import {
15
+ CreateOrganizationDto,
16
+ OrganizationDto,
17
+ UpdateOrganizationDto
18
+ } from '@forklaunch/interfaces-iam/types';
19
19
  import { AnySchemaValidator } from '@forklaunch/validator';
20
20
  import { EntityManager } from '@mikro-orm/core';
21
21
 
@@ -1,11 +1,8 @@
1
1
  import {
2
- CreatePermissionDto,
3
- PermissionDto,
4
2
  PermissionService,
5
- RoleDto,
6
- RoleService,
7
- UpdatePermissionDto
8
- } from '@forklaunch/interfaces-iam';
3
+ RoleService
4
+ } from '@forklaunch/interfaces-iam/interfaces';
5
+
9
6
  import { IdDto, IdsDto, InstanceTypeRecord } from '@forklaunch/common';
10
7
  import {
11
8
  InternalDtoMapper,
@@ -18,6 +15,12 @@ import {
18
15
  OpenTelemetryCollector
19
16
  } from '@forklaunch/core/http';
20
17
  import { MapNestedDtoArraysToCollections } from '@forklaunch/core/services';
18
+ import {
19
+ CreatePermissionDto,
20
+ PermissionDto,
21
+ RoleDto,
22
+ UpdatePermissionDto
23
+ } from '@forklaunch/interfaces-iam/types';
21
24
  import { AnySchemaValidator } from '@forklaunch/validator';
22
25
  import { EntityManager } from '@mikro-orm/core';
23
26
 
@@ -1,13 +1,8 @@
1
- import {
2
- CreateRoleDto,
3
- RoleDto,
4
- RoleService,
5
- UpdateRoleDto
6
- } from '@forklaunch/interfaces-iam';
7
1
  import {
8
2
  MetricsDefinition,
9
3
  OpenTelemetryCollector
10
4
  } from '@forklaunch/core/http';
5
+ import { RoleService } from '@forklaunch/interfaces-iam/interfaces';
11
6
  import { EntityManager } from '@mikro-orm/core';
12
7
 
13
8
  import { IdDto, IdsDto, InstanceTypeRecord } from '@forklaunch/common';
@@ -18,6 +13,11 @@ import {
18
13
  transformIntoInternalDtoMapper
19
14
  } from '@forklaunch/core/dtoMapper';
20
15
  import { MapNestedDtoArraysToCollections } from '@forklaunch/core/services';
16
+ import {
17
+ CreateRoleDto,
18
+ RoleDto,
19
+ UpdateRoleDto
20
+ } from '@forklaunch/interfaces-iam/types';
21
21
  import { AnySchemaValidator } from '@forklaunch/validator';
22
22
 
23
23
  export class BaseRoleService<
@@ -1,16 +1,9 @@
1
1
  import {
2
- CreateUserDto,
2
+ OrganizationService,
3
3
  RoleService,
4
- UpdateUserDto,
5
- UserDto,
6
4
  UserService
7
- } from '@forklaunch/interfaces-iam';
8
- import {
9
- MetricsDefinition,
10
- OpenTelemetryCollector
11
- } from '@forklaunch/core/http';
5
+ } from '@forklaunch/interfaces-iam/interfaces';
12
6
 
13
- import { OrganizationService } from '@forklaunch/interfaces-iam';
14
7
  import { IdDto, IdsDto, InstanceTypeRecord } from '@forklaunch/common';
15
8
  import {
16
9
  InternalDtoMapper,
@@ -18,7 +11,16 @@ import {
18
11
  ResponseDtoMapperConstructor,
19
12
  transformIntoInternalDtoMapper
20
13
  } from '@forklaunch/core/dtoMapper';
14
+ import {
15
+ MetricsDefinition,
16
+ OpenTelemetryCollector
17
+ } from '@forklaunch/core/http';
21
18
  import { MapNestedDtoArraysToCollections } from '@forklaunch/core/services';
19
+ import {
20
+ CreateUserDto,
21
+ UpdateUserDto,
22
+ UserDto
23
+ } from '@forklaunch/interfaces-iam/types';
22
24
  import { AnySchemaValidator } from '@forklaunch/validator';
23
25
  import { EntityManager } from '@mikro-orm/core';
24
26
 
@@ -0,0 +1,4 @@
1
+ import type { JestConfigWithTsJest } from 'ts-jest';
2
+ declare const jestConfig: JestConfigWithTsJest;
3
+ export default jestConfig;
4
+ //# sourceMappingURL=jest.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jest.config.d.ts","sourceRoot":"","sources":["../jest.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,QAAA,MAAM,UAAU,EAAE,oBAiBjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,19 @@
1
+ const jestConfig = {
2
+ preset: 'ts-jest/presets/default-esm', // or other ESM presets
3
+ moduleNameMapper: {
4
+ '^(\\.{1,2}/.*)\\.js$': '$1'
5
+ },
6
+ transform: {
7
+ // '^.+\\.[tj]sx?$' to process ts,js,tsx,jsx with `ts-jest`
8
+ // '^.+\\.m?[tj]sx?$' to process ts,js,tsx,jsx,mts,mjs,mtsx,mjsx with `ts-jest`
9
+ '^.+\\.[tj]sx?$': [
10
+ 'ts-jest',
11
+ {
12
+ useESM: true
13
+ }
14
+ ],
15
+ '^.+\\.js$': 'babel-jest'
16
+ },
17
+ testPathIgnorePatterns: ['.*dist/', '.*node_modules/']
18
+ };
19
+ export default jestConfig;
@@ -0,0 +1,5 @@
1
+ export * from './organization.schema';
2
+ export * from './permission.schema';
3
+ export * from './role.schema';
4
+ export * from './user.schema';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './organization.schema';
2
+ export * from './permission.schema';
3
+ export * from './role.schema';
4
+ export * from './user.schema';