@hedhog/admin 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (209) hide show
  1. package/dist/index.js +12 -16
  2. package/package.json +3 -2
  3. package/dist/admin.module.d.ts +0 -3
  4. package/dist/admin.module.d.ts.map +0 -1
  5. package/dist/admin.module.js +0 -30
  6. package/dist/admin.module.js.map +0 -1
  7. package/dist/auth/src/auth.controller.d.ts +0 -21
  8. package/dist/auth/src/auth.controller.d.ts.map +0 -1
  9. package/dist/auth/src/auth.controller.js +0 -77
  10. package/dist/auth/src/auth.controller.js.map +0 -1
  11. package/dist/auth/src/auth.module.d.ts +0 -3
  12. package/dist/auth/src/auth.module.d.ts.map +0 -1
  13. package/dist/auth/src/auth.module.js +0 -50
  14. package/dist/auth/src/auth.module.js.map +0 -1
  15. package/dist/auth/src/auth.service.d.ts +0 -36
  16. package/dist/auth/src/auth.service.d.ts.map +0 -1
  17. package/dist/auth/src/auth.service.js +0 -162
  18. package/dist/auth/src/auth.service.js.map +0 -1
  19. package/dist/auth/src/auth.service.spec.d.ts +0 -2
  20. package/dist/auth/src/auth.service.spec.d.ts.map +0 -1
  21. package/dist/auth/src/auth.service.spec.js +0 -17
  22. package/dist/auth/src/auth.service.spec.js.map +0 -1
  23. package/dist/auth/src/decorators/public.decorator.d.ts +0 -3
  24. package/dist/auth/src/decorators/public.decorator.d.ts.map +0 -1
  25. package/dist/auth/src/decorators/public.decorator.js +0 -8
  26. package/dist/auth/src/decorators/public.decorator.js.map +0 -1
  27. package/dist/auth/src/decorators/user.decorator.d.ts +0 -2
  28. package/dist/auth/src/decorators/user.decorator.d.ts.map +0 -1
  29. package/dist/auth/src/decorators/user.decorator.js +0 -12
  30. package/dist/auth/src/decorators/user.decorator.js.map +0 -1
  31. package/dist/auth/src/dto/forget.dto.d.ts +0 -4
  32. package/dist/auth/src/dto/forget.dto.d.ts.map +0 -1
  33. package/dist/auth/src/dto/forget.dto.js +0 -21
  34. package/dist/auth/src/dto/forget.dto.js.map +0 -1
  35. package/dist/auth/src/dto/login.dto.d.ts +0 -5
  36. package/dist/auth/src/dto/login.dto.d.ts.map +0 -1
  37. package/dist/auth/src/dto/login.dto.js +0 -31
  38. package/dist/auth/src/dto/login.dto.js.map +0 -1
  39. package/dist/auth/src/dto/otp.dto.d.ts +0 -5
  40. package/dist/auth/src/dto/otp.dto.d.ts.map +0 -1
  41. package/dist/auth/src/dto/otp.dto.js +0 -27
  42. package/dist/auth/src/dto/otp.dto.js.map +0 -1
  43. package/dist/auth/src/enums/multifactor-type.enum.d.ts +0 -5
  44. package/dist/auth/src/enums/multifactor-type.enum.d.ts.map +0 -1
  45. package/dist/auth/src/enums/multifactor-type.enum.js +0 -9
  46. package/dist/auth/src/enums/multifactor-type.enum.js.map +0 -1
  47. package/dist/auth/src/guards/auth.guard.d.ts +0 -11
  48. package/dist/auth/src/guards/auth.guard.d.ts.map +0 -1
  49. package/dist/auth/src/guards/auth.guard.js +0 -56
  50. package/dist/auth/src/guards/auth.guard.js.map +0 -1
  51. package/dist/auth/src/migrations/index.d.ts +0 -6
  52. package/dist/auth/src/migrations/index.d.ts.map +0 -1
  53. package/dist/auth/src/migrations/index.js +0 -121
  54. package/dist/auth/src/migrations/index.js.map +0 -1
  55. package/dist/auth/src/types/user.type.d.ts +0 -9
  56. package/dist/auth/src/types/user.type.d.ts.map +0 -1
  57. package/dist/auth/src/types/user.type.js +0 -3
  58. package/dist/auth/src/types/user.type.js.map +0 -1
  59. package/dist/index.d.ts +0 -18
  60. package/dist/index.d.ts.map +0 -1
  61. package/dist/index.js.map +0 -1
  62. package/dist/menu/src/dto/create.dto.d.ts +0 -8
  63. package/dist/menu/src/dto/create.dto.d.ts.map +0 -1
  64. package/dist/menu/src/dto/create.dto.js +0 -44
  65. package/dist/menu/src/dto/create.dto.js.map +0 -1
  66. package/dist/menu/src/dto/delete.dto.d.ts +0 -4
  67. package/dist/menu/src/dto/delete.dto.d.ts.map +0 -1
  68. package/dist/menu/src/dto/delete.dto.js +0 -24
  69. package/dist/menu/src/dto/delete.dto.js.map +0 -1
  70. package/dist/menu/src/dto/order.dto.d.ts +0 -4
  71. package/dist/menu/src/dto/order.dto.d.ts.map +0 -1
  72. package/dist/menu/src/dto/order.dto.js +0 -23
  73. package/dist/menu/src/dto/order.dto.js.map +0 -1
  74. package/dist/menu/src/dto/update.dto.d.ts +0 -7
  75. package/dist/menu/src/dto/update.dto.d.ts.map +0 -1
  76. package/dist/menu/src/dto/update.dto.js +0 -37
  77. package/dist/menu/src/dto/update.dto.js.map +0 -1
  78. package/dist/menu/src/menu.controller.d.ts +0 -19
  79. package/dist/menu/src/menu.controller.d.ts.map +0 -1
  80. package/dist/menu/src/menu.controller.js +0 -117
  81. package/dist/menu/src/menu.controller.js.map +0 -1
  82. package/dist/menu/src/menu.module.d.ts +0 -3
  83. package/dist/menu/src/menu.module.d.ts.map +0 -1
  84. package/dist/menu/src/menu.module.js +0 -31
  85. package/dist/menu/src/menu.module.js.map +0 -1
  86. package/dist/menu/src/menu.service.d.ts +0 -23
  87. package/dist/menu/src/menu.service.d.ts.map +0 -1
  88. package/dist/menu/src/menu.service.js +0 -117
  89. package/dist/menu/src/menu.service.js.map +0 -1
  90. package/dist/menu/src/migrations/index.d.ts +0 -7
  91. package/dist/menu/src/migrations/index.d.ts.map +0 -1
  92. package/dist/menu/src/migrations/index.js +0 -101
  93. package/dist/menu/src/migrations/index.js.map +0 -1
  94. package/dist/migrations/migrate-01.d.ts +0 -6
  95. package/dist/migrations/migrate-01.d.ts.map +0 -1
  96. package/dist/migrations/migrate-01.js +0 -121
  97. package/dist/migrations/migrate-01.js.map +0 -1
  98. package/dist/migrations/migrate-02.d.ts +0 -6
  99. package/dist/migrations/migrate-02.d.ts.map +0 -1
  100. package/dist/migrations/migrate-02.js +0 -40
  101. package/dist/migrations/migrate-02.js.map +0 -1
  102. package/dist/migrations/migrate-03.d.ts +0 -7
  103. package/dist/migrations/migrate-03.d.ts.map +0 -1
  104. package/dist/migrations/migrate-03.js +0 -101
  105. package/dist/migrations/migrate-03.js.map +0 -1
  106. package/dist/migrations/migrate-04.d.ts +0 -6
  107. package/dist/migrations/migrate-04.d.ts.map +0 -1
  108. package/dist/migrations/migrate-04.js +0 -525
  109. package/dist/migrations/migrate-04.js.map +0 -1
  110. package/dist/permission/src/decorators/permission.decorator.d.ts +0 -3
  111. package/dist/permission/src/decorators/permission.decorator.d.ts.map +0 -1
  112. package/dist/permission/src/decorators/permission.decorator.js +0 -8
  113. package/dist/permission/src/decorators/permission.decorator.js.map +0 -1
  114. package/dist/permission/src/dto/create.dto.d.ts +0 -5
  115. package/dist/permission/src/dto/create.dto.d.ts.map +0 -1
  116. package/dist/permission/src/dto/create.dto.js +0 -27
  117. package/dist/permission/src/dto/create.dto.js.map +0 -1
  118. package/dist/permission/src/dto/delete.dto.d.ts +0 -4
  119. package/dist/permission/src/dto/delete.dto.d.ts.map +0 -1
  120. package/dist/permission/src/dto/delete.dto.js +0 -23
  121. package/dist/permission/src/dto/delete.dto.js.map +0 -1
  122. package/dist/permission/src/dto/update.dto.d.ts +0 -5
  123. package/dist/permission/src/dto/update.dto.d.ts.map +0 -1
  124. package/dist/permission/src/dto/update.dto.js +0 -27
  125. package/dist/permission/src/dto/update.dto.js.map +0 -1
  126. package/dist/permission/src/guards/permission.guard.d.ts +0 -11
  127. package/dist/permission/src/guards/permission.guard.d.ts.map +0 -1
  128. package/dist/permission/src/guards/permission.guard.js +0 -99
  129. package/dist/permission/src/guards/permission.guard.js.map +0 -1
  130. package/dist/permission/src/migrations/index.d.ts +0 -6
  131. package/dist/permission/src/migrations/index.d.ts.map +0 -1
  132. package/dist/permission/src/migrations/index.js +0 -520
  133. package/dist/permission/src/migrations/index.js.map +0 -1
  134. package/dist/permission/src/permission.controller.d.ts +0 -14
  135. package/dist/permission/src/permission.controller.d.ts.map +0 -1
  136. package/dist/permission/src/permission.controller.js +0 -95
  137. package/dist/permission/src/permission.controller.js.map +0 -1
  138. package/dist/permission/src/permission.module.d.ts +0 -3
  139. package/dist/permission/src/permission.module.d.ts.map +0 -1
  140. package/dist/permission/src/permission.module.js +0 -39
  141. package/dist/permission/src/permission.module.js.map +0 -1
  142. package/dist/permission/src/permission.service.d.ts +0 -19
  143. package/dist/permission/src/permission.service.d.ts.map +0 -1
  144. package/dist/permission/src/permission.service.js +0 -73
  145. package/dist/permission/src/permission.service.js.map +0 -1
  146. package/dist/permission/src/types/permission.types.d.ts +0 -33
  147. package/dist/permission/src/types/permission.types.d.ts.map +0 -1
  148. package/dist/permission/src/types/permission.types.js +0 -3
  149. package/dist/permission/src/types/permission.types.js.map +0 -1
  150. package/dist/screen/src/dto/create.dto.d.ts +0 -7
  151. package/dist/screen/src/dto/create.dto.d.ts.map +0 -1
  152. package/dist/screen/src/dto/create.dto.js +0 -37
  153. package/dist/screen/src/dto/create.dto.js.map +0 -1
  154. package/dist/screen/src/dto/delete.dto.d.ts +0 -4
  155. package/dist/screen/src/dto/delete.dto.d.ts.map +0 -1
  156. package/dist/screen/src/dto/delete.dto.js +0 -23
  157. package/dist/screen/src/dto/delete.dto.js.map +0 -1
  158. package/dist/screen/src/dto/update.dto.d.ts +0 -7
  159. package/dist/screen/src/dto/update.dto.d.ts.map +0 -1
  160. package/dist/screen/src/dto/update.dto.js +0 -37
  161. package/dist/screen/src/dto/update.dto.js.map +0 -1
  162. package/dist/screen/src/migrations/index.d.ts +0 -6
  163. package/dist/screen/src/migrations/index.d.ts.map +0 -1
  164. package/dist/screen/src/migrations/index.js +0 -40
  165. package/dist/screen/src/migrations/index.js.map +0 -1
  166. package/dist/screen/src/screen.controller.d.ts +0 -14
  167. package/dist/screen/src/screen.controller.d.ts.map +0 -1
  168. package/dist/screen/src/screen.controller.js +0 -94
  169. package/dist/screen/src/screen.controller.js.map +0 -1
  170. package/dist/screen/src/screen.module.d.ts +0 -3
  171. package/dist/screen/src/screen.module.d.ts.map +0 -1
  172. package/dist/screen/src/screen.module.js +0 -31
  173. package/dist/screen/src/screen.module.js.map +0 -1
  174. package/dist/screen/src/screen.service.d.ts +0 -19
  175. package/dist/screen/src/screen.service.d.ts.map +0 -1
  176. package/dist/screen/src/screen.service.js +0 -73
  177. package/dist/screen/src/screen.service.js.map +0 -1
  178. package/dist/user/src/constants/user.constants.d.ts +0 -2
  179. package/dist/user/src/constants/user.constants.d.ts.map +0 -1
  180. package/dist/user/src/constants/user.constants.js +0 -5
  181. package/dist/user/src/constants/user.constants.js.map +0 -1
  182. package/dist/user/src/dto/create.dto.d.ts +0 -6
  183. package/dist/user/src/dto/create.dto.d.ts.map +0 -1
  184. package/dist/user/src/dto/create.dto.js +0 -37
  185. package/dist/user/src/dto/create.dto.js.map +0 -1
  186. package/dist/user/src/dto/delete.dto.d.ts +0 -4
  187. package/dist/user/src/dto/delete.dto.d.ts.map +0 -1
  188. package/dist/user/src/dto/delete.dto.js +0 -23
  189. package/dist/user/src/dto/delete.dto.js.map +0 -1
  190. package/dist/user/src/dto/update.dto.d.ts +0 -8
  191. package/dist/user/src/dto/update.dto.d.ts.map +0 -1
  192. package/dist/user/src/dto/update.dto.js +0 -50
  193. package/dist/user/src/dto/update.dto.js.map +0 -1
  194. package/dist/user/src/user.controller.d.ts +0 -14
  195. package/dist/user/src/user.controller.d.ts.map +0 -1
  196. package/dist/user/src/user.controller.js +0 -94
  197. package/dist/user/src/user.controller.js.map +0 -1
  198. package/dist/user/src/user.module.d.ts +0 -3
  199. package/dist/user/src/user.module.d.ts.map +0 -1
  200. package/dist/user/src/user.module.js +0 -31
  201. package/dist/user/src/user.module.js.map +0 -1
  202. package/dist/user/src/user.service.d.ts +0 -20
  203. package/dist/user/src/user.service.d.ts.map +0 -1
  204. package/dist/user/src/user.service.js +0 -84
  205. package/dist/user/src/user.service.js.map +0 -1
  206. package/dist/user/src/user.service.spec.d.ts +0 -2
  207. package/dist/user/src/user.service.spec.d.ts.map +0 -1
  208. package/dist/user/src/user.service.spec.js +0 -17
  209. package/dist/user/src/user.service.spec.js.map +0 -1
