@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,121 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.Migrate = void 0;
27
- const typeorm_1 = require("typeorm");
28
- const utils_1 = require("@hedhog/utils");
29
- const bcrypt = __importStar(require("bcrypt"));
30
- class Migrate {
31
- async up(queryRunner) {
32
- await queryRunner.createTable(new typeorm_1.Table({
33
- name: 'multifactors',
34
- columns: [
35
- (0, utils_1.idColumn)(),
36
- {
37
- name: 'name',
38
- type: 'varchar',
39
- },
40
- (0, utils_1.timestampColumn)(),
41
- (0, utils_1.timestampColumn)('updated_at'),
42
- ],
43
- }));
44
- await queryRunner.manager
45
- .createQueryBuilder()
46
- .insert()
47
- .into('multifactors', ['name'])
48
- .values([
49
- {
50
- name: 'Email',
51
- },
52
- {
53
- name: 'Applicativo',
54
- },
55
- ])
56
- .execute();
57
- await queryRunner.createTable(new typeorm_1.Table({
58
- name: 'users',
59
- columns: [
60
- (0, utils_1.idColumn)(),
61
- {
62
- name: 'name',
63
- type: 'varchar',
64
- },
65
- {
66
- name: 'email',
67
- type: 'varchar',
68
- },
69
- {
70
- name: 'password',
71
- type: 'varchar',
72
- },
73
- {
74
- name: 'multifactor_id',
75
- type: 'int',
76
- isNullable: true,
77
- unsigned: true,
78
- },
79
- {
80
- name: 'code',
81
- type: 'varchar',
82
- isNullable: true,
83
- },
84
- (0, utils_1.timestampColumn)(),
85
- (0, utils_1.timestampColumn)('updated_at'),
86
- ],
87
- }));
88
- await queryRunner.createForeignKeys('users', [
89
- new typeorm_1.TableForeignKey({
90
- columnNames: ['multifactor_id'],
91
- referencedColumnNames: ['id'],
92
- referencedTableName: 'multifactors',
93
- name: 'fk_users_to_multifactors_on_multifactor_id',
94
- onDelete: 'Cascade',
95
- }),
96
- ]);
97
- await queryRunner.manager
98
- .createQueryBuilder()
99
- .insert()
100
- .into('users', ['name', 'email', 'password'])
101
- .values([
102
- {
103
- name: 'Superuser',
104
- email: 'root@hedhog.com',
105
- password: await bcrypt.hash(`hedhog`, 12),
106
- },
107
- {
108
- name: 'User',
109
- email: 'user@hedhog.com',
110
- password: await bcrypt.hash(`hedhog`, 12),
111
- },
112
- ])
113
- .execute();
114
- }
115
- async down(queryRunner) {
116
- await queryRunner.dropTable('multifactors');
117
- await queryRunner.dropTable('users');
118
- }
119
- }
120
- exports.Migrate = Migrate;
121
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/auth/src/migrations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAKiB;AACjB,yCAA0D;AAC1D,+CAAiC;AAEjC,MAAa,OAAO;IAClB,KAAK,CAAC,EAAE,CAAC,WAAwB;QAC/B,MAAM,WAAW,CAAC,WAAW,CAC3B,IAAI,eAAK,CAAC;YACR,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE;gBACP,IAAA,gBAAQ,GAAE;gBACV;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,SAAS;iBAChB;gBACD,IAAA,uBAAe,GAAE;gBACjB,IAAA,uBAAe,EAAC,YAAY,CAAC;aAC9B;SACF,CAAC,CACH,CAAC;QAEF,MAAM,WAAW,CAAC,OAAO;aACtB,kBAAkB,EAAE;aACpB,MAAM,EAAE;aACR,IAAI,CAAC,cAAc,EAAE,CAAC,MAAM,CAAC,CAAC;aAC9B,MAAM,CAAC;YACN;gBACE,IAAI,EAAE,OAAO;aACd;YACD;gBACE,IAAI,EAAE,aAAa;aACpB;SACF,CAAC;aACD,OAAO,EAAE,CAAC;QAEb,MAAM,WAAW,CAAC,WAAW,CAC3B,IAAI,eAAK,CAAC;YACR,IAAI,EAAE,OAAO;YACb,OAAO,EAAE;gBACP,IAAA,gBAAQ,GAAE;gBACV;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,SAAS;iBAChB;gBACD;oBACE,IAAI,EAAE,OAAO;oBACb,IAAI,EAAE,SAAS;iBAChB;gBACD;oBACE,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,SAAS;iBAChB;gBACD;oBACE,IAAI,EAAE,gB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= {
2
- id: number;
3
- name: string;
4
- email: string;
5
- password: string;
6
- created_at: string;
7
- updated_at: string;
8
- };
9
- //# sourceMappingURL=user.type.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"user.type.d.ts","sourceRoot":"","sources":["../../../../src/auth/src/types/user.type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAA"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=user.type.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"user.type.js","sourceRoot":"","sources":["../../../../src/auth/src/types/user.type.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- export declare class DeleteDTO {
2
- ids: number[];
3
- }
4
- //# sourceMappingURL=delete.dto.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"delete.dto.d.ts","sourceRoot":"","sources":["../../../../src/file/src/dto/delete.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,SAAS;IAIpB,GAAG,EAAE,MAAM,EAAE,CAAC;CACf"}
@@ -1,23 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.DeleteDTO = void 0;
13
- const class_validator_1 = require("class-validator");
14
- class DeleteDTO {
15
- }
16
- exports.DeleteDTO = DeleteDTO;
17
- __decorate([
18
- (0, class_validator_1.IsArray)(),
19
- (0, class_validator_1.ArrayMinSize)(1),
20
- (0, class_validator_1.IsInt)({ each: true }),
21
- __metadata("design:type", Array)
22
- ], DeleteDTO.prototype, "ids", void 0);
23
- //# sourceMappingURL=delete.dto.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"delete.dto.js","sourceRoot":"","sources":["../../../../src/file/src/dto/delete.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+D;AAE/D,MAAa,SAAS;CAKrB;AALD,8BAKC;AADC;IAHC,IAAA,yBAAO,GAAE;IACT,IAAA,8BAAY,EAAC,CAAC,CAAC;IACf,IAAA,uBAAK,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;sCACR"}
@@ -1,3 +0,0 @@
1
- export declare class FileModule {
2
- }
3
- //# sourceMappingURL=file.module.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file.module.d.ts","sourceRoot":"","sources":["../../../src/file/src/file.module.ts"],"names":[],"mappings":"AAMA,qBASa,UAAU;CAAG"}
@@ -1,29 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.FileModule = void 0;
10
- const common_1 = require("@nestjs/common");
11
- const file_service_1 = require("./file.service");
12
- const __1 = require("../../");
13
- const prisma_1 = require("@hedhog/prisma");
14
- const pagination_1 = require("@hedhog/pagination");
15
- let FileModule = class FileModule {
16
- };
17
- exports.FileModule = FileModule;
18
- exports.FileModule = FileModule = __decorate([
19
- (0, common_1.Module)({
20
- imports: [
21
- (0, common_1.forwardRef)(() => __1.AuthModule),
22
- (0, common_1.forwardRef)(() => prisma_1.PrismaModule),
23
- (0, common_1.forwardRef)(() => pagination_1.PaginationModule),
24
- ],
25
- providers: [file_service_1.FileService],
26
- exports: [file_service_1.FileService],
27
- })
28
- ], FileModule);
29
- //# sourceMappingURL=file.module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file.module.js","sourceRoot":"","sources":["../../../src/file/src/file.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAoD;AACpD,iDAA6C;AAC7C,8BAAoC;AACpC,2CAA8C;AAC9C,mDAAsD;AAW/C,IAAM,UAAU,GAAhB,MAAM,UAAU;CAAG,CAAA;AAAb,gCAAU;qBAAV,UAAU;IATtB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,cAAU,CAAC;YAC5B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,qBAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,6BAAgB,CAAC;SACnC;QACD,SAAS,EAAE,CAAC,0BAAW,CAAC;QACxB,OAAO,EAAE,CAAC,0BAAW,CAAC;KACvB,CAAC;GACW,UAAU,CAAG"}
@@ -1,12 +0,0 @@
1
- import { PaginationDTO, PaginationService } from '@hedhog/pagination';
2
- import { PrismaService } from '@hedhog/prisma';
3
- import { DeleteDTO } from './dto/delete.dto';
4
- export declare class FileService {
5
- private readonly prismaService;
6
- private readonly paginationService;
7
- constructor(prismaService: PrismaService, paginationService: PaginationService);
8
- getFiles(paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
9
- get(fileId: number): Promise<any>;
10
- delete({ ids }: DeleteDTO): Promise<any>;
11
- }
12
- //# sourceMappingURL=file.service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file.service.d.ts","sourceRoot":"","sources":["../../../src/file/src/file.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAO/C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBACa,WAAW;IAGpB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAFjB,aAAa,EAAE,aAAa,EAE5B,iBAAiB,EAAE,iBAAiB;IAGjD,QAAQ,CAAC,gBAAgB,EAAE,aAAa;IAkBxC,GAAG,CAAC,MAAM,EAAE,MAAM;IAMlB,MAAM,CAAC,EAAE,GAAG,EAAE,EAAE,SAAS;CAehC"}
@@ -1,59 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.FileService = void 0;
16
- const pagination_1 = require("@hedhog/pagination");
17
- const prisma_1 = require("@hedhog/prisma");
18
- const common_1 = require("@nestjs/common");
19
- let FileService = class FileService {
20
- constructor(prismaService, paginationService) {
21
- this.prismaService = prismaService;
22
- this.paginationService = paginationService;
23
- }
24
- async getFiles(paginationParams) {
25
- const fields = ['name', 'url', 'extension'];
26
- const OR = this.prismaService.createInsensitiveSearch(fields, paginationParams);
27
- return this.paginationService.paginate(this.prismaService.files, paginationParams, {
28
- where: {
29
- OR,
30
- },
31
- });
32
- }
33
- async get(fileId) {
34
- return this.prismaService.files.findUnique({
35
- where: { id: fileId },
36
- });
37
- }
38
- async delete({ ids }) {
39
- if (ids == undefined || ids == null) {
40
- throw new common_1.BadRequestException(`You must select at least one file to delete.`);
41
- }
42
- return this.prismaService.files.deleteMany({
43
- where: {
44
- id: {
45
- in: ids,
46
- },
47
- },
48
- });
49
- }
50
- };
51
- exports.FileService = FileService;
52
- exports.FileService = FileService = __decorate([
53
- (0, common_1.Injectable)(),
54
- __param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => prisma_1.PrismaService))),
55
- __param(1, (0, common_1.Inject)((0, common_1.forwardRef)(() => pagination_1.PaginationService))),
56
- __metadata("design:paramtypes", [prisma_1.PrismaService,
57
- pagination_1.PaginationService])
58
- ], FileService);
59
- //# sourceMappingURL=file.service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file.service.js","sourceRoot":"","sources":["../../../src/file/src/file.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAsE;AACtE,2CAA+C;AAC/C,2CAKwB;AAIjB,IAAM,WAAW,GAAjB,MAAM,WAAW;IACtB,YAEmB,aAA4B,EAE5B,iBAAoC;QAFpC,kBAAa,GAAb,aAAa,CAAe;QAE5B,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAEJ,KAAK,CAAC,QAAQ,CA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ationInterface {
3
- up(queryRunner: QueryRunner): Promise<void>;
4
- down(queryRunner: QueryRunner): Promise<void>;
5
- }
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/file/src/migrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAS,MAAM,SAAS,CAAC;AAGjE,qBAAa,OAAQ,YAAW,kBAAkB;IACnC,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IA0I3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAG3D"}
@@ -1,137 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Migrate = void 0;
4
- const typeorm_1 = require("typeorm");
5
- const utils_1 = require("@hedhog/utils");
6
- class Migrate {
7
- async up(queryRunner) {
8
- await queryRunner.createTable(new typeorm_1.Table({
9
- name: 'files',
10
- columns: [
11
- (0, utils_1.idColumn)(),
12
- {
13
- name: 'name',
14
- type: 'varchar',
15
- },
16
- {
17
- name: 'url',
18
- type: 'varchar',
19
- },
20
- {
21
- name: 'extension',
22
- type: 'varchar',
23
- length: '15',
24
- },
25
- {
26
- name: 'bytes',
27
- type: 'int',
28
- },
29
- (0, utils_1.timestampColumn)(),
30
- (0, utils_1.timestampColumn)('updated_at'),
31
- ],
32
- }));
33
- await queryRunner.manager
34
- .createQueryBuilder()
35
- .insert()
36
- .into('settings')
37
- .values([
38
- { name: 'Storage Provider' },
39
- { name: 'AWS Storage' },
40
- { name: 'Azure Storage' },
41
- ])
42
- .execute();
43
- const rows = await queryRunner.manager
44
- .createQueryBuilder()
45
- .select('*')
46
- .from('settings', 's')
47
- .where('s.name IN (:...names)', {
48
- names: ['Storage Provider', 'AWS Storage', 'Azure Storage'],
49
- })
50
- .getRawMany();
51
- for (const row of rows) {
52
- switch (row.name) {
53
- case 'AWS Storage':
54
- await queryRunner.manager
55
- .createQueryBuilder()
56
- .insert()
57
- .into('setting_values')
58
- .values([
59
- {
60
- value: '',
61
- name: 'ACCESS_KEY_ID',
62
- description: 'Chave pública usada para identificar o usuário ou serviço que realiza chamadas à API da AWS, sendo necessária para autenticação junto com o AWS_SECRET_ACCESS_KEY.',
63
- label: 'ID da chave de acesso',
64
- setting_id: row.id,
65
- },
66
- {
67
- value: '',
68
- name: 'SECRET_ACCESS_KEY',
69
- description: 'Chave secreta de acesso para autenticação segura em serviços da AWS.',
70
- label: 'Chave Secreta de Acesso',
71
- setting_id: row.id,
72
- },
73
- {
74
- value: '',
75
- name: 'BUCKET_NAME',
76
- description: 'Nome do bucket de armazenamento na AWS.',
77
- label: 'Nome do Bucket',
78
- setting_id: row.id,
79
- },
80
- ])
81
- .execute();
82
- break;
83
- case 'Azure Storage':
84
- await queryRunner.manager
85
- .createQueryBuilder()
86
- .insert()
87
- .into('setting_values')
88
- .values([
89
- {
90
- value: '',
91
- name: 'ACCOUNT_NAME',
92
- description: 'Nome da conta de armazenamento no Azure.',
93
- label: 'Nome da Conta de Armazenamento',
94
- setting_id: row.id,
95
- },
96
- {
97
- value: '',
98
- name: 'ACCOUNT_KEY',
99
- description: 'Chave de acesso para autenticação e gerenciamento da conta de armazenamento.',
100
- label: 'Chave da Conta de Armazenamento',
101
- setting_id: row.id,
102
- },
103
- {
104
- value: '',
105
- name: 'CONTAINER_NAME',
106
- description: 'Nome do contêiner dentro da conta de armazenamento.',
107
- label: 'Nome do Container',
108
- setting_id: row.id,
109
- },
110
- ])
111
- .execute();
112
- break;
113
- case 'Storage Provider':
114
- await queryRunner.manager
115
- .createQueryBuilder()
116
- .insert()
117
- .into('setting_values')
118
- .values([
119
- {
120
- value: '',
121
- name: 'STORAGE_PROVIDER',
122
- description: 'Escolha entre AWS e Azure como provedor de armazenamento e forneça as informações correspondentes.',
123
- label: 'Provedor de armazenamento',
124
- setting_id: row.id,
125
- },
126
- ])
127
- .execute();
128
- break;
129
- }
130
- }
131
- }
132
- async down(queryRunner) {
133
- await queryRunner.dropTable('files');
134
- }
135
- }
136
- exports.Migrate = Migrate;
137
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/file/src/migrations/index.ts"],"names":[],"mappings":";;;AAAA,qCAAiE;AACjE,yCAA0D;AAE1D,MAAa,OAAO;IACX,KAAK,CAAC,EAAE,CAAC,WAAwB;QACtC,MAAM,WAAW,CAAC,WAAW,CAC3B,IAAI,eAAK,CAAC;YACR,IAAI,EAAE,OAAO;YACb,OAAO,EAAE;gBACP,IAAA,gBAAQ,GAAE;gBACV;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,SAAS;iBAChB;gBACD;oBACE,IAAI,EAAE,KAAK;oBACX,IAAI,EAAE,SAAS;iBAChB;gBACD;oBACE,IAAI,EAAE,WAAW;oBACjB,IAAI,EAAE,SAAS;oBACf,MAAM,EAAE,IAAI;iBACb;gBACD;oBACE,IAAI,EAAE,OAAO;oBACb,IAAI,EAAE,KAAK;iBACZ;gBACD,IAAA,uBAAe,GAAE;gBACjB,IAAA,uBAAe,EAAC,YAAY,CAAC;aAC9B;SACF,CAAC,CACH,CAAC;QAEF,MAAM,WAAW,CAAC,OAAO;aACtB,kBAAkB,EAAE;aACpB,MAAM,EAAE;aACR,IAAI,CAAC,UAAU,CAAC;aAChB,MAAM,CAAC;YACN,EAAE,IAAI,EAAE,kBAAkB,EAAE;YAC5B,EAAE,IAAI,EAAE,aAAa,EAAE;YACvB,EAAE,IAAI,EAAE,eAAe,EAAE;SAC1B,CAAC;aACD,OAAO,EAAE,CAAC;QAEb,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC,OAAO;aACnC,kBAAkB,EAAE;aACpB,MAAM,CAAC,GAAG,CAAC;aACX,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC;aACrB,KAAK,CAAC,uBAAuB,EAAE;YAC9B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AAE,iCAAiC;4BACxC,UAAU,EAAE,GAAG,CAAC,EAAE;yBACnB;wBACD;4BACE,KAAK,EAAE,EAAE;4BACT,IAAI,EAAE,gBAAgB;4BACtB,WAAW,EACT,qDAAqD;4BACvD,KAAK,EAAE,mBAAmB;4BAC1B,UAAU,EAAE,GAAG,CAAC,EAAE;yBACnB;qBACF,CAAC;yBACD,OAAO,EAAE,CAAC;oBACb,MAAM;gBAER,KAAK,kBAAkB;oBACrB,MAAM,WAAW,CAAC,OAAO;yBACtB,kBAAkB,EAAE;yBACpB,MAAM,EAAE;yBACR,IAAI,CAAC,gBAAgB,CAAC;yBACtB,MAAM,CAAC;wBACN;4BACE,KAAK,EAAE,EAAE;4BACT,IAAI,EAAE,kBAAkB;4BACxB,WAAW,EACT,oGAAoG;4BACtG,KAAK,EAAE,2BAA2B;4BAClC,UAAU,EAAE,GAAG,CAAC,EAAE;yBACnB;qBACF,CAAC;yBACD,OAAO,EAAE,CAAC;oBACb,MAAM;YACV,CAAC;QACH,CAAC;IACH,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACxC,MAAM,WAAW,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IACvC,CAAC;CACF;AA9ID,0BA8IC"}
package/dist/index.d.ts DELETED
@@ -1,18 +0,0 @@
1
- export * from './admin.module';
2
- export * from './auth/src/auth.module';
3
- export * from './auth/src/auth.service';
4
- export * from './auth/src/decorators/public.decorator';
5
- export * from './auth/src/decorators/user.decorator';
6
- export * from './auth/src/guards/auth.guard';
7
- export * from './menu/src/menu.module';
8
- export * from './menu/src/menu.service';
9
- export * from './permission/src/permission.module';
10
- export * from './permission/src/permission.service';
11
- export * from './permission/src/types/permission.types';
12
- export * from './permission/src/decorators/permission.decorator';
13
- export * from './screen/src/screen.module';
14
- export * from './screen/src/screen.service';
15
- export * from './user/src/constants/user.constants';
16
- export * from './user/src/user.module';
17
- export * from './user/src/user.service';
18
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
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.map DELETED
@@ -1 +0,0 @@
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"}
@@ -1,6 +0,0 @@
1
- export declare enum MailConfigurationTypeEnum {
2
- AWS = "AWS",
3
- SMTP = "SMTP",
4
- GMAIL = "GMAIL"
5
- }
6
- //# sourceMappingURL=mail-configuration-type.enum.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mail-configuration-type.enum.d.ts","sourceRoot":"","sources":["../../../../src/mail/src/enums/mail-configuration-type.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,yBAAyB;IACnC,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,KAAK,UAAU;CAChB"}
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MailConfigurationTypeEnum = void 0;
4
- var MailConfigurationTypeEnum;
5
- (function (MailConfigurationTypeEnum) {
6
- MailConfigurationTypeEnum["AWS"] = "AWS";
7
- MailConfigurationTypeEnum["SMTP"] = "SMTP";
8
- MailConfigurationTypeEnum["GMAIL"] = "GMAIL";
9
- })(MailConfigurationTypeEnum || (exports.MailConfigurationTypeEnum = MailConfigurationTypeEnum = {}));
10
- //# sourceMappingURL=mail-configuration-type.enum.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mail-configuration-type.enum.js","sourceRoot":"","sources":["../../../../src/mail/src/enums/mail-configuration-type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,yBAIX;AAJD,WAAY,yBAAyB;IACnC,wCAAW,CAAA;IACX,0CAAa,CAAA;IACb,4CAAe,CAAA;AACjB,CAAC,EAJW,yBAAyB,yCAAzB,yBAAyB,QAIpC"}
@@ -1,3 +0,0 @@
1
- export * from './mail-module-options.interface';
2
- export * from './mail-type';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mail/src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,aAAa,CAAC"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./mail-module-options.interface"), exports);
18
- __exportStar(require("./mail-type"), exports);
19
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mail/src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kEAAgD;AAChD,8CAA4B"}
@@ -1,32 +0,0 @@
1
- import { ModuleMetadata } from '@nestjs/common';
2
- export type MailModuleOptions = {
3
- global?: boolean;
4
- type: 'AWS';
5
- region: string;
6
- accessKeyId: string;
7
- secretAccessKey: string;
8
- from: string;
9
- } | {
10
- global?: boolean;
11
- type: 'SMTP';
12
- host: string;
13
- port: number;
14
- secure?: boolean;
15
- username: string;
16
- password: string;
17
- } | {
18
- global?: boolean;
19
- type: 'GMAIL';
20
- clientId: string;
21
- clientSecret: string;
22
- refreshToken: string;
23
- from: string;
24
- };
25
- export interface MailOptionsFactory {
26
- createMailOptions(): Promise<MailModuleOptions> | MailModuleOptions;
27
- }
28
- export interface MailModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
29
- useFactory: (...args: any[]) => Promise<MailModuleOptions> | MailModuleOptions;
30
- inject?: any[];
31
- }
32
- //# sourceMappingURL=mail-module-options.interface.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mail-module-options.interface.d.ts","sourceRoot":"","sources":["../../../../src/mail/src/interfaces/mail-module-options.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,MAAM,iBAAiB,GACzB;IACE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,KAAK,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;CACd,GACD;IACE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,GACD;IACE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEN,MAAM,WAAW,kBAAkB;IACjC,iBAAiB,IAAI,OAAO,CAAC,iBAAiB,CAAC,GAAG,iBAAiB,CAAC;CACrE;AAED,MAAM,WAAW,sBACf,SAAQ,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC;IACvC,UAAU,EAAE,CACV,GAAG,IAAI,EAAE,GAAG,EAAE,KACX,OAAO,CAAC,iBAAiB,CAAC,GAAG,iBAAiB,CAAC;IACpD,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC;CAChB"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=mail-module-options.interface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mail-module-options.interface.js","sourceRoot":"","sources":["../../../../src/mail/src/interfaces/mail-module-options.interface.ts"],"names":[],"mappings":""}
@@ -1,13 +0,0 @@
1
- export interface MailType {
2
- from?: string;
3
- to: string | string[];
4
- cc?: string | string[];
5
- bcc?: string | string[];
6
- subject?: string;
7
- body?: string;
8
- replyTo?: string | string[];
9
- priority?: string;
10
- createdAt?: string;
11
- updatedAt?: string;
12
- }
13
- //# sourceMappingURL=mail-type.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mail-type.d.ts","sourceRoot":"","sources":["../../../../src/mail/src/interfaces/mail-type.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACtB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACvB,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=mail-type.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mail-type.js","sourceRoot":"","sources":["../../../../src/mail/src/interfaces/mail-type.ts"],"names":[],"mappings":""}