@hedhog/admin 0.0.2 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (292) hide show
  1. package/README.md +3 -0
  2. package/dist/index.js +12 -16
  3. package/package.json +32 -29
  4. package/src/migrations/migrate-01.ts +107 -0
  5. package/src/migrations/migrate-02.ts +40 -0
  6. package/src/migrations/{1726795818403-migrate.ts → migrate-03.ts} +49 -49
  7. package/src/migrations/{1726795828359-migrate.ts → migrate-04.ts} +1 -1
  8. package/dist/admin.module.d.ts +0 -3
  9. package/dist/admin.module.d.ts.map +0 -1
  10. package/dist/admin.module.js +0 -30
  11. package/dist/admin.module.js.map +0 -1
  12. package/dist/auth/src/auth.controller.d.ts +0 -21
  13. package/dist/auth/src/auth.controller.d.ts.map +0 -1
  14. package/dist/auth/src/auth.controller.js +0 -77
  15. package/dist/auth/src/auth.controller.js.map +0 -1
  16. package/dist/auth/src/auth.module.d.ts +0 -3
  17. package/dist/auth/src/auth.module.d.ts.map +0 -1
  18. package/dist/auth/src/auth.module.js +0 -50
  19. package/dist/auth/src/auth.module.js.map +0 -1
  20. package/dist/auth/src/auth.service.d.ts +0 -36
  21. package/dist/auth/src/auth.service.d.ts.map +0 -1
  22. package/dist/auth/src/auth.service.js +0 -162
  23. package/dist/auth/src/auth.service.js.map +0 -1
  24. package/dist/auth/src/auth.service.spec.d.ts +0 -2
  25. package/dist/auth/src/auth.service.spec.d.ts.map +0 -1
  26. package/dist/auth/src/auth.service.spec.js +0 -17
  27. package/dist/auth/src/auth.service.spec.js.map +0 -1
  28. package/dist/auth/src/decorators/public.decorator.d.ts +0 -3
  29. package/dist/auth/src/decorators/public.decorator.d.ts.map +0 -1
  30. package/dist/auth/src/decorators/public.decorator.js +0 -8
  31. package/dist/auth/src/decorators/public.decorator.js.map +0 -1
  32. package/dist/auth/src/decorators/user.decorator.d.ts +0 -2
  33. package/dist/auth/src/decorators/user.decorator.d.ts.map +0 -1
  34. package/dist/auth/src/decorators/user.decorator.js +0 -12
  35. package/dist/auth/src/decorators/user.decorator.js.map +0 -1
  36. package/dist/auth/src/dto/forget.dto.d.ts +0 -4
  37. package/dist/auth/src/dto/forget.dto.d.ts.map +0 -1
  38. package/dist/auth/src/dto/forget.dto.js +0 -21
  39. package/dist/auth/src/dto/forget.dto.js.map +0 -1
  40. package/dist/auth/src/dto/login.dto.d.ts +0 -5
  41. package/dist/auth/src/dto/login.dto.d.ts.map +0 -1
  42. package/dist/auth/src/dto/login.dto.js +0 -31
  43. package/dist/auth/src/dto/login.dto.js.map +0 -1
  44. package/dist/auth/src/dto/otp.dto.d.ts +0 -5
  45. package/dist/auth/src/dto/otp.dto.d.ts.map +0 -1
  46. package/dist/auth/src/dto/otp.dto.js +0 -27
  47. package/dist/auth/src/dto/otp.dto.js.map +0 -1
  48. package/dist/auth/src/enums/multifactor-type.enum.d.ts +0 -5
  49. package/dist/auth/src/enums/multifactor-type.enum.d.ts.map +0 -1
  50. package/dist/auth/src/enums/multifactor-type.enum.js +0 -9
  51. package/dist/auth/src/enums/multifactor-type.enum.js.map +0 -1
  52. package/dist/auth/src/guards/auth.guard.d.ts +0 -11
  53. package/dist/auth/src/guards/auth.guard.d.ts.map +0 -1
  54. package/dist/auth/src/guards/auth.guard.js +0 -56
  55. package/dist/auth/src/guards/auth.guard.js.map +0 -1
  56. package/dist/auth/src/migrations/index.d.ts +0 -6
  57. package/dist/auth/src/migrations/index.d.ts.map +0 -1
  58. package/dist/auth/src/migrations/index.js +0 -121
  59. package/dist/auth/src/migrations/index.js.map +0 -1
  60. package/dist/auth/src/types/user.type.d.ts +0 -9
  61. package/dist/auth/src/types/user.type.d.ts.map +0 -1
  62. package/dist/auth/src/types/user.type.js +0 -3
  63. package/dist/auth/src/types/user.type.js.map +0 -1
  64. package/dist/file/src/dto/delete.dto.d.ts +0 -4
  65. package/dist/file/src/dto/delete.dto.d.ts.map +0 -1
  66. package/dist/file/src/dto/delete.dto.js +0 -23
  67. package/dist/file/src/dto/delete.dto.js.map +0 -1
  68. package/dist/file/src/file.module.d.ts +0 -3
  69. package/dist/file/src/file.module.d.ts.map +0 -1
  70. package/dist/file/src/file.module.js +0 -29
  71. package/dist/file/src/file.module.js.map +0 -1
  72. package/dist/file/src/file.service.d.ts +0 -12
  73. package/dist/file/src/file.service.d.ts.map +0 -1
  74. package/dist/file/src/file.service.js +0 -59
  75. package/dist/file/src/file.service.js.map +0 -1
  76. package/dist/file/src/migrations/index.d.ts +0 -6
  77. package/dist/file/src/migrations/index.d.ts.map +0 -1
  78. package/dist/file/src/migrations/index.js +0 -137
  79. package/dist/file/src/migrations/index.js.map +0 -1
  80. package/dist/index.d.ts +0 -18
  81. package/dist/index.d.ts.map +0 -1
  82. package/dist/index.js.map +0 -1
  83. package/dist/mail/src/enums/mail-configuration-type.enum.d.ts +0 -6
  84. package/dist/mail/src/enums/mail-configuration-type.enum.d.ts.map +0 -1
  85. package/dist/mail/src/enums/mail-configuration-type.enum.js +0 -10
  86. package/dist/mail/src/enums/mail-configuration-type.enum.js.map +0 -1
  87. package/dist/mail/src/interfaces/index.d.ts +0 -3
  88. package/dist/mail/src/interfaces/index.d.ts.map +0 -1
  89. package/dist/mail/src/interfaces/index.js +0 -19
  90. package/dist/mail/src/interfaces/index.js.map +0 -1
  91. package/dist/mail/src/interfaces/mail-module-options.interface.d.ts +0 -32
  92. package/dist/mail/src/interfaces/mail-module-options.interface.d.ts.map +0 -1
  93. package/dist/mail/src/interfaces/mail-module-options.interface.js +0 -3
  94. package/dist/mail/src/interfaces/mail-module-options.interface.js.map +0 -1
  95. package/dist/mail/src/interfaces/mail-type.d.ts +0 -13
  96. package/dist/mail/src/interfaces/mail-type.d.ts.map +0 -1
  97. package/dist/mail/src/interfaces/mail-type.js +0 -3
  98. package/dist/mail/src/interfaces/mail-type.js.map +0 -1
  99. package/dist/mail/src/mail.consts.d.ts +0 -17
  100. package/dist/mail/src/mail.consts.d.ts.map +0 -1
  101. package/dist/mail/src/mail.consts.js +0 -5
  102. package/dist/mail/src/mail.consts.js.map +0 -1
  103. package/dist/mail/src/mail.module.d.ts +0 -8
  104. package/dist/mail/src/mail.module.d.ts.map +0 -1
  105. package/dist/mail/src/mail.module.js +0 -51
  106. package/dist/mail/src/mail.module.js.map +0 -1
  107. package/dist/mail/src/mail.service.d.ts +0 -14
  108. package/dist/mail/src/mail.service.d.ts.map +0 -1
  109. package/dist/mail/src/mail.service.js +0 -281
  110. package/dist/mail/src/mail.service.js.map +0 -1
  111. package/dist/mail/src/mail.service.spec.d.ts +0 -2
  112. package/dist/mail/src/mail.service.spec.d.ts.map +0 -1
  113. package/dist/mail/src/mail.service.spec.js +0 -17
  114. package/dist/mail/src/mail.service.spec.js.map +0 -1
  115. package/dist/menu/src/dto/create.dto.d.ts +0 -8
  116. package/dist/menu/src/dto/create.dto.d.ts.map +0 -1
  117. package/dist/menu/src/dto/create.dto.js +0 -44
  118. package/dist/menu/src/dto/create.dto.js.map +0 -1
  119. package/dist/menu/src/dto/delete.dto.d.ts +0 -4
  120. package/dist/menu/src/dto/delete.dto.d.ts.map +0 -1
  121. package/dist/menu/src/dto/delete.dto.js +0 -24
  122. package/dist/menu/src/dto/delete.dto.js.map +0 -1
  123. package/dist/menu/src/dto/order.dto.d.ts +0 -4
  124. package/dist/menu/src/dto/order.dto.d.ts.map +0 -1
  125. package/dist/menu/src/dto/order.dto.js +0 -23
  126. package/dist/menu/src/dto/order.dto.js.map +0 -1
  127. package/dist/menu/src/dto/update.dto.d.ts +0 -7
  128. package/dist/menu/src/dto/update.dto.d.ts.map +0 -1
  129. package/dist/menu/src/dto/update.dto.js +0 -37
  130. package/dist/menu/src/dto/update.dto.js.map +0 -1
  131. package/dist/menu/src/menu.controller.d.ts +0 -19
  132. package/dist/menu/src/menu.controller.d.ts.map +0 -1
  133. package/dist/menu/src/menu.controller.js +0 -117
  134. package/dist/menu/src/menu.controller.js.map +0 -1
  135. package/dist/menu/src/menu.module.d.ts +0 -3
  136. package/dist/menu/src/menu.module.d.ts.map +0 -1
  137. package/dist/menu/src/menu.module.js +0 -31
  138. package/dist/menu/src/menu.module.js.map +0 -1
  139. package/dist/menu/src/menu.service.d.ts +0 -23
  140. package/dist/menu/src/menu.service.d.ts.map +0 -1
  141. package/dist/menu/src/menu.service.js +0 -117
  142. package/dist/menu/src/menu.service.js.map +0 -1
  143. package/dist/menu/src/migrations/index.d.ts +0 -7
  144. package/dist/menu/src/migrations/index.d.ts.map +0 -1
  145. package/dist/menu/src/migrations/index.js +0 -101
  146. package/dist/menu/src/migrations/index.js.map +0 -1
  147. package/dist/migrations/1726795702341-migrate.d.ts +0 -6
  148. package/dist/migrations/1726795702341-migrate.d.ts.map +0 -1
  149. package/dist/migrations/1726795702341-migrate.js +0 -121
  150. package/dist/migrations/1726795702341-migrate.js.map +0 -1
  151. package/dist/migrations/1726795734665-migrate.d.ts +0 -6
  152. package/dist/migrations/1726795734665-migrate.d.ts.map +0 -1
  153. package/dist/migrations/1726795734665-migrate.js +0 -40
  154. package/dist/migrations/1726795734665-migrate.js.map +0 -1
  155. package/dist/migrations/1726795818403-migrate.d.ts +0 -7
  156. package/dist/migrations/1726795818403-migrate.d.ts.map +0 -1
  157. package/dist/migrations/1726795818403-migrate.js +0 -101
  158. package/dist/migrations/1726795818403-migrate.js.map +0 -1
  159. package/dist/migrations/1726795828359-migrate.d.ts +0 -6
  160. package/dist/migrations/1726795828359-migrate.d.ts.map +0 -1
  161. package/dist/migrations/1726795828359-migrate.js +0 -525
  162. package/dist/migrations/1726795828359-migrate.js.map +0 -1
  163. package/dist/permission/src/decorators/permission.decorator.d.ts +0 -3
  164. package/dist/permission/src/decorators/permission.decorator.d.ts.map +0 -1
  165. package/dist/permission/src/decorators/permission.decorator.js +0 -8
  166. package/dist/permission/src/decorators/permission.decorator.js.map +0 -1
  167. package/dist/permission/src/dto/create.dto.d.ts +0 -5
  168. package/dist/permission/src/dto/create.dto.d.ts.map +0 -1
  169. package/dist/permission/src/dto/create.dto.js +0 -27
  170. package/dist/permission/src/dto/create.dto.js.map +0 -1
  171. package/dist/permission/src/dto/delete.dto.d.ts +0 -4
  172. package/dist/permission/src/dto/delete.dto.d.ts.map +0 -1
  173. package/dist/permission/src/dto/delete.dto.js +0 -23
  174. package/dist/permission/src/dto/delete.dto.js.map +0 -1
  175. package/dist/permission/src/dto/update.dto.d.ts +0 -5
  176. package/dist/permission/src/dto/update.dto.d.ts.map +0 -1
  177. package/dist/permission/src/dto/update.dto.js +0 -27
  178. package/dist/permission/src/dto/update.dto.js.map +0 -1
  179. package/dist/permission/src/guards/permission.guard.d.ts +0 -11
  180. package/dist/permission/src/guards/permission.guard.d.ts.map +0 -1
  181. package/dist/permission/src/guards/permission.guard.js +0 -99
  182. package/dist/permission/src/guards/permission.guard.js.map +0 -1
  183. package/dist/permission/src/migrations/index.d.ts +0 -6
  184. package/dist/permission/src/migrations/index.d.ts.map +0 -1
  185. package/dist/permission/src/migrations/index.js +0 -520
  186. package/dist/permission/src/migrations/index.js.map +0 -1
  187. package/dist/permission/src/permission.controller.d.ts +0 -14
  188. package/dist/permission/src/permission.controller.d.ts.map +0 -1
  189. package/dist/permission/src/permission.controller.js +0 -95
  190. package/dist/permission/src/permission.controller.js.map +0 -1
  191. package/dist/permission/src/permission.module.d.ts +0 -3
  192. package/dist/permission/src/permission.module.d.ts.map +0 -1
  193. package/dist/permission/src/permission.module.js +0 -39
  194. package/dist/permission/src/permission.module.js.map +0 -1
  195. package/dist/permission/src/permission.service.d.ts +0 -19
  196. package/dist/permission/src/permission.service.d.ts.map +0 -1
  197. package/dist/permission/src/permission.service.js +0 -73
  198. package/dist/permission/src/permission.service.js.map +0 -1
  199. package/dist/permission/src/types/permission.types.d.ts +0 -33
  200. package/dist/permission/src/types/permission.types.d.ts.map +0 -1
  201. package/dist/permission/src/types/permission.types.js +0 -3
  202. package/dist/permission/src/types/permission.types.js.map +0 -1
  203. package/dist/screen/src/dto/create.dto.d.ts +0 -7
  204. package/dist/screen/src/dto/create.dto.d.ts.map +0 -1
  205. package/dist/screen/src/dto/create.dto.js +0 -37
  206. package/dist/screen/src/dto/create.dto.js.map +0 -1
  207. package/dist/screen/src/dto/delete.dto.d.ts +0 -4
  208. package/dist/screen/src/dto/delete.dto.d.ts.map +0 -1
  209. package/dist/screen/src/dto/delete.dto.js +0 -23
  210. package/dist/screen/src/dto/delete.dto.js.map +0 -1
  211. package/dist/screen/src/dto/update.dto.d.ts +0 -7
  212. package/dist/screen/src/dto/update.dto.d.ts.map +0 -1
  213. package/dist/screen/src/dto/update.dto.js +0 -37
  214. package/dist/screen/src/dto/update.dto.js.map +0 -1
  215. package/dist/screen/src/migrations/index.d.ts +0 -6
  216. package/dist/screen/src/migrations/index.d.ts.map +0 -1
  217. package/dist/screen/src/migrations/index.js +0 -40
  218. package/dist/screen/src/migrations/index.js.map +0 -1
  219. package/dist/screen/src/screen.controller.d.ts +0 -14
  220. package/dist/screen/src/screen.controller.d.ts.map +0 -1
  221. package/dist/screen/src/screen.controller.js +0 -94
  222. package/dist/screen/src/screen.controller.js.map +0 -1
  223. package/dist/screen/src/screen.module.d.ts +0 -3
  224. package/dist/screen/src/screen.module.d.ts.map +0 -1
  225. package/dist/screen/src/screen.module.js +0 -31
  226. package/dist/screen/src/screen.module.js.map +0 -1
  227. package/dist/screen/src/screen.service.d.ts +0 -19
  228. package/dist/screen/src/screen.service.d.ts.map +0 -1
  229. package/dist/screen/src/screen.service.js +0 -73
  230. package/dist/screen/src/screen.service.js.map +0 -1
  231. package/dist/setting/src/dto/create.dto.d.ts +0 -4
  232. package/dist/setting/src/dto/create.dto.d.ts.map +0 -1
  233. package/dist/setting/src/dto/create.dto.js +0 -22
  234. package/dist/setting/src/dto/create.dto.js.map +0 -1
  235. package/dist/setting/src/dto/delete.dto.d.ts +0 -4
  236. package/dist/setting/src/dto/delete.dto.d.ts.map +0 -1
  237. package/dist/setting/src/dto/delete.dto.js +0 -23
  238. package/dist/setting/src/dto/delete.dto.js.map +0 -1
  239. package/dist/setting/src/dto/update.dto.d.ts +0 -4
  240. package/dist/setting/src/dto/update.dto.d.ts.map +0 -1
  241. package/dist/setting/src/dto/update.dto.js +0 -8
  242. package/dist/setting/src/dto/update.dto.js.map +0 -1
  243. package/dist/setting/src/migrations/index.d.ts +0 -6
  244. package/dist/setting/src/migrations/index.d.ts.map +0 -1
  245. package/dist/setting/src/migrations/index.js +0 -67
  246. package/dist/setting/src/migrations/index.js.map +0 -1
  247. package/dist/setting/src/settings.controller.d.ts +0 -14
  248. package/dist/setting/src/settings.controller.d.ts.map +0 -1
  249. package/dist/setting/src/settings.controller.js +0 -94
  250. package/dist/setting/src/settings.controller.js.map +0 -1
  251. package/dist/setting/src/settings.module.d.ts +0 -3
  252. package/dist/setting/src/settings.module.d.ts.map +0 -1
  253. package/dist/setting/src/settings.module.js +0 -31
  254. package/dist/setting/src/settings.module.js.map +0 -1
  255. package/dist/setting/src/settings.service.d.ts +0 -19
  256. package/dist/setting/src/settings.service.d.ts.map +0 -1
  257. package/dist/setting/src/settings.service.js +0 -70
  258. package/dist/setting/src/settings.service.js.map +0 -1
  259. package/dist/user/src/constants/user.constants.d.ts +0 -2
  260. package/dist/user/src/constants/user.constants.d.ts.map +0 -1
  261. package/dist/user/src/constants/user.constants.js +0 -5
  262. package/dist/user/src/constants/user.constants.js.map +0 -1
  263. package/dist/user/src/dto/create.dto.d.ts +0 -6
  264. package/dist/user/src/dto/create.dto.d.ts.map +0 -1
  265. package/dist/user/src/dto/create.dto.js +0 -37
  266. package/dist/user/src/dto/create.dto.js.map +0 -1
  267. package/dist/user/src/dto/delete.dto.d.ts +0 -4
  268. package/dist/user/src/dto/delete.dto.d.ts.map +0 -1
  269. package/dist/user/src/dto/delete.dto.js +0 -23
  270. package/dist/user/src/dto/delete.dto.js.map +0 -1
  271. package/dist/user/src/dto/update.dto.d.ts +0 -8
  272. package/dist/user/src/dto/update.dto.d.ts.map +0 -1
  273. package/dist/user/src/dto/update.dto.js +0 -50
  274. package/dist/user/src/dto/update.dto.js.map +0 -1
  275. package/dist/user/src/user.controller.d.ts +0 -14
  276. package/dist/user/src/user.controller.d.ts.map +0 -1
  277. package/dist/user/src/user.controller.js +0 -94
  278. package/dist/user/src/user.controller.js.map +0 -1
  279. package/dist/user/src/user.module.d.ts +0 -3
  280. package/dist/user/src/user.module.d.ts.map +0 -1
  281. package/dist/user/src/user.module.js +0 -31
  282. package/dist/user/src/user.module.js.map +0 -1
  283. package/dist/user/src/user.service.d.ts +0 -20
  284. package/dist/user/src/user.service.d.ts.map +0 -1
  285. package/dist/user/src/user.service.js +0 -84
  286. package/dist/user/src/user.service.js.map +0 -1
  287. package/dist/user/src/user.service.spec.d.ts +0 -2
  288. package/dist/user/src/user.service.spec.d.ts.map +0 -1
  289. package/dist/user/src/user.service.spec.js +0 -17
  290. package/dist/user/src/user.service.spec.js.map +0 -1
  291. package/src/migrations/1726795702341-migrate.ts +0 -107
  292. package/src/migrations/1726795734665-migrate.ts +0 -40
