@hedhog/admin 0.0.103 → 0.0.105

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. package/README.md +141 -141
  2. package/dist/admin.module.js +7 -7
  3. package/dist/admin.module.js.map +1 -1
  4. package/dist/auth/auth.service.d.ts +1 -1
  5. package/dist/auth/auth.service.d.ts.map +1 -1
  6. package/dist/auth/auth.service.js +8 -8
  7. package/dist/auth/auth.service.js.map +1 -1
  8. package/dist/auth/auth.service.spec.js +16 -16
  9. package/dist/auth/auth.service.spec.js.map +1 -1
  10. package/dist/dto/with-locale.dto.d.ts +4 -0
  11. package/dist/dto/with-locale.dto.d.ts.map +1 -0
  12. package/dist/dto/{with-locales.dto.js → with-locale.dto.js} +5 -5
  13. package/dist/dto/with-locale.dto.js.map +1 -0
  14. package/dist/index.d.ts +2 -2
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +2 -2
  17. package/dist/index.js.map +1 -1
  18. package/dist/locale/locale.controller.js +1 -1
  19. package/dist/locale/locale.controller.js.map +1 -1
  20. package/dist/locale/locale.middleware.d.ts +1 -1
  21. package/dist/locale/locale.middleware.d.ts.map +1 -1
  22. package/dist/locale/locale.middleware.js +2 -2
  23. package/dist/locale/locale.middleware.js.map +1 -1
  24. package/dist/locale/locale.service.d.ts +6 -6
  25. package/dist/locale/locale.service.d.ts.map +1 -1
  26. package/dist/locale/locale.service.js +40 -40
  27. package/dist/locale/locale.service.js.map +1 -1
  28. package/dist/locale/locale.service.spec.js +14 -14
  29. package/dist/locale/locale.service.spec.js.map +1 -1
  30. package/dist/menu/menu.controller.js +3 -3
  31. package/dist/menu/menu.controller.js.map +1 -1
  32. package/dist/menu/menu.service.d.ts +3 -3
  33. package/dist/menu/menu.service.d.ts.map +1 -1
  34. package/dist/menu/menu.service.js +35 -35
  35. package/dist/menu/menu.service.js.map +1 -1
  36. package/dist/menu/menu.service.spec.js +33 -37
  37. package/dist/menu/menu.service.spec.js.map +1 -1
  38. package/dist/role/dto/create.dto.d.ts +2 -2
  39. package/dist/role/dto/create.dto.d.ts.map +1 -1
  40. package/dist/role/dto/create.dto.js +2 -2
  41. package/dist/role/dto/create.dto.js.map +1 -1
  42. package/dist/role/guards/role.guard.js +4 -4
  43. package/dist/role/guards/role.guard.js.map +1 -1
  44. package/dist/role/role.controller.js +7 -7
  45. package/dist/role/role.controller.js.map +1 -1
  46. package/dist/role/role.service.d.ts +2 -2
  47. package/dist/role/role.service.d.ts.map +1 -1
  48. package/dist/role/role.service.js +35 -35
  49. package/dist/role/role.service.js.map +1 -1
  50. package/dist/role/role.service.spec.d.ts +0 -1
  51. package/dist/role/role.service.spec.js +400 -340
  52. package/dist/role/role.service.spec.js.map +1 -1
  53. package/dist/route/route.controller.js +3 -3
  54. package/dist/route/route.controller.js.map +1 -1
  55. package/dist/route/route.service.d.ts +2 -2
  56. package/dist/route/route.service.d.ts.map +1 -1
  57. package/dist/route/route.service.js +18 -18
  58. package/dist/route/route.service.js.map +1 -1
  59. package/dist/route/route.service.spec.js +27 -27
  60. package/dist/route/route.service.spec.js.map +1 -1
  61. package/dist/screen/screen.controller.js +4 -4
  62. package/dist/screen/screen.controller.js.map +1 -1
  63. package/dist/screen/screen.service.d.ts +2 -2
  64. package/dist/screen/screen.service.d.ts.map +1 -1
  65. package/dist/screen/screen.service.js +16 -16
  66. package/dist/screen/screen.service.js.map +1 -1
  67. package/dist/screen/screen.service.spec.js +16 -16
  68. package/dist/screen/screen.service.spec.js.map +1 -1
  69. package/dist/setting/dto/setting.dto.d.ts +9 -0
  70. package/dist/setting/dto/setting.dto.d.ts.map +1 -0
  71. package/dist/setting/dto/{settings.dto.js → setting.dto.js} +6 -6
  72. package/dist/setting/dto/setting.dto.js.map +1 -0
  73. package/dist/setting/{settings.controller.d.ts → setting.controller.d.ts} +6 -6
  74. package/dist/setting/setting.controller.d.ts.map +1 -0
  75. package/dist/setting/{settings.controller.js → setting.controller.js} +20 -20
  76. package/dist/setting/setting.controller.js.map +1 -0
  77. package/dist/setting/setting.module.d.ts +3 -0
  78. package/dist/setting/setting.module.d.ts.map +1 -0
  79. package/dist/setting/{settings.module.js → setting.module.js} +6 -6
  80. package/dist/setting/setting.module.js.map +1 -0
  81. package/dist/setting/{settings.service.d.ts → setting.service.d.ts} +4 -4
  82. package/dist/setting/setting.service.d.ts.map +1 -0
  83. package/dist/setting/{settings.service.js → setting.service.js} +42 -42
  84. package/dist/setting/setting.service.js.map +1 -0
  85. package/dist/setting/setting.service.spec.d.ts +2 -0
  86. package/dist/setting/setting.service.spec.d.ts.map +1 -0
  87. package/dist/setting/{settings.service.spec.js → setting.service.spec.js} +17 -17
  88. package/dist/setting/setting.service.spec.js.map +1 -0
  89. package/dist/user/user.controller.js +3 -3
  90. package/dist/user/user.controller.js.map +1 -1
  91. package/dist/user/user.service.d.ts +2 -2
  92. package/dist/user/user.service.d.ts.map +1 -1
  93. package/dist/user/user.service.js +9 -9
  94. package/dist/user/user.service.js.map +1 -1
  95. package/dist/user/user.service.spec.js +24 -24
  96. package/dist/user/user.service.spec.js.map +1 -1
  97. package/package.json +2 -2
  98. package/src/admin.module.ts +36 -0
  99. package/src/auth/auth.controller.ts +48 -0
  100. package/src/auth/auth.module.ts +39 -0
  101. package/src/auth/auth.service.spec.ts +196 -0
  102. package/src/auth/auth.service.ts +175 -0
  103. package/src/auth/decorators/public.decorator.ts +4 -0
  104. package/src/auth/decorators/user.decorator.ts +17 -0
  105. package/src/auth/dto/forget.dto.ts +6 -0
  106. package/src/auth/dto/login.dto.ts +15 -0
  107. package/src/auth/dto/otp.dto.ts +11 -0
  108. package/src/auth/enums/multifactor-type.enum.ts +4 -0
  109. package/src/auth/guards/auth.guard.ts +50 -0
  110. package/src/auth/types/user.type.ts +8 -0
  111. package/src/dto/delete.dto.ts +8 -0
  112. package/src/dto/update-ids.dto.ts +9 -0
  113. package/src/dto/with-locale.dto.ts +8 -0
  114. package/src/index.ts +34 -0
  115. package/src/locale/dto/create.dto.ts +12 -0
  116. package/src/locale/dto/delete.dto.ts +8 -0
  117. package/src/locale/dto/set-enabled.dto.ts +9 -0
  118. package/src/locale/dto/update.dto.ts +15 -0
  119. package/src/locale/index.ts +4 -0
  120. package/src/locale/locale.controller.ts +79 -0
  121. package/src/locale/locale.decorator.ts +8 -0
  122. package/src/locale/locale.middleware.ts +34 -0
  123. package/src/locale/locale.module.ts +23 -0
  124. package/src/locale/locale.service.spec.ts +193 -0
  125. package/src/locale/locale.service.ts +366 -0
  126. package/src/menu/dto/create.dto.ts +25 -0
  127. package/src/menu/dto/order.dto.ts +8 -0
  128. package/src/menu/dto/update.dto.ts +19 -0
  129. package/src/menu/menu.controller.ts +106 -0
  130. package/src/menu/menu.module.ts +18 -0
  131. package/src/menu/menu.service.spec.ts +247 -0
  132. package/src/menu/menu.service.ts +263 -0
  133. package/src/role/decorators/role.decorator.ts +4 -0
  134. package/src/role/dto/create.dto.ts +7 -0
  135. package/src/role/dto/update.dto.ts +4 -0
  136. package/src/role/guards/role.guard.ts +122 -0
  137. package/src/role/role.controller.ts +126 -0
  138. package/src/role/role.module.ts +28 -0
  139. package/src/role/role.service.spec.ts +417 -0
  140. package/src/role/role.service.ts +302 -0
  141. package/src/route/dto/create.dto.ts +13 -0
  142. package/src/route/dto/update.dto.ts +15 -0
  143. package/src/route/route.controller.ts +91 -0
  144. package/src/route/route.module.ts +18 -0
  145. package/src/route/route.service.spec.ts +299 -0
  146. package/src/route/route.service.ts +164 -0
  147. package/src/screen/dto/create.dto.ts +19 -0
  148. package/src/screen/dto/update.dto.ts +19 -0
  149. package/src/screen/screen.controller.ts +93 -0
  150. package/src/screen/screen.module.ts +18 -0
  151. package/src/screen/screen.service.spec.ts +298 -0
  152. package/src/screen/screen.service.ts +181 -0
  153. package/src/setting/dto/create.dto.ts +1 -0
  154. package/src/setting/dto/setting-user.dto.ts +6 -0
  155. package/src/setting/dto/setting.dto.ts +17 -0
  156. package/src/setting/dto/update.dto.ts +3 -0
  157. package/src/setting/setting.controller.ts +100 -0
  158. package/src/setting/setting.module.ts +18 -0
  159. package/src/setting/setting.service.spec.ts +183 -0
  160. package/src/setting/setting.service.ts +346 -0
  161. package/src/types/http-method.ts +8 -0
  162. package/src/user/constants/user.constants.ts +1 -0
  163. package/src/user/dto/create.dto.ts +24 -0
  164. package/src/user/dto/update.dto.ts +41 -0
  165. package/src/user/user.controller.ts +75 -0
  166. package/src/user/user.module.ts +18 -0
  167. package/src/user/user.service.spec.ts +294 -0
  168. package/src/user/user.service.ts +129 -0
  169. package/tsconfig.lib.json +9 -0
  170. package/tsconfig.production.json +20 -0
  171. package/dist/dto/with-locales.dto.d.ts +0 -4
  172. package/dist/dto/with-locales.dto.d.ts.map +0 -1
  173. package/dist/dto/with-locales.dto.js.map +0 -1
  174. package/dist/setting/dto/settings.dto.d.ts +0 -9
  175. package/dist/setting/dto/settings.dto.d.ts.map +0 -1
  176. package/dist/setting/dto/settings.dto.js.map +0 -1
  177. package/dist/setting/settings.controller.d.ts.map +0 -1
  178. package/dist/setting/settings.controller.js.map +0 -1
  179. package/dist/setting/settings.module.d.ts +0 -3
  180. package/dist/setting/settings.module.d.ts.map +0 -1
  181. package/dist/setting/settings.module.js.map +0 -1
  182. package/dist/setting/settings.service.d.ts.map +0 -1
  183. package/dist/setting/settings.service.js.map +0 -1
  184. package/dist/setting/settings.service.spec.d.ts +0 -2
  185. package/dist/setting/settings.service.spec.d.ts.map +0 -1
  186. package/dist/setting/settings.service.spec.js.map +0 -1
