@hedhog/admin 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. package/README.md +412 -0
  2. package/dist/admin.module.d.ts.map +1 -1
  3. package/dist/admin.module.js +0 -3
  4. package/dist/admin.module.js.map +1 -1
  5. package/dist/auth/src/auth.module.js +2 -2
  6. package/dist/auth/src/auth.module.js.map +1 -1
  7. package/dist/auth/src/auth.service.d.ts +1 -1
  8. package/dist/auth/src/auth.service.d.ts.map +1 -1
  9. package/dist/auth/src/auth.service.js +3 -3
  10. package/dist/auth/src/auth.service.js.map +1 -1
  11. package/dist/index.d.ts +0 -8
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +0 -11
  14. package/dist/index.js.map +1 -1
  15. package/dist/{file/src/migrations/index.d.ts → migrations/migrate-01.d.ts} +1 -1
  16. package/dist/migrations/migrate-01.d.ts.map +1 -0
  17. package/dist/migrations/{1726795702341-migrate.js → migrate-01.js} +36 -36
  18. package/dist/migrations/migrate-01.js.map +1 -0
  19. package/dist/{setting/src/migrations/index.d.ts → migrations/migrate-02.d.ts} +1 -1
  20. package/dist/migrations/migrate-02.d.ts.map +1 -0
  21. package/dist/migrations/{1726795734665-migrate.js → migrate-02.js} +15 -15
  22. package/dist/migrations/migrate-02.js.map +1 -0
  23. package/dist/migrations/{1726795828359-migrate.d.ts → migrate-03.d.ts} +3 -2
  24. package/dist/migrations/migrate-03.d.ts.map +1 -0
  25. package/dist/migrations/migrate-03.js +101 -0
  26. package/dist/migrations/migrate-03.js.map +1 -0
  27. package/dist/migrations/migrate-04.d.ts +6 -0
  28. package/dist/migrations/migrate-04.d.ts.map +1 -0
  29. package/dist/migrations/{1726795828359-migrate.js → migrate-04.js} +4 -4
  30. package/dist/migrations/migrate-04.js.map +1 -0
  31. package/package.json +31 -29
  32. package/src/migrations/migrate-01.ts +107 -0
  33. package/src/migrations/migrate-02.ts +40 -0
  34. package/src/migrations/{1726795818403-migrate.ts → migrate-03.ts} +49 -49
  35. package/src/migrations/{1726795828359-migrate.ts → migrate-04.ts} +1 -1
  36. package/dist/file/src/dto/delete.dto.d.ts +0 -4
  37. package/dist/file/src/dto/delete.dto.d.ts.map +0 -1
  38. package/dist/file/src/dto/delete.dto.js +0 -23
  39. package/dist/file/src/dto/delete.dto.js.map +0 -1
  40. package/dist/file/src/file.module.d.ts +0 -3
  41. package/dist/file/src/file.module.d.ts.map +0 -1
  42. package/dist/file/src/file.module.js +0 -29
  43. package/dist/file/src/file.module.js.map +0 -1
  44. package/dist/file/src/file.service.d.ts +0 -12
  45. package/dist/file/src/file.service.d.ts.map +0 -1
  46. package/dist/file/src/file.service.js +0 -59
  47. package/dist/file/src/file.service.js.map +0 -1
  48. package/dist/file/src/migrations/index.d.ts.map +0 -1
  49. package/dist/file/src/migrations/index.js +0 -137
  50. package/dist/file/src/migrations/index.js.map +0 -1
  51. package/dist/mail/src/enums/mail-configuration-type.enum.d.ts +0 -6
  52. package/dist/mail/src/enums/mail-configuration-type.enum.d.ts.map +0 -1
  53. package/dist/mail/src/enums/mail-configuration-type.enum.js +0 -10
  54. package/dist/mail/src/enums/mail-configuration-type.enum.js.map +0 -1
  55. package/dist/mail/src/interfaces/index.d.ts +0 -3
  56. package/dist/mail/src/interfaces/index.d.ts.map +0 -1
  57. package/dist/mail/src/interfaces/index.js +0 -19
  58. package/dist/mail/src/interfaces/index.js.map +0 -1
  59. package/dist/mail/src/interfaces/mail-module-options.interface.d.ts +0 -32
  60. package/dist/mail/src/interfaces/mail-module-options.interface.d.ts.map +0 -1
  61. package/dist/mail/src/interfaces/mail-module-options.interface.js +0 -3
  62. package/dist/mail/src/interfaces/mail-module-options.interface.js.map +0 -1
  63. package/dist/mail/src/interfaces/mail-type.d.ts +0 -13
  64. package/dist/mail/src/interfaces/mail-type.d.ts.map +0 -1
  65. package/dist/mail/src/interfaces/mail-type.js +0 -3
  66. package/dist/mail/src/interfaces/mail-type.js.map +0 -1
  67. package/dist/mail/src/mail.consts.d.ts +0 -17
  68. package/dist/mail/src/mail.consts.d.ts.map +0 -1
  69. package/dist/mail/src/mail.consts.js +0 -5
  70. package/dist/mail/src/mail.consts.js.map +0 -1
  71. package/dist/mail/src/mail.module.d.ts +0 -8
  72. package/dist/mail/src/mail.module.d.ts.map +0 -1
  73. package/dist/mail/src/mail.module.js +0 -51
  74. package/dist/mail/src/mail.module.js.map +0 -1
  75. package/dist/mail/src/mail.service.d.ts +0 -14
  76. package/dist/mail/src/mail.service.d.ts.map +0 -1
  77. package/dist/mail/src/mail.service.js +0 -281
  78. package/dist/mail/src/mail.service.js.map +0 -1
  79. package/dist/mail/src/mail.service.spec.d.ts +0 -2
  80. package/dist/mail/src/mail.service.spec.d.ts.map +0 -1
  81. package/dist/mail/src/mail.service.spec.js +0 -17
  82. package/dist/mail/src/mail.service.spec.js.map +0 -1
  83. package/dist/migrations/1726795702341-migrate.d.ts +0 -6
  84. package/dist/migrations/1726795702341-migrate.d.ts.map +0 -1
  85. package/dist/migrations/1726795702341-migrate.js.map +0 -1
  86. package/dist/migrations/1726795734665-migrate.d.ts +0 -6
  87. package/dist/migrations/1726795734665-migrate.d.ts.map +0 -1
  88. package/dist/migrations/1726795734665-migrate.js.map +0 -1
  89. package/dist/migrations/1726795818403-migrate.d.ts +0 -7
  90. package/dist/migrations/1726795818403-migrate.d.ts.map +0 -1
  91. package/dist/migrations/1726795818403-migrate.js +0 -101
  92. package/dist/migrations/1726795818403-migrate.js.map +0 -1
  93. package/dist/migrations/1726795828359-migrate.d.ts.map +0 -1
  94. package/dist/migrations/1726795828359-migrate.js.map +0 -1
  95. package/dist/setting/src/dto/create.dto.d.ts +0 -4
  96. package/dist/setting/src/dto/create.dto.d.ts.map +0 -1
  97. package/dist/setting/src/dto/create.dto.js +0 -22
  98. package/dist/setting/src/dto/create.dto.js.map +0 -1
  99. package/dist/setting/src/dto/delete.dto.d.ts +0 -4
  100. package/dist/setting/src/dto/delete.dto.d.ts.map +0 -1
  101. package/dist/setting/src/dto/delete.dto.js +0 -23
  102. package/dist/setting/src/dto/delete.dto.js.map +0 -1
  103. package/dist/setting/src/dto/update.dto.d.ts +0 -4
  104. package/dist/setting/src/dto/update.dto.d.ts.map +0 -1
  105. package/dist/setting/src/dto/update.dto.js +0 -8
  106. package/dist/setting/src/dto/update.dto.js.map +0 -1
  107. package/dist/setting/src/migrations/index.d.ts.map +0 -1
  108. package/dist/setting/src/migrations/index.js +0 -67
  109. package/dist/setting/src/migrations/index.js.map +0 -1
  110. package/dist/setting/src/settings.controller.d.ts +0 -14
  111. package/dist/setting/src/settings.controller.d.ts.map +0 -1
  112. package/dist/setting/src/settings.controller.js +0 -94
  113. package/dist/setting/src/settings.controller.js.map +0 -1
  114. package/dist/setting/src/settings.module.d.ts +0 -3
  115. package/dist/setting/src/settings.module.d.ts.map +0 -1
  116. package/dist/setting/src/settings.module.js +0 -31
  117. package/dist/setting/src/settings.module.js.map +0 -1
  118. package/dist/setting/src/settings.service.d.ts +0 -19
  119. package/dist/setting/src/settings.service.d.ts.map +0 -1
  120. package/dist/setting/src/settings.service.js +0 -70
  121. package/dist/setting/src/settings.service.js.map +0 -1
  122. package/src/mail/src/mail.template.ejs +0 -1
  123. package/src/migrations/1726795702341-migrate.ts +0 -107
  124. package/src/migrations/1726795734665-migrate.ts +0 -40