@@ -1,107 +0,0 @@
1
- import {
2
- MigrationInterface,
3
- QueryRunner,
4
- Table,
5
- TableForeignKey,
6
- } from "typeorm";
7
- import { idColumn, timestampColumn } from "@hedhog/utils";
8
- import * as bcrypt from "bcrypt";
9
-
10
- export class Migrate1726795702341 implements MigrationInterface {
11
- async up(queryRunner: QueryRunner) {
12
- await queryRunner.createTable(
13
- new Table({
14
- name: "multifactors",
15
- columns: [
16
- idColumn(),
17
- {
18
- name: "name",
19
- type: "varchar",
20
- },
21
- timestampColumn(),
22
- timestampColumn("updated_at"),
23
- ],
24
- }),
25
- );
26
-
27
- await queryRunner.manager
28
- .createQueryBuilder()
29
- .insert()
30
- .into("multifactors", ["name"])
31
- .values([
32
- {
33
- name: "Email",
34
- },
35
- {
36
- name: "Applicativo",
37
- },
38
- ])
39
- .execute();
40
-
41
- await queryRunner.createTable(
42
- new Table({
43
- name: "users",
44
- columns: [
45
- idColumn(),
46
- {
47
- name: "name",
48
- type: "varchar",
49
- },
50
- {
51
- name: "email",
52
- type: "varchar",
53
- },
54
- {
55
- name: "password",
56
- type: "varchar",
57
- },
58
- {
59
- name: "multifactor_id",
60
- type: "int",
61
- isNullable: true,
62
- unsigned: true,
63
- },
64
- {
65
- name: "code",
66
- type: "varchar",
67
- isNullable: true,
68
- },
69
- timestampColumn(),
70
- timestampColumn("updated_at"),
71
- ],
72
- }),
73
- );
74
-
75
- await queryRunner.createForeignKeys("users", [
76
- new TableForeignKey({
77
- columnNames: ["multifactor_id"],
78
- referencedColumnNames: ["id"],
79
- referencedTableName: "multifactors",
80
- name: "fk_users_to_multifactors_on_multifactor_id",
81
- onDelete: "Cascade",
82
- }),
83
- ]);
84
-
85
- await queryRunner.manager
86
- .createQueryBuilder()
87
- .insert()
88
- .into("users", ["name", "email", "password"])
89
- .values([
90
- {
91
- name: "Superuser",
92
- email: "root@hedhog.com",
93
- password: await bcrypt.hash(`hedhog`, 12),
94
- },
95
- {
96
- name: "User",
97
- email: "user@hedhog.com",
98
- password: await bcrypt.hash(`hedhog`, 12),
99
- },
100
- ])
101
- .execute();
102
- }
103
- async down(queryRunner: QueryRunner) {
104
- await queryRunner.dropTable("multifactors");
105
- await queryRunner.dropTable("users");
106
- }
107
- }
@@ -1,40 +0,0 @@
1
- import { idColumn, timestampColumn } from "@hedhog/utils";
2
-
3
- import { MigrationInterface, QueryRunner, Table } from "typeorm";
4
-
5
- export class Migrate1726795734665 implements MigrationInterface {
6
- async up(queryRunner: QueryRunner) {
7
- await queryRunner.createTable(
8
- new Table({
9
- name: "screens",
10
- columns: [
11
- idColumn(),
12
- {
13
- name: "name",
14
- type: "varchar",
15
- },
16
- {
17
- name: "slug",
18
- type: "varchar",
19
- isUnique: true,
20
- },
21
- {
22
- name: "description",
23
- type: "varchar",
24
- },
25
- {
26
- name: "icon",
27
- type: "varchar",
28
- isNullable: true,
29
- },
30
- timestampColumn(),
31
- timestampColumn("updated_at"),
32
- ],
33
- }),
34
- );
35
- }
36
-
37
- async down(queryRunner: QueryRunner) {
38
- await queryRunner.dropTable("screens");
39
- }
40
- }