@@ -0,0 +1,294 @@
1
+ import {
2
+ PageOrderDirection,
3
+ PaginationDTO,
4
+ PaginationService,
5
+ } from '@hedhog/pagination';
6
+ import { PrismaService } from '@hedhog/prisma';
7
+ import { BadRequestException } from '@nestjs/common';
8
+ import { Test, TestingModule } from '@nestjs/testing';
9
+ import { genSalt, hash } from 'bcrypt';
10
+ import { DeleteDTO } from '../dto/delete.dto';
11
+ import { UpdateIdsDTO } from '../dto/update-ids.dto';
12
+ import { SALT_ROUNDS } from './constants/user.constants';
13
+ import { CreateDTO } from './dto/create.dto';
14
+ import { UpdateDTO } from './dto/update.dto';
15
+ import { UserService } from './user.service';
16
+
17
+ jest.mock('bcrypt', () => ({
18
+ genSalt: jest.fn().mockResolvedValue('mockSalt'),
19
+ hash: jest.fn().mockResolvedValue('mockHashedPassword'),
20
+ }));
21
+
22
+ describe('UserService', () => {
23
+ let service: UserService;
24
+ let prismaService: PrismaService;
25
+ let paginationService: PaginationService;
26
+
27
+ beforeEach(async () => {
28
+ const module: TestingModule = await Test.createTestingModule({
29
+ providers: [
30
+ UserService,
31
+ {
32
+ provide: PrismaService,
33
+ useValue: {
34
+ user: {
35
+ findUnique: jest.fn(),
36
+ create: jest.fn(),
37
+ update: jest.fn(),
38
+ deleteMany: jest.fn(),
39
+ },
40
+ role_user: {
41
+ deleteMany: jest.fn(),
42
+ createMany: jest.fn(),
43
+ },
44
+ createInsensitiveSearch: jest.fn(),
45
+ },
46
+ },
47
+ {
48
+ provide: PaginationService,
49
+ useValue: {
50
+ paginate: jest.fn(),
51
+ },
52
+ },
53
+ ],
54
+ }).compile();
55
+
56
+ service = module.get<UserService>(UserService);
57
+ prismaService = module.get<PrismaService>(PrismaService);
58
+ paginationService = module.get<PaginationService>(PaginationService);
59
+ });
60
+
61
+ it('should be defined', () => {
62
+ expect(service).toBeDefined();
63
+ });
64
+
65
+ describe('listRoles', () => {
66
+ it('should return paginated role for a specific user', async () => {
67
+ const paginationParams: PaginationDTO = {
68
+ page: 1,
69
+ pageSize: 10,
70
+ search: '',
71
+ sortField: '',
72
+ sortOrder: PageOrderDirection.Asc,
73
+ fields: '',
74
+ };
75
+
76
+ const mockPaginatedRoles = {
77
+ data: [],
78
+ total: 10,
79
+ lastPage: 1,
80
+ page: 1,
81
+ prev: 0,
82
+ next: 2,
83
+ pageSize: 10,
84
+ };
85
+
86
+ jest
87
+ .spyOn(paginationService, 'paginate')
88
+ .mockResolvedValue(mockPaginatedRoles);
89
+
90
+ const result = await service.listRoles(1, paginationParams);
91
+
92
+ expect(paginationService.paginate).toHaveBeenCalledWith(
93
+ prismaService.role,
94
+ paginationParams,
95
+ {
96
+ include: {
97
+ role_user: {
98
+ where: { user_id: 1 },
99
+ select: { user_id: true, role_id: true },
100
+ },
101
+ },
102
+ },
103
+ );
104
+ expect(result).toEqual(mockPaginatedRoles);
105
+ });
106
+ });
107
+
108
+ describe('updateRoles', () => {
109
+ it('should update user role', async () => {
110
+ const updateIdsDTO: UpdateIdsDTO = { ids: [1, 2] };
111
+
112
+ jest
113
+ .spyOn(prismaService.role_user, 'deleteMany')
114
+ .mockResolvedValue({ count: 1 });
115
+ jest
116
+ .spyOn(prismaService.role_user, 'createMany')
117
+ .mockResolvedValue({ count: 2 });
118
+
119
+ await service.updateRoles(1, updateIdsDTO);
120
+
121
+ expect(prismaService.role_user.deleteMany).toHaveBeenCalledWith({
122
+ where: { user_id: 1 },
123
+ });
124
+ expect(prismaService.role_user.createMany).toHaveBeenCalledWith({
125
+ data: [
126
+ { user_id: 1, role_id: 1 },
127
+ { user_id: 1, role_id: 2 },
128
+ ],
129
+ skipDuplicates: true,
130
+ });
131
+ });
132
+ });
133
+
134
+ describe('getUsers', () => {
135
+ it('should return paginated user', async () => {
136
+ const paginationParams: PaginationDTO = {
137
+ page: 1,
138
+ pageSize: 10,
139
+ search: '',
140
+ sortField: '',
141
+ sortOrder: PageOrderDirection.Asc,
142
+ fields: '',
143
+ };
144
+
145
+ const mockPaginatedUsers = {
146
+ data: [],
147
+ total: 10,
148
+ lastPage: 1,
149
+ page: 1,
150
+ prev: 0,
151
+ next: 2,
152
+ pageSize: 10,
153
+ };
154
+
155
+ jest.spyOn(prismaService, 'createInsensitiveSearch').mockReturnValue([]);
156
+ jest
157
+ .spyOn(paginationService, 'paginate')
158
+ .mockResolvedValue(mockPaginatedUsers);
159
+
160
+ const result = await service.getUsers(paginationParams);
161
+
162
+ expect(prismaService.createInsensitiveSearch).toHaveBeenCalledWith(
163
+ ['name', 'email'],
164
+ paginationParams,
165
+ );
166
+ expect(paginationService.paginate).toHaveBeenCalledWith(
167
+ prismaService.user,
168
+ paginationParams,
169
+ { where: { OR: [] } },
170
+ );
171
+ expect(result).toEqual(mockPaginatedUsers);
172
+ });
173
+ });
174
+
175
+ describe('get', () => {
176
+ it('should return a specific user by ID', async () => {
177
+ const mockUser = {
178
+ id: 1,
179
+ name: 'Test User',
180
+ email: 'user@email.com',
181
+ password: 'hashedpassword',
182
+ created_at: new Date(),
183
+ updated_at: new Date(),
184
+ multifactor_id: null,
185
+ code: null,
186
+ };
187
+ jest.spyOn(prismaService.user, 'findUnique').mockResolvedValue(mockUser);
188
+
189
+ const result = await service.get(1);
190
+
191
+ expect(prismaService.user.findUnique).toHaveBeenCalledWith({
192
+ where: { id: 1 },
193
+ });
194
+ expect(result).toEqual(mockUser);
195
+ });
196
+ });
197
+
198
+ describe('hashPassword', () => {
199
+ it('should hash the password correctly', async () => {
200
+ const password = 'plainPassword';
201
+ const result = await service.hashPassword(password);
202
+
203
+ expect(genSalt).toHaveBeenCalledWith(SALT_ROUNDS);
204
+ expect(hash).toHaveBeenCalledWith(password, 'mockSalt');
205
+ expect(result).toEqual('mockHashedPassword');
206
+ });
207
+ });
208
+
209
+ describe('create', () => {
210
+ it('should create a new user with hashed password', async () => {
211
+ const createDTO: CreateDTO = {
212
+ email: 'test@test.com',
213
+ name: 'Test User',
214
+ password: 'password123',
215
+ };
216
+ const mockUser = {
217
+ id: 1,
218
+ name: 'Test User',
219
+ email: 'user@email.com',
220
+ password: 'hashedpassword',
221
+ created_at: new Date(),
222
+ updated_at: new Date(),
223
+ multifactor_id: null,
224
+ code: null,
225
+ };
226
+
227
+ jest.spyOn(prismaService.user, 'create').mockResolvedValue(mockUser);
228
+
229
+ const result = await service.create(createDTO);
230
+
231
+ expect(prismaService.user.create).toHaveBeenCalledWith({
232
+ data: {
233
+ email: createDTO.email,
234
+ name: createDTO.name,
235
+ password: 'mockHashedPassword',
236
+ },
237
+ });
238
+ expect(result).toEqual(mockUser);
239
+ });
240
+ });
241
+
242
+ describe('update', () => {
243
+ it('should update an existing user', async () => {
244
+ const updateDTO: UpdateDTO = { name: 'Updated User' };
245
+ const updateInput = { id: 1, data: updateDTO };
246
+ const mockUser = {
247
+ id: 1,
248
+ name: 'Updated User',
249
+ email: 'user@email.com',
250
+ password: 'hashedpassword',
251
+ created_at: new Date(),
252
+ updated_at: new Date(),
253
+ multifactor_id: null,
254
+ code: null,
255
+ };
256
+ jest.spyOn(prismaService.user, 'update').mockResolvedValue(mockUser);
257
+
258
+ const result = await service.update(updateInput);
259
+
260
+ expect(prismaService.user.update).toHaveBeenCalledWith({
261
+ where: { id: updateInput.id },
262
+ data: updateInput.data,
263
+ });
264
+ expect(result).toEqual(mockUser);
265
+ });
266
+ });
267
+
268
+ describe('delete', () => {
269
+ it('should throw an error if no ids are provided', async () => {
270
+ const deleteDTO: DeleteDTO = { ids: null };
271
+
272
+ await expect(service.delete(deleteDTO)).rejects.toThrow(
273
+ new BadRequestException('You must select at least one user to delete.'),
274
+ );
275
+ });
276
+
277
+ it('should delete user by ids', async () => {
278
+ const deleteDTO: DeleteDTO = { ids: [1, 2] };
279
+
280
+ jest
281
+ .spyOn(prismaService.user, 'deleteMany')
282
+ .mockResolvedValue({ count: 2 });
283
+
284
+ await service.delete(deleteDTO);
285
+
286
+ expect(prismaService.user.deleteMany).toHaveBeenCalledWith({
287
+ where: {
288
+ id: { in: deleteDTO.ids },
289
+ email: { not: { startsWith: 'root@' } },
290
+ },
291
+ });
292
+ });
293
+ });
294
+ });
@@ -0,0 +1,129 @@
1
+ import { PaginationDTO, PaginationService } from '@hedhog/pagination';
2
+ import { PrismaService } from '@hedhog/prisma';
3
+ import {
4
+ BadRequestException,
5
+ Inject,
6
+ Injectable,
7
+ forwardRef,
8
+ } from '@nestjs/common';
9
+ import { genSalt, hash } from 'bcrypt';
10
+ import { DeleteDTO } from '../dto/delete.dto';
11
+ import { UpdateIdsDTO } from '../dto/update-ids.dto';
12
+ import { SALT_ROUNDS } from './constants/user.constants';
13
+ import { CreateDTO } from './dto/create.dto';
14
+ import { UpdateDTO } from './dto/update.dto';
15
+
16
+ @Injectable()
17
+ export class UserService {
18
+ constructor(
19
+ @Inject(forwardRef(() => PrismaService))
20
+ private readonly prismaService: PrismaService,
21
+ @Inject(forwardRef(() => PaginationService))
22
+ private readonly paginationService: PaginationService,
23
+ ) {}
24
+
25
+ async listRoles(userId: number, paginationParams: PaginationDTO) {
26
+ return this.paginationService.paginate(
27
+ this.prismaService.role,
28
+ paginationParams,
29
+ {
30
+ include: {
31
+ role_user: {
32
+ where: {
33
+ user_id: userId,
34
+ },
35
+ select: {
36
+ user_id: true,
37
+ role_id: true,
38
+ },
39
+ },
40
+ },
41
+ },
42
+ );
43
+ }
44
+
45
+ async updateRoles(userId: number, { ids }: UpdateIdsDTO) {
46
+ await this.prismaService.role_user.deleteMany({
47
+ where: {
48
+ user_id: userId,
49
+ },
50
+ });
51
+
52
+ return this.prismaService.role_user.createMany({
53
+ data: ids.map((role) => {
54
+ return {
55
+ user_id: userId,
56
+ role_id: role,
57
+ };
58
+ }),
59
+ skipDuplicates: true,
60
+ });
61
+ }
62
+
63
+ async getUsers(paginationParams: PaginationDTO) {
64
+ const fields = ['name', 'email'];
65
+ const OR = this.prismaService.createInsensitiveSearch(
66
+ fields,
67
+ paginationParams,
68
+ );
69
+
70
+ return this.paginationService.paginate(
71
+ this.prismaService.user,
72
+ paginationParams,
73
+ {
74
+ where: {
75
+ OR,
76
+ },
77
+ },
78
+ );
79
+ }
80
+
81
+ async get(userId: number) {
82
+ return this.prismaService.user.findUnique({ where: { id: userId } });
83
+ }
84
+
85
+ async hashPassword(password: string): Promise<string> {
86
+ const salt = await genSalt(SALT_ROUNDS);
87
+ return hash(password, salt);
88
+ }
89
+
90
+ async create({ email, name, password }: CreateDTO) {
91
+ const hashedPassword = await this.hashPassword(password);
92
+
93
+ return this.prismaService.user.create({
94
+ data: {
95
+ email,
96
+ name,
97
+ password: hashedPassword,
98
+ },
99
+ });
100
+ }
101
+
102
+ async update({ id, data }: { id: number; data: UpdateDTO }) {
103
+ return this.prismaService.user.update({
104
+ where: { id },
105
+ data,
106
+ });
107
+ }
108
+
109
+ async delete({ ids }: DeleteDTO) {
110
+ if (ids == undefined || ids == null) {
111
+ throw new BadRequestException(
112
+ `You must select at least one user to delete.`,
113
+ );
114
+ }
115
+
116
+ return this.prismaService.user.deleteMany({
117
+ where: {
118
+ id: {
119
+ in: ids,
120
+ },
121
+ email: {
122
+ not: {
123
+ startsWith: 'root@',
124
+ },
125
+ },
126
+ },
127
+ });
128
+ }
129
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "../../tsconfig.json",
3
+ "compilerOptions": {
4
+ "declaration": true,
5
+ "outDir": "../../dist/libs/admin"
6
+ },
7
+ "include": ["src/**/*"],
8
+ "exclude": ["node_modules", "dist", "test", "**/*spec.ts"]
9
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "compilerOptions": {
3
+ "experimentalDecorators": true,
4
+ "target": "es2017",
5
+ "module": "commonjs",
6
+ "lib": ["es2017", "es7", "es6"],
7
+ "declaration": true,
8
+ "declarationMap": true,
9
+ "sourceMap": true,
10
+ "outDir": "./dist",
11
+ "rootDir": "./src",
12
+ "strict": true,
13
+ "noImplicitAny": false,
14
+ "strictNullChecks": false,
15
+ "allowSyntheticDefaultImports": true,
16
+ "esModuleInterop": true,
17
+ "emitDecoratorMetadata": true
18
+ },
19
+ "exclude": ["node_modules", "dist", "src/migrations"]
20
+ }
@@ -1,4 +0,0 @@
1
- export declare class WithLocalesDTO {
2
- locales: Record<string, string>;
3
- }
4
- //# sourceMappingURL=with-locales.dto.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"with-locales.dto.d.ts","sourceRoot":"","sources":["../../src/dto/with-locales.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,cAAc;IAIzB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"with-locales.dto.js","sourceRoot":"","sources":["../../src/dto/with-locales.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuE;AAEvE,MAAa,cAAc;CAK1B;AALD,wCAKC;AADC;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,gCAAc,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;+CACC"}
@@ -1,9 +0,0 @@
1
- declare class Setting {
2
- slug: string;
3
- value: string;
4
- }
5
- export declare class SettingsDTO {
6
- settings: Setting[];
7
- }
8
- export {};
9
- //# sourceMappingURL=settings.dto.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"settings.dto.d.ts","sourceRoot":"","sources":["../../../src/setting/dto/settings.dto.ts"],"names":[],"mappings":"AAGA,cAAM,OAAO;IAEX,IAAI,EAAE,MAAM,CAAC;IAGb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,qBAAa,WAAW;IAItB,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"settings.dto.js","sourceRoot":"","sources":["../../../src/setting/dto/settings.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAoE;AACpE,yDAAyC;AAEzC,MAAM,OAAO;CAMZ;AAJC;IADC,IAAA,0BAAQ,GAAE;;qCACE;AAGb;IADC,IAAA,0BAAQ,GAAE;;sCACG;AAGhB,MAAa,WAAW;CAKvB;AALD,kCAKC;AADC;IAHC,IAAA,yBAAO,GAAE;IACT,IAAA,gCAAc,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,OAAO,CAAC;;6CACA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"settings.controller.d.ts","sourceRoot":"","sources":["../../src/setting/settings.controller.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C,OAAO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,CAAA;;6CAAO,sBAAS;;wDAExE;AAGK;IADL,IAAA,YAAG,GAAE;IACiB,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,0BAAW;;yDAE9C;AAGK;IADL,IAAA,cAAK,EAAC,YAAY,CAAC;IAEjB,WAAA,IAAA,cAAK,EAAC,WAAW,EAAE,qBAAY,CAAC,CAAA;IAChC,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAO,sBAAS;;gDAMxB;AAGK;IADL,IAAA,eAAM,GAAE;IACK,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,sBAAS;;gDAEnC;6BAxEU,kBAAkB;IAF9B,IAAA,qBAAI,GAAE;IACN,IAAA,mBAAU,EAAC,UAAU,CAAC;IAGlB,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,kCAAe,CAAC,CAAC,CAAA;qCACR,kCAAe;GAHxC,kBAAkB,CAyE9B"}
@@ -1,3 +0,0 @@
1
- export declare class SettingModule {
2
- }
3
- //# sourceMappingURL=settings.module.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"settings.module.d.ts","sourceRoot":"","sources":["../../src/setting/settings.module.ts"],"names":[],"mappings":"AAOA,qBAUa,aAAa;CAAG"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"settings.module.js","sourceRoot":"","sources":["../../src/setting/settings.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,mDAAsD;AACtD,2CAA8C;AAC9C,2CAAoD;AACpD,+DAA2D;AAC3D,yDAAqD;AACrD,qDAAiD;AAY1C,IAAM,aAAa,GAAnB,MAAM,aAAa;CAAG,CAAA;AAAhB,sCAAa;wBAAb,aAAa;IAVzB,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,kCAAe,CAAC;QAC5B,OAAO,EAAE,CAAC,kCAAe,CAAC;QAC1B,WAAW,EAAE,CAAC,wCAAkB,CAAC;QACjC,OAAO,EAAE;YACP,IAAA,mBAAU,EAAC,GA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AC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC;gBAClE,OAAO,CAAC,KAAK,CAAC;QAClB,CAAC,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAA;AA1UY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,sBAAa,CAAC,CAAC,CAAA;IAEvC,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,8BAAiB,CAAC,CAAC,CAAA;qCADZ,sBAAa;QAET,8BAAiB;GAL5C,eAAe,CA0U3B"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=settings.service.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"settings.service.spec.d.ts","sourceRoot":"","sources":["../../src/setting/settings.service.spec.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"settings.service.spec.js","sourceRoot":"","sources":["../../src/setting/settings.service.spec.ts"],"names":[],"mappings":";;AAAA,mDAAuD;AACvD,2CAA+C;AAC/C,2CAAqD;AACrD,6CAAsD;AAGtD,yDAAqD;AAErD,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,IAAI,OAAwB,CAAC;IAC7B,IAAI,aAA4B,CAAC;IACjC,4CAA4C;IAE5C,UAAU,CAAC,KAAK,IAAI,EAAE;QACpB,MAAM,MAAM,GAAkB,MAAM,cAAI,CAAC,mBAAmB,CAAC;YAC3D,SAAS,EAAE;gBACT,kCAAe;gBACf;oBACE,OAAO,EAAE,sBAAa;oBACtB,QAAQ,EAAE;wBACR,QAAQ,EAAE;4BACR,UAAU,EAAE,IAAI,CAAC,EAAE,EAAE;4BACrB,MAAM,EAAE,IAAI,CAAC,EAA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