package/README.md ADDED
@@ -0,0 +1,412 @@
1
+ # <p align="center">hedhog/admin</p>
2
+
3
+ <p align="center">
4
+ <img src="https://avatars.githubusercontent.com/u/177489127?s=200&v=4" alt="Hedhog Avatar" />
5
+ </p>
6
+
7
+ ## Table of Contents
8
+
9
+ - [Overview](#overview)
10
+ - [Hedhog Auth](#hedhog-auth)
11
+ - [Hedhog Menu](#hedhog-menu)
12
+ - [Hedhog Permission](#hedhog-permission)
13
+ - [Hedhog Screen](#hedhog-screen)
14
+ - [Hedhog User](#hedhog-user)
15
+
16
+ # Overview
17
+
18
+ The **Hedhog Admin** module is a collection of core modules essential for managing and administering applications within the HedHog framework. It brings together various modules that provide key functionalities such as authentication, menu configuration, permissions, screen management and user management.
19
+
20
+ Whether you need to secure access to resources, manage user roles, or handle file uploads, the `@hedhog/admin` module provides everything required to manage a modern web application’s backend with minimal setup.
21
+
22
+ ### Included Modules<
23
+
24
+ - **@hedhog/auth**: Provides authentication and authorization mechanisms, ensuring secure access to application resources.
25
+ - **@hedhog/menu**: Allows for the creation and management of dynamic menus within the application interface.
26
+ - **@hedhog/permission**: Facilitates the management of permissions and roles, controlling access to specific features or areas.
27
+ - **@hedhog/screen**: Provides a structure for managing different screens and UI components.
28
+ - **@hedhog/user**: Manages user accounts, including creation, updates, and deletion, along with password encryption and secure access.
29
+
30
+ ### Installation
31
+
32
+ To install the `@hedhog/admin` module, use npm:
33
+
34
+ ```bash
35
+ npm install @hedhog/admin
36
+ ```
37
+
38
+ ### Usage
39
+
40
+ The `@hedhog/admin` module acts as a base for administrative tasks in HedHog applications. Once installed, you can integrate the included modules into your project to quickly set up and manage essential features for your admin interface.
41
+
42
+ ```typescript
43
+ import { AdminModule } from '@hedhog/admin';
44
+
45
+ @Module({
46
+ imports: [AdminModule],
47
+ })
48
+ export class AppModule {}
49
+ ```
50
+
51
+ By importing the AdminModule, you gain access to all the functionality provided by the individual modules, making it easier to manage authentication, permissions, users, and more.
52
+
53
+ ---
54
+
55
+ # Hedhog Auth
56
+
57
+ **HedHog Auth** is a library designed to handle authentication tasks within the HedHog framework. It provides functionalities for user login, token management, multi-factor authentication (MFA), and password reset, ensuring secure and reliable user authentication processes.
58
+
59
+ ### Features
60
+
61
+ - **Token Verification**: Verify authentication tokens for users.
62
+ - **Login**: Authenticate users with email and password, and handle multi-factor authentication if required.
63
+ - **OTP Management**: Manage one-time passwords (OTP) for multi-factor authentication.
64
+ - **Password Reset**: Facilitate password reset requests through email.
65
+
66
+ #### Controller
67
+
68
+ The `AuthController` defines the following endpoints:
69
+
70
+ - `GET /auth/verify`: Verify the authentication status of the user.
71
+ - `POST /auth/login`: Authenticate a user using email and password.
72
+ - `POST /auth/otp`: Verify an OTP code for multi-factor authentication.
73
+ - `POST /auth/forget`: Request a password reset link via email.
74
+
75
+ #### AuthService
76
+
77
+ The `AuthService` provides methods for:
78
+
79
+ - `verifyToken(token: string)`: Verify the provided JWT token.
80
+ - `generateRandomString(length: number)`: Generate a random string of specified length.
81
+ - `generateRandomNumber()`: Generate a random 6-digit number.
82
+ - `loginWithEmailAndPassword(email: string, password: string)`: Authenticate users with email and password and handle multi-factor authentication if required.
83
+ - `getToken(user)`: Generate a JWT token for the authenticated user.
84
+ - `forget({ email }: ForgetDTO)`: Initiate a password reset process for the specified email.
85
+ - `otp({ token, code }: OtpDTO)`: Verify the OTP code provided by the user.
86
+
87
+ ### Folder Structure
88
+
89
+ ```plaintext
90
+ auth/
91
+ ├── dist/ # Compiled JavaScript files from build
92
+ ├── node_modules/ # Discardable folder with all module dependencies
93
+ ├── src/
94
+ │ ├── auth.controller.ts # Defines routes for authentication
95
+ │ ├── auth.service.ts # Contains authentication logic
96
+ │ ├── auth.module.ts # Authentication module
97
+ │ ├── index.ts # Entry point for auth files
98
+ │ ├── dto/
99
+ │ │ ├── forget.dto.ts # Data Transfer Object for password reset
100
+ │ │ ├── login.dto.ts # Data Transfer Object for login
101
+ │ │ └── otp.dto.ts # Data Transfer Object for OTP verification
102
+ │ ├── decorators/
103
+ │ │ ├── public.decorator.ts # Custom decorator to mark public routes
104
+ │ │ └── user.decorator.ts # Custom decorator to get user from request
105
+ │ ├── types/
106
+ │ │ └── user.type.ts # Type definitions for user-related data
107
+ │ ├── enums/
108
+ │ │ └── multifactor-type.enum.ts # Enumeration for multi-factor authentication types
109
+ │ ├── guards/
110
+ │ │ └── auth.guard.ts # Guard for protecting routes
111
+ │ ├── migrations/
112
+ │ │ └── index.ts # Migration scripts
113
+ ├── .gitignore # Specifies which files Git should ignore
114
+ ├── package.json # Manages dependencies and scripts for the library
115
+ ├── package-lock.json # Lock file for package dependencies
116
+ ├── README.md # Documentation for the library
117
+ ├── tsconfig.lib.json # TypeScript configuration for the library
118
+ └── tsconfig.production.json # TypeScript configuration for production builds
119
+ ```
120
+
121
+ ---
122
+
123
+ # Hedhog Menu
124
+
125
+ **HedHog Menu** is a library for managing menus within the HedHog framework. It provides a set of RESTful endpoints for CRUD operations on menu items, as well as functionalities to handle pagination and ordering of menus.
126
+
127
+ ### Features
128
+
129
+ - **CRUD Operations**: Create, Read, Update, and Delete menu items.
130
+ - **Pagination**: Paginate menu items for efficient data retrieval.
131
+ - **Ordering**: Update the order of menu items.
132
+
133
+ ### MenuController
134
+
135
+ The `MenuController` exposes the following endpoints:
136
+
137
+ - **GET /menus**: Retrieve a list of menus with pagination.
138
+ - **GET /menus/:menuId**: Retrieve a specific menu by ID.
139
+ - **POST /menus**: Create a new menu item.
140
+ - **PATCH /menus/:menuId**: Update an existing menu item by ID.
141
+ - **DELETE /menus**: Delete menu items based on provided IDs.
142
+ - **PATCH /menus/order**: Update the order of menu items.
143
+
144
+ ### MenuService
145
+
146
+ The `MenuService` class contains the business logic for handling menu operations, including querying the database and processing data.
147
+
148
+ - **getMenu(paginationParams: PaginationDTO)**: Retrieves a paginated list of menu items.
149
+ - **get(menuId: number)**: Retrieves a menu item by ID.
150
+ - **create(data: CreateDTO)**: Creates a new menu item.
151
+ - **update({ id, data }: { id: number; data: UpdateDTO })**: Updates an existing menu item by ID.
152
+ - **delete(data: DeleteDTO)**: Deletes menu items based on provided IDs.
153
+ - **updateOrder(data: OrderDTO)**: Updates the order of menu items.
154
+
155
+ ### Folder Structure
156
+
157
+ ```plaintext
158
+ menu/
159
+ ├── dist/ # Compiled JavaScript files from build
160
+ ├── node_modules/ # Discardable folder with all module dependencies
161
+ ├── src/
162
+ │ ├── menu.controller.ts # Handles HTTP requests related to menus
163
+ │ ├── menu.service.ts # Contains business logic for menu operations
164
+ │ ├── menu.module.ts # Module definition for menu functionalities
165
+ │ ├── index.ts # Entry point for menu files
166
+ │ ├── dto/
167
+ │ │ ├── create.dto.ts # Data Transfer Object for creating a menu
168
+ │ │ ├── delete.dto.ts # Data Transfer Object for deleting menus
169
+ │ │ ├── update.dto.ts # Data Transfer Object for updating a menu
170
+ │ │ └── order.dto.ts # Data Transfer Object for updating menu order
171
+ │ ├── migrations/
172
+ │ └── index.ts # Migration scripts
173
+ ├── .gitignore # Specifies which files Git should ignore
174
+ ├── package.json # Manages dependencies and scripts for the library
175
+ ├── package-lock.json # Lock file for dependencies
176
+ ├── README.md # Documentation for the library
177
+ └── tsconfig.lib.json # TypeScript configuration for the library
178
+ └── tsconfig.production.json # TypeScript configuration for production builds
179
+ ```
180
+
181
+ ---
182
+
183
+ # Hedhog Screen
184
+
185
+ **Hedhog Screen** module is part of the HedHog framework and provides functionalities for managing screens in your application. It offers a set of RESTful API endpoints and service methods to handle CRUD operations and pagination for screens.
186
+
187
+ ### Features
188
+
189
+ - Create, Read, Update, and Delete (**CRUD**) operations for screens.
190
+ - **Pagination** for listing screens.
191
+ - **Search** functionality to filter screens based on various attributes.
192
+
193
+ ### Controller Endpoints
194
+
195
+ #### `GET /screens`
196
+
197
+ - **Description**: Retrieve a paginated list of screens.
198
+ - **Authentication**: Required (uses `AuthGuard`).
199
+ - **Pagination**: Supports pagination through query parameters.
200
+
201
+ #### `GET /screens/:screenId`
202
+
203
+ - **Description**: Retrieve a specific screen by its ID.
204
+ - **Authentication**: Required (uses `AuthGuard`).
205
+ - **Parameters**:
206
+ - `screenId` (number): The ID of the screen to retrieve.
207
+
208
+ #### `POST /screens`
209
+
210
+ - **Description**: Create a new screen.
211
+ - **Authentication**: Required (uses `AuthGuard`).
212
+ - **Body**:
213
+ - `name` (string): Name of the screen.
214
+ - `slug` (string): Unique identifier for the screen.
215
+ - `description` (string): Description of the screen.
216
+ - `icon` (string): Icon associated with the screen.
217
+
218
+ #### `PATCH /screens/:screenId`
219
+
220
+ - **Description**: Update an existing screen.
221
+ - **Authentication**: Required (uses `AuthGuard`).
222
+ - **Parameters**:
223
+ - `screenId` (number): The ID of the screen to update.
224
+ - **Body**:
225
+ - `name` (string, optional): Updated name of the screen.
226
+ - `slug` (string, optional): Updated slug of the screen.
227
+ - `description` (string, optional): Updated description of the screen.
228
+ - `icon` (string, optional): Updated icon of the screen.
229
+
230
+ #### `DELETE /screens`
231
+
232
+ - **Description**: Delete one or more screens.
233
+ - **Authentication**: Required (uses `AuthGuard`).
234
+ - **Body**:
235
+ - `ids` (number[]): Array of screen IDs to delete.
236
+
237
+ ### Service Methods
238
+
239
+ #### `getScreens(paginationParams: PaginationDTO)`
240
+
241
+ - **Description**: Retrieves a paginated list of screens with optional search functionality.
242
+ - **Parameters**:
243
+ - `paginationParams`: Includes pagination and search criteria.
244
+
245
+ #### `get(screenId: number)`
246
+
247
+ - **Description**: Retrieves a specific screen by its ID.
248
+ - **Parameters**:
249
+ - `screenId`: ID of the screen to retrieve.
250
+
251
+ #### `create(data: CreateDTO)`
252
+
253
+ - **Description**: Creates a new screen.
254
+ - **Parameters**:
255
+ - `data`: Includes `name`, `slug`, `description`, and `icon`.
256
+
257
+ #### `update(id: number, data: UpdateDTO)`
258
+
259
+ - **Description**: Updates an existing screen.
260
+ - **Parameters**:
261
+ - `id`: ID of the screen to update.
262
+ - `data`: Includes updated `name`, `slug`, `description`, and `icon`.
263
+
264
+ #### `delete(data: DeleteDTO)`
265
+
266
+ - **Description**: Deletes one or more screens.
267
+ - **Parameters**:
268
+ - `data`: Includes array of `ids` to delete.
269
+
270
+ ### Folder Structure
271
+
272
+ ```plaintext
273
+ screen/
274
+ ├── dist/ # Compiled JavaScript files from build
275
+ ├── node_modules/ # Discardable folder with all module dependencies
276
+ ├── src/
277
+ │ ├── dto/ # Data Transfer Objects
278
+ │ │ ├── create.dto.ts # DTO for creating a screen
279
+ │ │ ├── update.dto.ts # DTO for updating a screen
280
+ │ │ └── delete.dto.ts # DTO for deleting a screen
281
+ │ ├── migrations/ # Database migration files
282
+ │ │ └── <migration-files> # Migration scripts
283
+ │ ├── index.ts # Entry point for the screen module
284
+ │ ├── screen.controller.ts # Handles HTTP requests related to screens
285
+ │ ├── screen.module.ts # Module definition for the screen
286
+ │ └── screen.service.ts # Service class for screen-related logic
287
+ ├── .gitignore # Specifies which files Git should ignore
288
+ ├── package.json # Manages dependencies and scripts for the module
289
+ ├── package-lock.json # Lock file for dependencies
290
+ ├── README.md # Documentation for the library
291
+ ├── tsconfig.lib.json # TypeScript configuration for library builds
292
+ ├── tsconfig.production.json # TypeScript configuration for production builds
293
+ ```
294
+
295
+ ---
296
+
297
+ # Hedhog User
298
+
299
+ The **Hedhog User** module in HedHog provides functionality to manage user data within an application. This module leverages the HedHog framework components, including pagination and [**Prisma**](https://www.prisma.io/) integration, to offer a robust user management system.
300
+
301
+ ### Integrations
302
+
303
+ - **Pagination**: Utilizes `@hedhog/pagination` for managing paginated results of user queries.
304
+ - **Database Interaction**: Uses `@hedhog/prisma` to interface with the database for user data management.
305
+ - **Authentication**: Secured with Auth Module from `@hedhog/admin` to ensure that only authorized users can access or modify user data.
306
+
307
+ ### Controller Endpoints
308
+
309
+ #### `GET /users`
310
+
311
+ - **Description**: Retrieve a paginated list of users.
312
+ - **Authentication**: Required (uses `AuthGuard`).
313
+ - **Pagination**: Supports pagination through query parameters.
314
+
315
+ #### `GET /users/:userId`
316
+
317
+ - **Description**: Retrieve a specific user by its ID.
318
+ - **Authentication**: Required (uses `AuthGuard`).
319
+ - **Parameters**:
320
+ - **userId** (number): The ID of the user to retrieve.
321
+
322
+ #### `POST /users`
323
+
324
+ - **Description**: Create a new user.
325
+ - **Authentication**: Required (uses `AuthGuard`).
326
+ - **Body**:
327
+ - **email** (string): Email address of the user.
328
+ - **name** (string): Name of the user.
329
+ - **password** (string): Password of the user.
330
+
331
+ #### `PATCH /users/:userId`
332
+
333
+ - **Description**: Update an existing user.
334
+ - **Authentication**: Required (uses `AuthGuard`).
335
+ - **Parameters**:
336
+ - **userId** (number): The ID of the user to update.
337
+ - **Body**:
338
+ - **email** (string, optional): Updated email address of the user.
339
+ - **name** (string, optional): Updated name of the user.
340
+ - **password** (string, optional): Updated password of the user.
341
+
342
+ #### `DELETE /users`
343
+
344
+ - **Description**: Delete one or more users.
345
+ - **Authentication**: Required (uses `AuthGuard`).
346
+ - **Body**:
347
+ - **ids** (number[]): Array of user IDs to delete.
348
+
349
+ ### Service Methods
350
+
351
+ **getUsers(paginationParams: PaginationDTO)**
352
+
353
+ - **Description**: Retrieves a paginated list of users with optional search functionality.
354
+ - **Parameters**:
355
+ - **paginationParams**: Includes pagination and search criteria.
356
+
357
+ **get(userId: number)**
358
+
359
+ - **Description**: Retrieves a specific user by its ID.
360
+ - **Parameters**:
361
+ - **userId**: ID of the user to retrieve.
362
+
363
+ **hashPassword(password: string): Promise<string>**
364
+
365
+ - **Description**: Hashes a password using bcrypt.
366
+ - **Parameters**:
367
+ - **password**: The password to be hashed.
368
+
369
+ **create(data: CreateDTO)**
370
+
371
+ - **Description**: Creates a new user.
372
+ - **Parameters**:
373
+ - **data**: Includes email, name, and password.
374
+
375
+ **update(id: number, data: UpdateDTO)**
376
+
377
+ - **Description**: Updates an existing user.
378
+ - **Parameters**:
379
+ - **id**: ID of the user to update.
380
+ - **data**: Includes updated email, name, and password.
381
+
382
+ **delete(data: DeleteDTO)**
383
+
384
+ - **Description**: Deletes one or more users.
385
+ - **Parameters**:
386
+ - **data**: Includes array of user IDs to delete.
387
+
388
+ ### Folder Structure
389
+
390
+ ```plaintext
391
+ user/
392
+ ├── dist/ # Compiled JavaScript files from build
393
+ ├── node_modules/ # Discardable folder with all module dependencies
394
+ ├── src/
395
+ │ ├── constants/
396
+ │ │ └── user.constants.ts # Constants related to user module
397
+ │ ├── dto/
398
+ │ │ ├── create.dto.ts # Data Transfer Object for creating a user
399
+ │ │ ├── delete.dto.ts # Data Transfer Object for deleting a user
400
+ │ │ └── update.dto.ts # Data Transfer Object for updating a user
401
+ │ ├── migrations/ # Migration files for database schema changes
402
+ | ├── user.module.ts # Module for UserService
403
+ │ ├── user.service.spec.ts # Unit tests for UserService
404
+ │ ├── user.controller.ts # Controller for user-related endpoints
405
+ │ └── user.service.ts # Service handling business logic for users
406
+ ├── .gitignore # Specifies which files Git should ignore
407
+ ├── package.json # Manages dependencies and scripts for the module
408
+ ├── package-lock.json # Lock file for dependencies
409
+ ├── README.md # Documentation for the library
410
+ ├── tsconfig.lib.json # TypeScript configuration for library builds
411
+ ├── tsconfig.production.json # TypeScript configuration for production builds
412
+ ```
@@ -1 +1 @@
1
- {"version":3,"file":"admin.module.d.ts","sourceRoot":"","sources":["../src/admin.module.ts"],"names":[],"mappings":"AAcA,qBAca,WAAW;CAAG"}
1
+ {"version":3,"file":"admin.module.d.ts","sourceRoot":"","sources":["../src/admin.module.ts"],"names":[],"mappings":"AAWA,qBAWa,WAAW;CAAG"}
@@ -18,14 +18,11 @@ exports.AdminModule = AdminModule = __decorate([
18
18
  (0, common_1.Module)({
19
19
  imports: [
20
20
  (0, common_1.forwardRef)(() => _1.AuthModule),
21
- (0, common_1.forwardRef)(() => _1.FileModule),
22
- (0, common_1.forwardRef)(() => _1.MailModule),
23
21
  (0, common_1.forwardRef)(() => _1.MenuModule),
24
22
  (0, common_1.forwardRef)(() => pagination_1.PaginationModule),
25
23
  (0, common_1.forwardRef)(() => _1.PermissionModule),
26
24
  (0, common_1.forwardRef)(() => prisma_1.PrismaModule),
27
25
  (0, common_1.forwardRef)(() => _1.ScreenModule),
28
- (0, common_1.forwardRef)(() => _1.SettingModule),
29
26
  (0, common_1.forwardRef)(() => _1.UserModule),
30
27
  ],
31
28
  })
@@ -1 +1 @@
1
- {"version":3,"file":"admin.module.js","sourceRoot":"","sources":["../src/admin.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA8C;AAC9C,mDAAsD;AACtD,yBASY;AACZ,2CAAoD;AAgB7C,IAAM,WAAW,GAAjB,MAAM,WAAW;CAAG,CAAA;AAAd,kCAAW;sBAAX,WAAW;IAdvB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,aAAU,CAAC;YAC5B,IAAA,mBA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 +14,7 @@ const prisma_1 = require("@hedhog/prisma");
14
14
  const jwt_1 = require("@nestjs/jwt");
15
15
  const core_1 = require("@nestjs/core");
16
16
  const auth_guard_1 = require("./guards/auth.guard");
17
- const __1 = require("../../");
17
+ const mail_1 = require("@hedhog/mail");
18
18
  let AuthModule = class AuthModule {
19
19
  };
20
20
  exports.AuthModule = AuthModule;
@@ -34,7 +34,7 @@ exports.AuthModule = AuthModule = __decorate([
34
34
  },
35
35
  })),
36
36
  (0, common_1.forwardRef)(() => prisma_1.PrismaModule),
37
- (0, common_1.forwardRef)(() => __1.MailModule),
37
+ (0, common_1.forwardRef)(() => mail_1.MailModule),
38
38
  ],
39
39
  controllers: [auth_controller_1.AuthController],
40
40
  providers: [
@@ -1 +1 @@
1
- {"version":3,"file":"auth.module.js","sourceRoot":"","sources":["../../../src/auth/src/auth.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAoD;AACpD,iDAA6C;AAC7C,uDAAmD;AACnD,2CAA8C;AAC9C,qCAAwC;AACxC,uCAAyC;AACzC,oDAAgD;AAChD,8BAAoC;AA+B7B,IAAM,UAAU,GAAhB,MAAM,UAAU;CAAG,CAAA;AAAb,gCAAU;qBAAV,UAAU;IA7BtB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,IAAA,mBAAU,EAAC,GAAG,EAAE,CACd,eAAS,CAAC,aAAa,CAAC;gBACtB,MAAM,EAAE,IAAI;gBACZ,UAAU,EAAE,GAAG,EAAE;oBACf,OAAO;wBACL,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;wBACtC,MAAM,EAAE,IAAI;wBACZ,WAAW,EAAE;4BACX,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,KAAK;yBAC/C;qBACF,CAAC;gBACJ,CAAC;aACF,CAAC,CACH;YACD,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,qBAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,cAAU,CAAC;SAC7B;QACD,WAAW,EAAE,CAAC,gCAAc,CAAC;QAC7B,SAAS,EAAE;YACT,0BAAW;YACX;gBACE,OAAO,EAAE,gBAAS;gBAClB,QAAQ,EAAE,sBAAS;aACpB;SACF;QACD,OAAO,EAAE,CAAC,0BAAW,CAAC;KACvB,CAAC;GACW,UAAU,CAAG"}
1
+ {"version":3,"file":"auth.module.js","sourceRoot":"","sources":["../../../src/auth/src/auth.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAoD;AACpD,iDAA6C;AAC7C,uDAAmD;AACnD,2CAA8C;AAC9C,qCAAwC;AACxC,uCAAyC;AACzC,oDAAgD;AAChD,uCAA0C;AA+BnC,IAAM,UAAU,GAAhB,MAAM,UAAU;CAAG,CAAA;AAAb,gCAAU;qBAAV,UAAU;IA7BtB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,IAAA,mBAAU,EAAC,GAAG,EAAE,CACd,eAAS,CAAC,aAAa,CAAC;gBACtB,MAAM,EAAE,IAAI;gBACZ,UAAU,EAAE,GAAG,EAAE;oBACf,OAAO;wBACL,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;wBACtC,MAAM,EAAE,IAAI;wBACZ,WAAW,EAAE;4BACX,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,KAAK;yBAC/C;qBACF,CAAC;gBACJ,CAAC;aACF,CAAC,CACH;YACD,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,qBAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,iBAAU,CAAC;SAC7B;QACD,WAAW,EAAE,CAAC,gCAAc,CAAC;QAC7B,SAAS,EAAE;YACT,0BAAW;YACX;gBACE,OAAO,EAAE,gBAAS;gBAClB,QAAQ,EAAE,sBAAS;aACpB;SACF;QACD,OAAO,EAAE,CAAC,0BAAW,CAAC;KACvB,CAAC;GACW,UAAU,CAAG"}
@@ -3,7 +3,7 @@ import { JwtService } from '@nestjs/jwt';
3
3
  import { ForgetDTO } from './dto/forget.dto';
4
4
  import { LoginDTO } from './dto/login.dto';
5
5
  import { OtpDTO } from './dto/otp.dto';
6
- import { MailService } from '../../';
6
+ import { MailService } from '@hedhog/mail';
7
7
  export declare class AuthService {
8
8
  private readonly prisma;
9
9
  private readonly jwt;
@@ -1 +1 @@
1
- {"version":3,"file":"auth.service.d.ts","sourceRoot":"","sources":["../../../src/auth/src/auth.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAO/C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAErC,qBACa,WAAW;IAGpB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAEvB,OAAO,CAAC,QAAQ,CAAC,GAAG;IAEpB,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAJJ,MAAM,EAAE,aAAa,EAErB,GAAG,EAAE,UAAU,EAEf,IAAI,EAAE,WAAW;IAG9B,WAAW,CAAC,KAAK,EAAE,MAAM;IAM/B,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAW5C,oBAAoB,IAAI,MAAM;IAMxB,yBAAyB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;;;;;;IAgDzD,QAAQ,CAAC,IAAI,KAAA;;;IAUb,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,SAAS;IAkC3B,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,MAAM;;;IA0BjC,KAAK,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,QAAQ;;;;;;IAInC,MAAM,CAAC,EAAE,EAAE,MAAM;CAGlB"}
1
+ {"version":3,"file":"auth.service.d.ts","sourceRoot":"","sources":["../../../src/auth/src/auth.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAO/C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,qBACa,WAAW;IAGpB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAEvB,OAAO,CAAC,QAAQ,CAAC,GAAG;IAEpB,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAJJ,MAAM,EAAE,aAAa,EAErB,GAAG,EAAE,UAAU,EAEf,IAAI,EAAE,WAAW;IAG9B,WAAW,CAAC,KAAK,EAAE,MAAM;IAM/B,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAW5C,oBAAoB,IAAI,MAAM;IAMxB,yBAAyB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;;;;;;IAgDzD,QAAQ,CAAC,IAAI,KAAA;;;IAUb,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,SAAS;IAkC3B,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,MAAM;;;IA0BjC,KAAK,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,QAAQ;;;;;;IAInC,MAAM,CAAC,EAAE,EAAE,MAAM;CAGlB"}
@@ -18,7 +18,7 @@ const common_1 = require("@nestjs/common");
18
18
  const jwt_1 = require("@nestjs/jwt");
19
19
  const bcrypt_1 = require("bcrypt");
20
20
  const multifactor_type_enum_1 = require("./enums/multifactor-type.enum");
21
- const __1 = require("../../");
21
+ const mail_1 = require("@hedhog/mail");
22
22
  let AuthService = class AuthService {
23
23
  constructor(prisma, jwt, mail) {
24
24
  this.prisma = prisma;
@@ -154,9 +154,9 @@ exports.AuthService = AuthService = __decorate([
154
154
  (0, common_1.Injectable)(),
155
155
  __param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => prisma_1.PrismaService))),
156
156
  __param(1, (0, common_1.Inject)((0, common_1.forwardRef)(() => jwt_1.JwtService))),
157
- __param(2, (0, common_1.Inject)((0, common_1.forwardRef)(() => __1.MailService))),
157
+ __param(2, (0, common_1.Inject)((0, common_1.forwardRef)(() => mail_1.MailService))),
158
158
  __metadata("design:paramtypes", [prisma_1.PrismaService,
159
159
  jwt_1.JwtService,
160
- __1.MailService])
160
+ mail_1.MailService])
161
161
  ], AuthService);
162
162
  //# sourceMappingURL=auth.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth.service.js","sourceRoot":"","sources":["../../../src/auth/src/auth.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA+C;AAC/C,2CAKwB;AACxB,qCAAyC;AACzC,mCAAiC;AAIjC,yEAAgE;AAChE,8BAAqC;AAG9B,IAAM,WAAW,GAAjB,MAAM,WAAW;IACtB,YAEmB,MAAqB,EAErB,GAAe,EAEf,IAAiB;QAJjB,WAAM,GAAN,MAAM,CAAe;QAErB,QAAG,GAAH,GAAG,CAAY;QAEf,SAAI,GAAJ,IAAI,CAAa;IACjC,CAAC;IAEJ,KAAK,CAAC,WAAW,CAAC,KAAa;QAC7B,OAAO,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,EAAE;YACjC,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;SACvC,CAAC,CAAC;IACL,CAAC;IAED,oBAAoB,CAAC,MAAc;QACjC,MAAM,UAAU,GACd,gEAAgE,CAAC;QACnE,IAAI,MAAM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AAK,EAAE,QAAQ,CAAC,CAAC;IACzD,CAAC;IAED,MAAM,CAAC,EAAU;QACf,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACzD,CAAC;CACF,CAAA;AA9JY,kCAAW;sBAAX,WAAW;IADvB,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,gBAAU,CAAC,CAAC,CAAA;IAEpC,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,kBAAW,CAAC,CAAC,CAAA;qCAHb,sBAAa;QAEhB,gBAAU;QAET,kBAAW;GAPzB,WAAW,CA8JvB"}
package/dist/index.d.ts CHANGED
@@ -4,12 +4,6 @@ export * from './auth/src/auth.service';
4
4
  export * from './auth/src/decorators/public.decorator';
5
5
  export * from './auth/src/decorators/user.decorator';
6
6
  export * from './auth/src/guards/auth.guard';
7
- export * from './file/src/file.module';
8
- export * from './file/src/file.service';
9
- export * from './mail/src/enums/mail-configuration-type.enum';
10
- export * from './mail/src/interfaces';
11
- export * from './mail/src/mail.module';
12
- export * from './mail/src/mail.service';
13
7
  export * from './menu/src/menu.module';
14
8
  export * from './menu/src/menu.service';
15
9
  export * from './permission/src/permission.module';
@@ -18,8 +12,6 @@ export * from './permission/src/types/permission.types';
18
12
  export * from './permission/src/decorators/permission.decorator';
19
13
  export * from './screen/src/screen.module';
20
14
  export * from './screen/src/screen.service';
21
- export * from './setting/src/settings.module';
22
- export * from './setting/src/settings.service';
23
15
  export * from './user/src/constants/user.constants';
24
16
  export * from './user/src/user.module';
25
17
  export * from './user/src/user.service';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAG/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC;AAG7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AAGxC,cAAc,+CAA+C,CAAC;AAC9D,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AAGxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AAGxC,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,kDAAkD,CAAC;AAGjE,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAG5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAG/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAG/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC;AAG7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AAGxC,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,kDAAkD,CAAC;AAGjE,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAG5C,cAAc,qCAAqC,CAAC;AACpD,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC"}
package/dist/index.js CHANGED
@@ -22,14 +22,6 @@ __exportStar(require("./auth/src/auth.service"), exports);
22
22
  __exportStar(require("./auth/src/decorators/public.decorator"), exports);
23
23
  __exportStar(require("./auth/src/decorators/user.decorator"), exports);
24
24
  __exportStar(require("./auth/src/guards/auth.guard"), exports);
25
- // File Module
26
- __exportStar(require("./file/src/file.module"), exports);
27
- __exportStar(require("./file/src/file.service"), exports);
28
- // Mail Module
29
- __exportStar(require("./mail/src/enums/mail-configuration-type.enum"), exports);
30
- __exportStar(require("./mail/src/interfaces"), exports);
31
- __exportStar(require("./mail/src/mail.module"), exports);
32
- __exportStar(require("./mail/src/mail.service"), exports);
33
25
  // Menu Module
34
26
  __exportStar(require("./menu/src/menu.module"), exports);
35
27
  __exportStar(require("./menu/src/menu.service"), exports);
@@ -41,9 +33,6 @@ __exportStar(require("./permission/src/decorators/permission.decorator"), export
41
33
  // Screen Module
42
34
  __exportStar(require("./screen/src/screen.module"), exports);
43
35
  __exportStar(require("./screen/src/screen.service"), exports);
44
- // Setting Module
45
- __exportStar(require("./setting/src/settings.module"), exports);
46
- __exportStar(require("./setting/src/settings.service"), exports);
47
36
  // User Module
48
37
  __exportStar(require("./user/src/constants/user.constants"), exports);
49
38
  __exportStar(require("./user/src/user.module"), exports);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,eAAe;AACf,iDAA+B;AAE/B,cAAc;AACd,yDAAuC;AACvC,0DAAwC;AACxC,yEAAuD;AACvD,uEAAqD;AACrD,+DAA6C;AAE7C,cAAc;AACd,yDAAuC;AACvC,0DAAwC;AAExC,cAAc;AACd,gFAA8D;AAC9D,wDAAsC;AACtC,yDAAuC;AACvC,0DAAwC;AAExC,cAAc;AACd,yDAAuC;AACvC,0DAAwC;AAExC,oBAAoB;AACpB,qEAAmD;AACnD,sEAAoD;AACpD,0EAAwD;AACxD,mFAAiE;AAEjE,gBAAgB;AAChB,6DAA2C;AAC3C,8DAA4C;AAE5C,iBAAiB;AACjB,gEAA8C;AAC9C,iEAA+C;AAE/C,cAAc;AACd,sEAAoD;AACpD,yDAAuC;AACvC,0DAAwC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,eAAe;AACf,iDAA+B;AAE/B,cAAc;AACd,yDAAuC;AACvC,0DAAwC;AACxC,yEAAuD;AACvD,uEAAqD;AACrD,+DAA6C;AAE7C,cAAc;AACd,yDAAuC;AACvC,0DAAwC;AAExC,oBAAoB;AACpB,qEAAmD;AACnD,sEAAoD;AACpD,0EAAwD;AACxD,mFAAiE;AAEjE,gBAAgB;AAChB,6DAA2C;AAC3C,8DAA4C;AAE5C,cAAc;AACd,sEAAoD;AACpD,yDAAuC;AACvC,0DAAwC"}
@@ -3,4 +3,4 @@ export declare class Migrate implements MigrationInterface {
3
3
  up(queryRunner: QueryRunner): Promise<void>;
4
4
  down(queryRunner: QueryRunner): Promise<void>;
5
5
  }
6
- //# sourceMappingURL=index.d.ts.map
6
+ //# sourceMappingURL=migrate-01.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrate-01.d.ts","sourceRoot":"","sources":["../../src/migrations/migrate-01.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,WAAW,EAGZ,MAAM,SAAS,CAAC;AAIjB,qBAAa,OAAQ,YAAW,kBAAkB;IAC1C,EAAE,CAAC,WAAW,EAAE,WAAW;IA4F3B,IAAI,CAAC,WAAW,EAAE,WAAW;CAIpC"}