@@ -1,31 +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.LoginDTO = void 0;
13
- const class_validator_1 = require("class-validator");
14
- class LoginDTO {
15
- }
16
- exports.LoginDTO = LoginDTO;
17
- __decorate([
18
- (0, class_validator_1.IsEmail)(),
19
- __metadata("design:type", String)
20
- ], LoginDTO.prototype, "email", void 0);
21
- __decorate([
22
- (0, class_validator_1.IsStrongPassword)({
23
- minLength: 6,
24
- minLowercase: 1,
25
- minUppercase: 0,
26
- minNumbers: 0,
27
- minSymbols: 0,
28
- }),
29
- __metadata("design:type", String)
30
- ], LoginDTO.prototype, "password", void 0);
31
- //# sourceMappingURL=login.dto.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"login.dto.js","sourceRoot":"","sources":["../../../../src/auth/src/dto/login.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA4D;AAE5D,MAAa,QAAQ;CAYpB;AAZD,4BAYC;AAVC;IADC,IAAA,yBAAO,GAAE;;uCACI;AASd;IAPC,IAAA,kCAAgB,EAAC;QAChB,SAAS,EAAE,CAAC;QACZ,YAAY,EAAE,CAAC;QACf,YAAY,EAAE,CAAC;QACf,UAAU,EAAE,CAAC;QACb,UAAU,EAAE,CAAC;KACd,CAAC;;0CACe"}
@@ -1,5 +0,0 @@
1
- export declare class OtpDTO {
2
- code: number;
3
- token: string;
4
- }
5
- //# sourceMappingURL=otp.dto.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"otp.dto.d.ts","sourceRoot":"","sources":["../../../../src/auth/src/dto/otp.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,MAAM;IAKjB,IAAI,EAAE,MAAM,CAAC;IAGb,KAAK,EAAE,MAAM,CAAC;CAEf"}
@@ -1,27 +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.OtpDTO = void 0;
13
- const class_validator_1 = require("class-validator");
14
- class OtpDTO {
15
- }
16
- exports.OtpDTO = OtpDTO;
17
- __decorate([
18
- (0, class_validator_1.Min)(0),
19
- (0, class_validator_1.Max)(999999),
20
- (0, class_validator_1.IsInt)(),
21
- __metadata("design:type", Number)
22
- ], OtpDTO.prototype, "code", void 0);
23
- __decorate([
24
- (0, class_validator_1.IsJWT)(),
25
- __metadata("design:type", String)
26
- ], OtpDTO.prototype, "token", void 0);
27
- //# sourceMappingURL=otp.dto.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"otp.dto.js","sourceRoot":"","sources":["../../../../src/auth/src/dto/otp.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyD;AAEzD,MAAa,MAAM;CAUlB;AAVD,wBAUC;AALC;IAHC,IAAA,qBAAG,EAAC,CAAC,CAAC;IACN,IAAA,qBAAG,EAAC,MAAM,CAAC;IACX,IAAA,uBAAK,GAAE;;oCACK;AAGb;IADC,IAAA,uBAAK,GAAE;;qCACM"}
@@ -1,5 +0,0 @@
1
- export declare enum MultifactorType {
2
- EMAIL = 1,
3
- APP = 2
4
- }
5
- //# sourceMappingURL=multifactor-type.enum.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"multifactor-type.enum.d.ts","sourceRoot":"","sources":["../../../../src/auth/src/enums/multifactor-type.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IACzB,KAAK,IAAI;IACT,GAAG,IAAI;CACR"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MultifactorType = void 0;
4
- var MultifactorType;
5
- (function (MultifactorType) {
6
- MultifactorType[MultifactorType["EMAIL"] = 1] = "EMAIL";
7
- MultifactorType[MultifactorType["APP"] = 2] = "APP";
8
- })(MultifactorType || (exports.MultifactorType = MultifactorType = {}));
9
- //# sourceMappingURL=multifactor-type.enum.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"multifactor-type.enum.js","sourceRoot":"","sources":["../../../../src/auth/src/enums/multifactor-type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,uDAAS,CAAA;IACT,mDAAO,CAAA;AACT,CAAC,EAHW,eAAe,+BAAf,eAAe,QAG1B"}
@@ -1,11 +0,0 @@
1
- import { CanActivate, ExecutionContext } from '@nestjs/common';
2
- import { Reflector } from '@nestjs/core';
3
- import { AuthService } from '../auth.service';
4
- export declare class AuthGuard implements CanActivate {
5
- private auth;
6
- private reflector;
7
- constructor(auth: AuthService, reflector: Reflector);
8
- canActivate(context: ExecutionContext): Promise<boolean>;
9
- private extractTokenFromHeader;
10
- }
11
- //# sourceMappingURL=auth.guard.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth.guard.d.ts","sourceRoot":"","sources":["../../../../src/auth/src/guards/auth.guard.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,gBAAgB,EAGjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG9C,qBACa,SAAU,YAAW,WAAW;IAEzC,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,SAAS;gBADT,IAAI,EAAE,WAAW,EACjB,SAAS,EAAE,SAAS;IAGxB,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC;IAyB9D,OAAO,CAAC,sBAAsB;CAI/B"}
@@ -1,56 +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.AuthGuard = void 0;
13
- const common_1 = require("@nestjs/common");
14
- const core_1 = require("@nestjs/core");
15
- const auth_service_1 = require("../auth.service");
16
- const public_decorator_1 = require("../decorators/public.decorator");
17
- let AuthGuard = class AuthGuard {
18
- constructor(auth, reflector) {
19
- this.auth = auth;
20
- this.reflector = reflector;
21
- }
22
- async canActivate(context) {
23
- const isPublic = this.reflector.getAllAndOverride(public_decorator_1.IS_PUBLIC_KEY, [
24
- context.getHandler(),
25
- context.getClass(),
26
- ]);
27
- if (isPublic) {
28
- return true;
29
- }
30
- const request = context.switchToHttp().getRequest();
31
- const token = this.extractTokenFromHeader(request);
32
- if (!token) {
33
- throw new common_1.UnauthorizedException();
34
- }
35
- try {
36
- const payload = await this.auth.verifyToken(token);
37
- request['auth'] = payload;
38
- }
39
- catch (_a) {
40
- throw new common_1.UnauthorizedException();
41
- }
42
- return true;
43
- }
44
- extractTokenFromHeader(request) {
45
- var _a, _b;
46
- const [type, token] = (_b = (_a = request.headers.authorization) === null || _a === void 0 ? void 0 : _a.split(' ')) !== null && _b !== void 0 ? _b : [];
47
- return type === 'Bearer' ? token : undefined;
48
- }
49
- };
50
- exports.AuthGuard = AuthGuard;
51
- exports.AuthGuard = AuthGuard = __decorate([
52
- (0, common_1.Injectable)(),
53
- __metadata("design:paramtypes", [auth_service_1.AuthService,
54
- core_1.Reflector])
55
- ], AuthGuard);
56
- //# sourceMappingURL=auth.guard.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth.guard.js","sourceRoot":"","sources":["../../../../src/auth/src/guards/auth.guard.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAKwB;AACxB,uCAAyC;AAEzC,kDAA8C;AAC9C,qEAA+D;AAGxD,IAAM,SAAS,GAAf,MAAM,SAAS;IACpB,YACU,IAAiB,EACjB,SAAoB;QADpB,SAAI,GAAJ,IAAI,CAAa;QACjB,cAAS,GAAT,SAAS,CAAW;IAC3B,CAAC;IAEJ,KAAK,CAAC,WAAW,CAAC,OAAyB;QACzC,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAU,gCAAa,EAAE;YACxE,OAAO,CAAC,UAAU,EAAE;YACpB,OAAO,CAAC,QAAQ,EAAE;SACnB,CAAC,CAAC;QACH,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,OAAO,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,UAAU,EAAE,CAAC;QACpD,MAAM,KAAK,GAAG,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;QAEnD,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,IAAI,8BAAqB,EAAE,CAAC;QACpC,CAAC;QACD,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;YAEnD,OAAO,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC;QAC5B,CAAC;QAAC,WAAM,CAAC;YACP,MAAM,IAAI,8BAAqB,EAAE,CAAC;QACpC,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,sBAAsB,CAAC,OAAgB;;QAC7C,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,MAAA,MAAA,OAAO,CAAC,OAAO,CAAC,aAAa,0CAAE,KAAK,CAAC,GAAG,CAAC,mCAAI,EAAE,CAAC;QACtE,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;IAC/C,CAAC;CACF,CAAA;AAnCY,8BAAS;oBAAT,SAAS;IADrB,IAAA,mBAAU,GAAE;qCAGK,0BAAW;QACN,gBAAS;GAHnB,SAAS,CAmCrB"}
@@ -1,6 +0,0 @@
1
- import { MigrationInterface, QueryRunner } from 'typeorm';
2
- export declare class Migrate implements MigrationInterface {
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/auth/src/migrations/index.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"}
@@ -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,gBAAgB;oBACtB,IAAI,EAAE,KAAK;oBACX,UAAU,EAAE,IAAI;oBAChB,QAAQ,EAAE,IAAI;iBACf;gBACD;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,SAAS;oBACf,UAAU,EAAE,IAAI;iBACjB;gBACD,IAAA,uBAAe,GAAE;gBACjB,IAAA,uBAAe,EAAC,YAAY,CAAC;aAC9B;SACF,CAAC,CACH,CAAC;QAEF,MAAM,WAAW,CAAC,iBAAiB,CAAC,OAAO,EAAE;YAC3C,IAAI,yBAAe,CAAC;gBAClB,WAAW,EAAE,CAAC,gBAAgB,CAAC;gBAC/B,qBAAqB,EAAE,CAAC,IAAI,CAAC;gBAC7B,mBAAmB,EAAE,cAAc;gBACnC,IAAI,EAAE,4CAA4C;gBAClD,QAAQ,EAAE,SAAS;aACpB,CAAC;SACH,CAAC,CAAC;QAEH,MAAM,WAAW,CAAC,OAAO;aACtB,kBAAkB,EAAE;aACpB,MAAM,EAAE;aACR,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;aAC5C,MAAM,CAAC;YACN;gBACE,IAAI,EAAE,WAAW;gBACjB,KAAK,EAAE,iBAAiB;gBACxB,QAAQ,EAAE,MAAM,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC;aAC1C;YACD;gBACE,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,iBAAiB;gBACxB,QAAQ,EAAE,MAAM,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC;aAC1C;SACF,CAAC;aACD,OAAO,EAAE,CAAC;IACf,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,WAAwB;QACjC,MAAM,WAAW,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;QAC5C,MAAM,WAAW,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IACvC,CAAC;CACF;AAjGD,0BAiGC"}
@@ -1,9 +0,0 @@
1
- export type User = {
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":""}
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,8 +0,0 @@
1
- export declare class CreateDTO {
2
- name: string;
3
- url: string;
4
- order?: number;
5
- icon?: string;
6
- menuId?: number;
7
- }
8
- //# sourceMappingURL=create.dto.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create.dto.d.ts","sourceRoot":"","sources":["../../../../src/menu/src/dto/create.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,SAAS;IAGpB,IAAI,EAAE,MAAM,CAAC;IAIb,GAAG,EAAE,MAAM,CAAC;IAKZ,KAAK,CAAC,EAAE,MAAM,CAAC;IAIf,IAAI,CAAC,EAAE,MAAM,CAAC;IAKd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
@@ -1,44 +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.CreateDTO = void 0;
13
- const class_validator_1 = require("class-validator");
14
- class CreateDTO {
15
- }
16
- exports.CreateDTO = CreateDTO;
17
- __decorate([
18
- (0, class_validator_1.IsString)({ message: 'O nome deve ser uma string' }),
19
- (0, class_validator_1.IsNotEmpty)({ message: 'O nome é obrigatório.' }),
20
- __metadata("design:type", String)
21
- ], CreateDTO.prototype, "name", void 0);
22
- __decorate([
23
- (0, class_validator_1.IsString)({ message: 'A url deve ser uma string' }),
24
- (0, class_validator_1.IsNotEmpty)({ message: 'A url é obrigatório.' }),
25
- __metadata("design:type", String)
26
- ], CreateDTO.prototype, "url", void 0);
27
- __decorate([
28
- (0, class_validator_1.IsInt)({ message: 'Order deve ser um número.' }),
29
- (0, class_validator_1.Min)(1),
30
- (0, class_validator_1.IsOptional)(),
31
- __metadata("design:type", Number)
32
- ], CreateDTO.prototype, "order", void 0);
33
- __decorate([
34
- (0, class_validator_1.IsString)({ message: 'O ícone deve ser uma string' }),
35
- (0, class_validator_1.IsOptional)(),
36
- __metadata("design:type", String)
37
- ], CreateDTO.prototype, "icon", void 0);
38
- __decorate([
39
- (0, class_validator_1.IsInt)({ message: 'MenuID deve ser um número.' }),
40
- (0, class_validator_1.Min)(1),
41
- (0, class_validator_1.IsOptional)(),
42
- __metadata("design:type", Number)
43
- ], CreateDTO.prototype, "menuId", void 0);
44
- //# sourceMappingURL=create.dto.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create.dto.js","sourceRoot":"","sources":["../../../../src/menu/src/dto/create.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qDAA+E;AAE/E,MAAa,SAAS;CAsBrB;AAtBD,8BAsBC;AAnBC;IAFC,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC;IACnD,IAAA,4BAAU,EAAC,EAAE,OAAO,EAAE,uBAAuB,EAAE,CAAC;;uCACpC;AAIb;IAFC,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,2BAA2B,EAAE,CAAC;IAClD,IAAA,4BAAU,EAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,CAAC;;sCACpC;AAKZ;IAHC,IAAA,uBAAK,EAAC,EAAE,OAAO,EAAE,2BAA2B,EAAE,CAAC;IAC/C,IAAA,qBAAG,EAAC,CAAC,CAAC;IACN,IAAA,4BAAU,GAAE;;wCACE;AAIf;IAFC,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,6BAA6B,EAAE,CAAC;IACpD,IAAA,4BAAU,GAAE;;uCACC;AAKd;IAHC,IAAA,uBAAK,EAAC,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC;IAChD,IAAA,qBAAG,EAAC,CAAC,CAAC;IACN,IAAA,4BAAU,GAAE;;yCACG"}
@@ -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/menu/src/dto/delete.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,SAAS;IAKpB,GAAG,EAAE,MAAM,EAAE,CAAC;CACf"}
@@ -1,24 +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.ArrayNotEmpty)(),
20
- (0, class_validator_1.ArrayMinSize)(1),
21
- (0, class_validator_1.IsInt)({ each: true }),
22
- __metadata("design:type", Array)
23
- ], DeleteDTO.prototype, "ids", void 0);
24
- //# sourceMappingURL=delete.dto.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"delete.dto.js","sourceRoot":"","sources":["../../../../src/menu/src/dto/delete.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA8E;AAE9E,MAAa,SAAS;CAMrB;AAND,8BAMC;AADC;IAJC,IAAA,yBAAO,GAAE;IACT,IAAA,+BAAa,GAAE;IACf,IAAA,8BAAY,EAAC,CAAC,CAAC;IACf,IAAA,uBAAK,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;sCACR"}
@@ -1,4 +0,0 @@
1
- export declare class OrderDTO {
2
- ids: number[];
3
- }
4
- //# sourceMappingURL=order.dto.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"order.dto.d.ts","sourceRoot":"","sources":["../../../../src/menu/src/dto/order.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,QAAQ;IAInB,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.OrderDTO = void 0;
13
- const class_validator_1 = require("class-validator");
14
- class OrderDTO {
15
- }
16
- exports.OrderDTO = OrderDTO;
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
- ], OrderDTO.prototype, "ids", void 0);
23
- //# sourceMappingURL=order.dto.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"order.dto.js","sourceRoot":"","sources":["../../../../src/menu/src/dto/order.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+D;AAE/D,MAAa,QAAQ;CAKpB;AALD,4BAKC;AADC;IAHC,IAAA,yBAAO,GAAE;IACT,IAAA,8BAAY,EAAC,CAAC,CAAC;IACf,IAAA,uBAAK,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;qCACR"}
@@ -1,7 +0,0 @@
1
- export declare class UpdateDTO {
2
- name?: string;
3
- url?: string;
4
- order?: number;
5
- icon?: string;
6
- }
7
- //# sourceMappingURL=update.dto.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update.dto.d.ts","sourceRoot":"","sources":["../../../../src/menu/src/dto/update.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,SAAS;IAGpB,IAAI,CAAC,EAAE,MAAM,CAAC;IAId,GAAG,CAAC,EAAE,MAAM,CAAC;IAIb,KAAK,CAAC,EAAE,MAAM,CAAC;IAIf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
@@ -1,37 +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.UpdateDTO = void 0;
13
- const class_validator_1 = require("class-validator");
14
- class UpdateDTO {
15
- }
16
- exports.UpdateDTO = UpdateDTO;
17
- __decorate([
18
- (0, class_validator_1.IsString)({ message: 'O nome deve ser uma string' }),
19
- (0, class_validator_1.IsOptional)(),
20
- __metadata("design:type", String)
21
- ], UpdateDTO.prototype, "name", void 0);
22
- __decorate([
23
- (0, class_validator_1.IsString)({ message: 'A url deve ser uma string' }),
24
- (0, class_validator_1.IsOptional)(),
25
- __metadata("design:type", String)
26
- ], UpdateDTO.prototype, "url", void 0);
27
- __decorate([
28
- (0, class_validator_1.IsInt)({ message: 'Order deve ser um número.' }),
29
- (0, class_validator_1.IsOptional)(),
30
- __metadata("design:type", Number)
31
- ], UpdateDTO.prototype, "order", void 0);
32
- __decorate([
33
- (0, class_validator_1.IsString)({ message: 'O ícone deve ser uma string' }),
34
- (0, class_validator_1.IsOptional)(),
35
- __metadata("design:type", String)
36
- ], UpdateDTO.prototype, "icon", void 0);
37
- //# sourceMappingURL=update.dto.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update.dto.js","sourceRoot":"","sources":["../../../../src/menu/src/dto/update.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA0E;AAE1E,MAAa,SAAS;CAgBrB;AAhBD,8BAgBC;AAbC;IAFC,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC;IACnD,IAAA,4BAAU,GAAE;;uCACC;AAId;IAFC,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,2BAA2B,EAAE,CAAC;IAClD,IAAA,4BAAU,GAAE;;sCACA;AAIb;IAFC,IAAA,uBAAK,EAAC,EAAE,OAAO,EAAE,2BAA2B,EAAE,CAAC;IAC/C,IAAA,4BAAU,GAAE;;wCACE;AAIf;IAFC,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,6BAA6B,EAAE,CAAC;IACpD,IAAA,4BAAU,GAAE;;uCACC"}
@@ -1,19 +0,0 @@
1
- import { CreateDTO } from './dto/create.dto';
2
- import { DeleteDTO } from './dto/delete.dto';
3
- import { UpdateDTO } from './dto/update.dto';
4
- import { MenuService } from './menu.service';
5
- import { OrderDTO } from './dto/order.dto';
6
- export declare class MenuController {
7
- private readonly menuService;
8
- constructor(menuService: MenuService);
9
- getSystemMenu({ id }: {
10
- id: any;
11
- }): Promise<any[]>;
12
- getMenu(paginationParams: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
13
- show(menuId: number): Promise<any>;
14
- create(data: CreateDTO): Promise<any>;
15
- update(menuId: number, data: UpdateDTO): Promise<any>;
16
- delete(data: DeleteDTO): Promise<any>;
17
- updateOrder(data: OrderDTO): Promise<void>;
18
- }
19
- //# sourceMappingURL=menu.controller.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"menu.controller.d.ts","sourceRoot":"","sources":["../../../src/menu/src/menu.controller.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,qBAEa,cAAc;IAGvB,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAAX,WAAW,EAAE,WAAW;IAKrC,aAAa,CAAS,EAAE,EAAE,EAAE;;KAAA;IAM5B,OAAO,CAAe,gBAAgB,KAAA;IAMtC,IAAI,CAAgC,MAAM,EAAE,MAAM;IAMlD,MAAM,CAAS,IAAI,EAAE,SAAS;IAM9B,MAAM,CACqB,MAAM,EAAE,MAAM,EACrC,IAAI,EAAE,SAAS;IAUnB,MAAM,CAAS,IAAI,EAAE,SAAS;IAM9B,WAAW,CAAS,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;CAGzD"}