web_api_base 6.1.0 → 6.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. package/package.json +1 -1
  2. package/dist/Application.d.ts +0 -29
  3. package/dist/Application.d.ts.map +0 -1
  4. package/dist/Application.js +0 -560
  5. package/dist/Application.js.map +0 -1
  6. package/dist/ApplicationConfiguration.d.ts +0 -24
  7. package/dist/ApplicationConfiguration.d.ts.map +0 -1
  8. package/dist/ApplicationConfiguration.js +0 -141
  9. package/dist/ApplicationConfiguration.js.map +0 -1
  10. package/dist/bin/CreateApplication.d.ts +0 -2
  11. package/dist/bin/CreateApplication.d.ts.map +0 -1
  12. package/dist/bin/CreateApplication.js +0 -6
  13. package/dist/bin/CreateApplication.js.map +0 -1
  14. package/dist/bin/CreateController.d.ts +0 -2
  15. package/dist/bin/CreateController.d.ts.map +0 -1
  16. package/dist/bin/CreateController.js +0 -5
  17. package/dist/bin/CreateController.js.map +0 -1
  18. package/dist/bin/Factory.d.ts +0 -3
  19. package/dist/bin/Factory.d.ts.map +0 -1
  20. package/dist/bin/Factory.js +0 -81
  21. package/dist/bin/Factory.js.map +0 -1
  22. package/dist/controllers/AcceptedResult.d.ts +0 -5
  23. package/dist/controllers/AcceptedResult.d.ts.map +0 -1
  24. package/dist/controllers/AcceptedResult.js +0 -13
  25. package/dist/controllers/AcceptedResult.js.map +0 -1
  26. package/dist/controllers/ActionResult.d.ts +0 -6
  27. package/dist/controllers/ActionResult.d.ts.map +0 -1
  28. package/dist/controllers/ActionResult.js +0 -10
  29. package/dist/controllers/ActionResult.js.map +0 -1
  30. package/dist/controllers/BadRequestResult.d.ts +0 -5
  31. package/dist/controllers/BadRequestResult.d.ts.map +0 -1
  32. package/dist/controllers/BadRequestResult.js +0 -13
  33. package/dist/controllers/BadRequestResult.js.map +0 -1
  34. package/dist/controllers/CreatedResult.d.ts +0 -5
  35. package/dist/controllers/CreatedResult.d.ts.map +0 -1
  36. package/dist/controllers/CreatedResult.js +0 -13
  37. package/dist/controllers/CreatedResult.js.map +0 -1
  38. package/dist/controllers/DownloadFileResult.d.ts +0 -5
  39. package/dist/controllers/DownloadFileResult.d.ts.map +0 -1
  40. package/dist/controllers/DownloadFileResult.js +0 -13
  41. package/dist/controllers/DownloadFileResult.js.map +0 -1
  42. package/dist/controllers/ErrorResult.d.ts +0 -5
  43. package/dist/controllers/ErrorResult.d.ts.map +0 -1
  44. package/dist/controllers/ErrorResult.js +0 -13
  45. package/dist/controllers/ErrorResult.js.map +0 -1
  46. package/dist/controllers/ForbiddenResult.d.ts +0 -5
  47. package/dist/controllers/ForbiddenResult.d.ts.map +0 -1
  48. package/dist/controllers/ForbiddenResult.js +0 -13
  49. package/dist/controllers/ForbiddenResult.js.map +0 -1
  50. package/dist/controllers/GenericResult.d.ts +0 -6
  51. package/dist/controllers/GenericResult.d.ts.map +0 -1
  52. package/dist/controllers/GenericResult.js +0 -13
  53. package/dist/controllers/GenericResult.js.map +0 -1
  54. package/dist/controllers/NoContentResult.d.ts +0 -5
  55. package/dist/controllers/NoContentResult.d.ts.map +0 -1
  56. package/dist/controllers/NoContentResult.js +0 -13
  57. package/dist/controllers/NoContentResult.js.map +0 -1
  58. package/dist/controllers/NotFoundResult.d.ts +0 -5
  59. package/dist/controllers/NotFoundResult.d.ts.map +0 -1
  60. package/dist/controllers/NotFoundResult.js +0 -13
  61. package/dist/controllers/NotFoundResult.js.map +0 -1
  62. package/dist/controllers/OKResult.d.ts +0 -5
  63. package/dist/controllers/OKResult.d.ts.map +0 -1
  64. package/dist/controllers/OKResult.js +0 -13
  65. package/dist/controllers/OKResult.js.map +0 -1
  66. package/dist/controllers/SendFileResult.d.ts +0 -5
  67. package/dist/controllers/SendFileResult.d.ts.map +0 -1
  68. package/dist/controllers/SendFileResult.js +0 -13
  69. package/dist/controllers/SendFileResult.js.map +0 -1
  70. package/dist/controllers/UnauthorizedResult.d.ts +0 -5
  71. package/dist/controllers/UnauthorizedResult.d.ts.map +0 -1
  72. package/dist/controllers/UnauthorizedResult.js +0 -13
  73. package/dist/controllers/UnauthorizedResult.js.map +0 -1
  74. package/dist/controllers/base/ControllerBase.d.ts +0 -33
  75. package/dist/controllers/base/ControllerBase.d.ts.map +0 -1
  76. package/dist/controllers/base/ControllerBase.js +0 -84
  77. package/dist/controllers/base/ControllerBase.js.map +0 -1
  78. package/dist/decorators/controllers/ControllerDecorators.d.ts +0 -66
  79. package/dist/decorators/controllers/ControllerDecorators.d.ts.map +0 -1
  80. package/dist/decorators/controllers/ControllerDecorators.js +0 -256
  81. package/dist/decorators/controllers/ControllerDecorators.js.map +0 -1
  82. package/dist/decorators/documentation/DocumentationDecorators.d.ts +0 -24
  83. package/dist/decorators/documentation/DocumentationDecorators.d.ts.map +0 -1
  84. package/dist/decorators/documentation/DocumentationDecorators.js +0 -69
  85. package/dist/decorators/documentation/DocumentationDecorators.js.map +0 -1
  86. package/dist/decorators/metadata/MetadataDecorators.d.ts +0 -17
  87. package/dist/decorators/metadata/MetadataDecorators.d.ts.map +0 -1
  88. package/dist/decorators/metadata/MetadataDecorators.js +0 -67
  89. package/dist/decorators/metadata/MetadataDecorators.js.map +0 -1
  90. package/dist/decorators/validations/ValidationDecorators.d.ts +0 -53
  91. package/dist/decorators/validations/ValidationDecorators.d.ts.map +0 -1
  92. package/dist/decorators/validations/ValidationDecorators.js +0 -180
  93. package/dist/decorators/validations/ValidationDecorators.js.map +0 -1
  94. package/dist/dependencyInjection/DependecyService.d.ts +0 -33
  95. package/dist/dependencyInjection/DependecyService.d.ts.map +0 -1
  96. package/dist/dependencyInjection/DependecyService.js +0 -186
  97. package/dist/dependencyInjection/DependecyService.js.map +0 -1
  98. package/dist/dependencyInjection/IDIContext.d.ts +0 -9
  99. package/dist/dependencyInjection/IDIContext.d.ts.map +0 -1
  100. package/dist/dependencyInjection/IDIContext.js +0 -3
  101. package/dist/dependencyInjection/IDIContext.js.map +0 -1
  102. package/dist/documentation/CSS.d.ts +0 -7
  103. package/dist/documentation/CSS.d.ts.map +0 -1
  104. package/dist/documentation/CSS.js +0 -302
  105. package/dist/documentation/CSS.js.map +0 -1
  106. package/dist/documentation/Documentation.d.ts +0 -8
  107. package/dist/documentation/Documentation.d.ts.map +0 -1
  108. package/dist/documentation/Documentation.js +0 -89
  109. package/dist/documentation/Documentation.js.map +0 -1
  110. package/dist/documentation/HTML.d.ts +0 -5
  111. package/dist/documentation/HTML.d.ts.map +0 -1
  112. package/dist/documentation/HTML.js +0 -26
  113. package/dist/documentation/HTML.js.map +0 -1
  114. package/dist/documentation/JS.d.ts +0 -6
  115. package/dist/documentation/JS.d.ts.map +0 -1
  116. package/dist/documentation/JS.js +0 -419
  117. package/dist/documentation/JS.js.map +0 -1
  118. package/dist/enums/httpVerbs/HttpVerbs.d.ts +0 -7
  119. package/dist/enums/httpVerbs/HttpVerbs.d.ts.map +0 -1
  120. package/dist/enums/httpVerbs/HttpVerbs.js +0 -11
  121. package/dist/enums/httpVerbs/HttpVerbs.js.map +0 -1
  122. package/dist/exceptions/ArgumentNullException.d.ts +0 -4
  123. package/dist/exceptions/ArgumentNullException.d.ts.map +0 -1
  124. package/dist/exceptions/ArgumentNullException.js +0 -10
  125. package/dist/exceptions/ArgumentNullException.js.map +0 -1
  126. package/dist/exceptions/BodyParseException.d.ts +0 -4
  127. package/dist/exceptions/BodyParseException.d.ts.map +0 -1
  128. package/dist/exceptions/BodyParseException.js +0 -10
  129. package/dist/exceptions/BodyParseException.js.map +0 -1
  130. package/dist/exceptions/ControllerLoadException.d.ts +0 -4
  131. package/dist/exceptions/ControllerLoadException.d.ts.map +0 -1
  132. package/dist/exceptions/ControllerLoadException.js +0 -10
  133. package/dist/exceptions/ControllerLoadException.js.map +0 -1
  134. package/dist/exceptions/DecoratorException.d.ts +0 -4
  135. package/dist/exceptions/DecoratorException.d.ts.map +0 -1
  136. package/dist/exceptions/DecoratorException.js +0 -10
  137. package/dist/exceptions/DecoratorException.js.map +0 -1
  138. package/dist/exceptions/Exception.d.ts +0 -5
  139. package/dist/exceptions/Exception.d.ts.map +0 -1
  140. package/dist/exceptions/Exception.js +0 -10
  141. package/dist/exceptions/Exception.js.map +0 -1
  142. package/dist/exceptions/FileNotFoundException.d.ts +0 -4
  143. package/dist/exceptions/FileNotFoundException.d.ts.map +0 -1
  144. package/dist/exceptions/FileNotFoundException.js +0 -10
  145. package/dist/exceptions/FileNotFoundException.js.map +0 -1
  146. package/dist/exceptions/FindDependencyException.d.ts +0 -4
  147. package/dist/exceptions/FindDependencyException.d.ts.map +0 -1
  148. package/dist/exceptions/FindDependencyException.js +0 -10
  149. package/dist/exceptions/FindDependencyException.js.map +0 -1
  150. package/dist/exceptions/InvalidEntityException.d.ts +0 -4
  151. package/dist/exceptions/InvalidEntityException.d.ts.map +0 -1
  152. package/dist/exceptions/InvalidEntityException.js +0 -10
  153. package/dist/exceptions/InvalidEntityException.js.map +0 -1
  154. package/dist/exceptions/RegisterDependencyException.d.ts +0 -4
  155. package/dist/exceptions/RegisterDependencyException.d.ts.map +0 -1
  156. package/dist/exceptions/RegisterDependencyException.js +0 -10
  157. package/dist/exceptions/RegisterDependencyException.js.map +0 -1
  158. package/dist/file/AbstractFileService.d.ts +0 -12
  159. package/dist/file/AbstractFileService.d.ts.map +0 -1
  160. package/dist/file/AbstractFileService.js +0 -6
  161. package/dist/file/AbstractFileService.js.map +0 -1
  162. package/dist/file/AbstractMultiPartRequestService.d.ts +0 -17
  163. package/dist/file/AbstractMultiPartRequestService.d.ts.map +0 -1
  164. package/dist/file/AbstractMultiPartRequestService.js +0 -12
  165. package/dist/file/AbstractMultiPartRequestService.js.map +0 -1
  166. package/dist/file/File.d.ts +0 -6
  167. package/dist/file/File.d.ts.map +0 -1
  168. package/dist/file/File.js +0 -10
  169. package/dist/file/File.js.map +0 -1
  170. package/dist/file/FileService.d.ts +0 -13
  171. package/dist/file/FileService.d.ts.map +0 -1
  172. package/dist/file/FileService.js +0 -136
  173. package/dist/file/FileService.js.map +0 -1
  174. package/dist/file/FormidableMultiPartRequestService.d.ts +0 -5
  175. package/dist/file/FormidableMultiPartRequestService.d.ts.map +0 -1
  176. package/dist/file/FormidableMultiPartRequestService.js +0 -73
  177. package/dist/file/FormidableMultiPartRequestService.js.map +0 -1
  178. package/dist/index.d.ts +0 -85
  179. package/dist/index.d.ts.map +0 -1
  180. package/dist/index.js +0 -261
  181. package/dist/index.js.map +0 -1
  182. package/dist/interfaces/IApplication.d.ts +0 -15
  183. package/dist/interfaces/IApplication.d.ts.map +0 -1
  184. package/dist/interfaces/IApplication.js +0 -3
  185. package/dist/interfaces/IApplication.js.map +0 -1
  186. package/dist/interfaces/IApplicationConfiguration.d.ts +0 -18
  187. package/dist/interfaces/IApplicationConfiguration.d.ts.map +0 -1
  188. package/dist/interfaces/IApplicationConfiguration.js +0 -3
  189. package/dist/interfaces/IApplicationConfiguration.js.map +0 -1
  190. package/dist/interfaces/IController.d.ts +0 -6
  191. package/dist/interfaces/IController.d.ts.map +0 -1
  192. package/dist/interfaces/IController.js +0 -3
  193. package/dist/interfaces/IController.js.map +0 -1
  194. package/dist/metadata/FunctionAnalizer.d.ts +0 -10
  195. package/dist/metadata/FunctionAnalizer.d.ts.map +0 -1
  196. package/dist/metadata/FunctionAnalizer.js +0 -57
  197. package/dist/metadata/FunctionAnalizer.js.map +0 -1
  198. package/dist/metadata/OwnMetaDataContainer.d.ts +0 -13
  199. package/dist/metadata/OwnMetaDataContainer.d.ts.map +0 -1
  200. package/dist/metadata/OwnMetaDataContainer.js +0 -43
  201. package/dist/metadata/OwnMetaDataContainer.js.map +0 -1
  202. package/dist/metadata/Type.d.ts +0 -10
  203. package/dist/metadata/Type.d.ts.map +0 -1
  204. package/dist/metadata/Type.js +0 -252
  205. package/dist/metadata/Type.js.map +0 -1
  206. package/dist/midlewares/IMidleware.d.ts +0 -20
  207. package/dist/midlewares/IMidleware.d.ts.map +0 -1
  208. package/dist/midlewares/IMidleware.js +0 -3
  209. package/dist/midlewares/IMidleware.js.map +0 -1
  210. package/dist/utils/Utils.d.ts +0 -4
  211. package/dist/utils/Utils.d.ts.map +0 -1
  212. package/dist/utils/Utils.js +0 -11
  213. package/dist/utils/Utils.js.map +0 -1
@@ -1,13 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const GenericResult_1 = __importDefault(require("./GenericResult"));
7
- class OKResult extends GenericResult_1.default {
8
- constructor(result) {
9
- super(200, result);
10
- }
11
- }
12
- exports.default = OKResult;
13
- //# sourceMappingURL=OKResult.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OKResult.js","sourceRoot":"","sources":["../../controllers/OKResult.ts"],"names":[],"mappings":";;;;;AAAA,oEAA4C;AAI5C,MAAqB,QAAY,SAAQ,uBAAgB;IAErD,YAAY,MAAU;QAClB,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACvB,CAAC;CACJ;AALD,2BAKC"}
@@ -1,5 +0,0 @@
1
- import GenericResult from "./GenericResult";
2
- export default class SendFileResult<T> extends GenericResult<T> {
3
- constructor(result?: T);
4
- }
5
- //# sourceMappingURL=SendFileResult.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SendFileResult.d.ts","sourceRoot":"","sources":["../../controllers/SendFileResult.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,MAAM,CAAC,OAAO,OAAO,cAAc,CAAC,CAAC,CAAE,SAAQ,aAAa,CAAC,CAAC,CAAC;gBAC/C,MAAM,CAAC,EAAE,CAAC;CAGzB"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const GenericResult_1 = __importDefault(require("./GenericResult"));
7
- class SendFileResult extends GenericResult_1.default {
8
- constructor(result) {
9
- super(200, result);
10
- }
11
- }
12
- exports.default = SendFileResult;
13
- //# sourceMappingURL=SendFileResult.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SendFileResult.js","sourceRoot":"","sources":["../../controllers/SendFileResult.ts"],"names":[],"mappings":";;;;;AAAA,oEAA4C;AAE5C,MAAqB,cAAkB,SAAQ,uBAAgB;IAC3D,YAAY,MAAU;QAClB,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACvB,CAAC;CACJ;AAJD,iCAIC"}
@@ -1,5 +0,0 @@
1
- import GenericResult from "./GenericResult";
2
- export default class UnauthorizedResult<T> extends GenericResult<T> {
3
- constructor(result?: T);
4
- }
5
- //# sourceMappingURL=UnauthorizedResult.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UnauthorizedResult.d.ts","sourceRoot":"","sources":["../../controllers/UnauthorizedResult.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAI5C,MAAM,CAAC,OAAO,OAAO,kBAAkB,CAAC,CAAC,CAAE,SAAQ,aAAa,CAAC,CAAC,CAAC;gBAEnD,MAAM,CAAC,EAAE,CAAC;CAGzB"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const GenericResult_1 = __importDefault(require("./GenericResult"));
7
- class UnauthorizedResult extends GenericResult_1.default {
8
- constructor(result) {
9
- super(401, result);
10
- }
11
- }
12
- exports.default = UnauthorizedResult;
13
- //# sourceMappingURL=UnauthorizedResult.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UnauthorizedResult.js","sourceRoot":"","sources":["../../controllers/UnauthorizedResult.ts"],"names":[],"mappings":";;;;;AAAA,oEAA4C;AAI5C,MAAqB,kBAAsB,SAAQ,uBAAgB;IAE/D,YAAY,MAAU;QAClB,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACvB,CAAC;CACJ;AALD,qCAKC"}
@@ -1,33 +0,0 @@
1
- import IDIContext, { IDIItem } from "../../dependencyInjection/IDIContext";
2
- import IController from "../../interfaces/IController";
3
- import { Request, Response } from 'express';
4
- import AcceptedResult from "../AcceptedResult";
5
- import BadRequestResult from "../BadRequestResult";
6
- import CreatedResult from "../CreatedResult";
7
- import ErrorResult from "../ErrorResult";
8
- import ForbiddenResult from "../ForbiddenResult";
9
- import NoContentResult from "../NoContentResult";
10
- import NotFoundResult from "../NotFoundResult";
11
- import OKResult from "../OKResult";
12
- import UnauthorizedResult from "../UnauthorizedResult";
13
- import SendFileResult from "../SendFileResult";
14
- import DownloadFileResult from "../DownloadFileResult";
15
- export declare class ControllerBase implements IController, IDIContext {
16
- Request: Request;
17
- Response: Response;
18
- Intances: IDIItem[];
19
- constructor();
20
- OK<T>(result?: T): OKResult<T>;
21
- Created<T>(result?: T): CreatedResult<T>;
22
- Accepted<T>(result?: T): AcceptedResult<T>;
23
- NoContent<T>(result?: T): NoContentResult<T>;
24
- SendFile(path: string): SendFileResult<string>;
25
- DownloadFile(path: string): DownloadFileResult<string>;
26
- BadRequest<T>(result?: T): BadRequestResult<T>;
27
- Unauthorized<T>(result?: T): UnauthorizedResult<T>;
28
- Forbidden<T>(result?: T): ForbiddenResult<T>;
29
- NotFound<T>(result?: T): NotFoundResult<T>;
30
- Error<T>(result?: T): ErrorResult<T>;
31
- SendResponse<T>(status: number, result?: T): T | undefined;
32
- }
33
- //# sourceMappingURL=ControllerBase.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ControllerBase.d.ts","sourceRoot":"","sources":["../../../controllers/base/ControllerBase.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,WAAW,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAC,OAAO,E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C,EAAG,CAAC,GAAI,kBAAkB,CAAC,CAAC,CAAC;IAKpD,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,EAAG,CAAC,GAAI,eAAe,CAAC,CAAC,CAAC;IAK9C,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC,EAAG,CAAC,GAAI,cAAc,CAAC,CAAC,CAAC;IAK5C,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,EAAG,CAAC,GAAI,WAAW,CAAC,CAAC,CAAC;IAKtC,YAAY,CAAC,CAAC,EAAE,MAAM,EAAG,MAAM,EAAE,MAAM,CAAC,EAAG,CAAC,GAAI,CAAC,GAAG,SAAS;CAkBvE"}
@@ -1,84 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ControllerBase = void 0;
7
- const AcceptedResult_1 = __importDefault(require("../AcceptedResult"));
8
- const BadRequestResult_1 = __importDefault(require("../BadRequestResult"));
9
- const CreatedResult_1 = __importDefault(require("../CreatedResult"));
10
- const ErrorResult_1 = __importDefault(require("../ErrorResult"));
11
- const ForbiddenResult_1 = __importDefault(require("../ForbiddenResult"));
12
- const NoContentResult_1 = __importDefault(require("../NoContentResult"));
13
- const NotFoundResult_1 = __importDefault(require("../NotFoundResult"));
14
- const OKResult_1 = __importDefault(require("../OKResult"));
15
- const UnauthorizedResult_1 = __importDefault(require("../UnauthorizedResult"));
16
- const SendFileResult_1 = __importDefault(require("../SendFileResult"));
17
- const DownloadFileResult_1 = __importDefault(require("../DownloadFileResult"));
18
- const fs_1 = __importDefault(require("fs"));
19
- const FileNotFoundException_1 = __importDefault(require("../../exceptions/FileNotFoundException"));
20
- const ArgumentNullException_1 = __importDefault(require("../../exceptions/ArgumentNullException"));
21
- class ControllerBase {
22
- constructor() {
23
- this.Request = {};
24
- this.Response = {};
25
- this.Intances = [];
26
- }
27
- OK(result) {
28
- return new OKResult_1.default(result);
29
- }
30
- Created(result) {
31
- return new CreatedResult_1.default(result);
32
- }
33
- Accepted(result) {
34
- return new AcceptedResult_1.default(result);
35
- }
36
- NoContent(result) {
37
- return new NoContentResult_1.default(result);
38
- }
39
- SendFile(path) {
40
- if (!path)
41
- throw new ArgumentNullException_1.default(`The path of the file is required on a SendFile response`);
42
- if (!fs_1.default.existsSync(path))
43
- throw new FileNotFoundException_1.default(`can not access the file: ${path}`);
44
- return new SendFileResult_1.default(path);
45
- }
46
- DownloadFile(path) {
47
- if (!path)
48
- throw new ArgumentNullException_1.default(`The path of the file is required on a DownloadFile response`);
49
- if (!fs_1.default.existsSync(path))
50
- throw new FileNotFoundException_1.default(`can not access the file: ${path}`);
51
- return new DownloadFileResult_1.default(path);
52
- }
53
- BadRequest(result) {
54
- return new BadRequestResult_1.default(result);
55
- }
56
- Unauthorized(result) {
57
- return new UnauthorizedResult_1.default(result);
58
- }
59
- Forbidden(result) {
60
- return new ForbiddenResult_1.default(result);
61
- }
62
- NotFound(result) {
63
- return new NotFoundResult_1.default(result);
64
- }
65
- Error(result) {
66
- return new ErrorResult_1.default(result);
67
- }
68
- SendResponse(status, result) {
69
- this.Response.status(status);
70
- if (result) {
71
- if (typeof result == "object")
72
- this.Response.json(result);
73
- else if (typeof result == "number")
74
- this.Response.send(result.toString());
75
- else
76
- this.Response.send(result);
77
- }
78
- else
79
- this.Response.end();
80
- return result;
81
- }
82
- }
83
- exports.ControllerBase = ControllerBase;
84
- //# sourceMappingURL=ControllerBase.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ControllerBase.js","sourceRoot":"","sources":["../../../controllers/base/ControllerBase.ts"],"names":[],"mappings":";;;;;;AAGA,uEAA+C;AAC/C,2EAAmD;AACnD,qEAA6C;AAC7C,iEAAyC;AACzC,yEAAiD;AACjD,yEAAiD;AACjD,uEAA+C;AAC/C,2DAAmC;AACnC,+EAAuD;AACvD,uEAA+C;AAC/C,+EAAuD;AACvD,4CA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MAAM,CAAC,CAAC;IAC1C,CAAC;IAEM,SAAS,CAAI,MAAW;QAE3B,OAAO,IAAI,yBAAe,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC;IAEM,QAAQ,CAAI,MAAW;QAE1B,OAAO,IAAI,wBAAc,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;IAEM,KAAK,CAAI,MAAW;QAEvB,OAAO,IAAI,qBAAW,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAEM,YAAY,CAAI,MAAe,EAAE,MAAW;QAE/C,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAE7B,IAAG,MAAM,EAAC,CAAC;YACP,IAAG,OAAO,MAAM,IAAI,QAAQ;gBACxB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;iBAC1B,IAAG,OAAO,MAAM,IAAI,QAAQ;gBAC7B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;;gBAEtC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACnC,CAAC;;YAEG,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;QAExB,OAAO,MAAM,CAAC;IAClB,CAAC;CAEJ;AAhGD,wCAgGC"}
@@ -1,66 +0,0 @@
1
- import 'reflect-metadata';
2
- import { HTTPVerbs } from '../../enums/httpVerbs/HttpVerbs';
3
- import IController from '../../interfaces/IController';
4
- import IMidleware, { IRequestResultHandler } from '../../midlewares/IMidleware';
5
- export default class ControllersDecorators {
6
- constructor();
7
- private static _routeKeyMetadata;
8
- private static _actionVerbKeyMetadata;
9
- private static _actionNameKeyMetadata;
10
- private static _controllerMidlewaresKeyMetadata;
11
- private static _actionsMidlewaresKeyMetadata;
12
- private static _validateBodyKeyMetadata;
13
- private static _fromQueryKeyMetadata;
14
- private static _fromBodyKeyMetadata;
15
- private static _fromFilesKeyMetadata;
16
- private static _maxFilesSizeKeyMetadata;
17
- private static _controllerMidlewaresAfterKeyMetadata;
18
- static Route(route?: string): (target: Function) => void;
19
- static GetRoute(controller: IController): string | undefined;
20
- static Validate(): (target: Function) => void;
21
- static IsToValidate(controller: IController): boolean;
22
- static UseBefore(midleware: IMidleware): (target: Function) => void;
23
- static UseAfter(resultHandler: IRequestResultHandler): (target: Function) => void;
24
- static GetMidlewares(controller: IController): IMidleware[];
25
- static GetMidlewaresAfter(controller: IController): IRequestResultHandler[];
26
- static RunBefore(midleware: IMidleware): (target: Object, methodName: string, propertyDescriptor: PropertyDescriptor) => void;
27
- static RunAfter(resultHandler: IRequestResultHandler): (target: Object, methodName: string, propertyDescriptor: PropertyDescriptor) => void;
28
- static GetBefores(controller: IController, methodName: string): IMidleware[];
29
- static GetAfters(controller: IController, methodName: string): IRequestResultHandler[];
30
- static Verb(verb: HTTPVerbs, actionName?: String): (target: Object, methodName: string, propertyDescriptor: PropertyDescriptor) => void;
31
- static GetVerb(target: IController, methodName: string): HTTPVerbs | undefined;
32
- static Action(actionName?: String): (target: Object, methodName: string, propertyDescriptor: PropertyDescriptor) => void;
33
- static GetAction(target: IController, methodName: string): string | undefined;
34
- static RequiredFromBodyArg(bodyPropName?: string): (target: Object, methodName: string, parameterIndex: number) => void;
35
- static OptionalFromBodyArg(bodyPropName?: string): (target: Object, methodName: string, parameterIndex: number) => void;
36
- static FromBody(bodyPropName?: string, required?: boolean): (target: Object, methodName: string, parameterIndex: number) => void;
37
- static GetFromBodyArgs(target: Function, method: string): {
38
- Index: number;
39
- Field?: string;
40
- Type: Function;
41
- Required: boolean;
42
- }[];
43
- static OptionalFromFilesArg(fileName?: string, maxFileSizeMB?: number): (target: Object, methodName: string, parameterIndex: number) => void;
44
- static RequiredFromFilesArg(fileName?: string): (target: Object, methodName: string, parameterIndex: number) => void;
45
- static FromFiles(fileName?: string, required?: boolean): (target: Object, methodName: string, parameterIndex: number) => void;
46
- static GetFromFilesArgs(target: Function, method: string): {
47
- Index: number;
48
- FileName?: string;
49
- Required: boolean;
50
- }[];
51
- static MaxFilesSize(bytes: number): (target: Function) => void;
52
- static GetMaxFilesSize<T extends IController>(target: new (...args: any) => T): number;
53
- static RequiredFromQueryArg(bodyPropName?: string): (target: Object, methodName: string, parameterIndex: number) => void;
54
- static OptionalFromQueryArg(bodyPropName?: string): (target: Object, methodName: string, parameterIndex: number) => void;
55
- static FromQuery(bodyPropName?: string, required?: boolean): (target: Object, methodName: string, parameterIndex: number) => void;
56
- static GetFromQueryArgs(target: Function, method: string): {
57
- Index: number;
58
- Field: string;
59
- Type: Function;
60
- Required: boolean;
61
- }[];
62
- static GetNonDecoratedArguments(empty: IController, method: Symbol | string, fromBody: ReturnType<typeof ControllersDecorators.GetFromBodyArgs>, fromQuery: ReturnType<typeof ControllersDecorators.GetFromQueryArgs>, fromFiles: ReturnType<typeof ControllersDecorators.GetFromFilesArgs>): void;
63
- private static SetMetaData;
64
- private static GetMetaData;
65
- }
66
- //# sourceMappingURL=ControllerDecorators.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ControllerDecorators.d.ts","sourceRoot":"","sources":["../../../decorators/controllers/ControllerDecorators.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,WAAW,MAAM,8BAA8B,CAAC;AACvD,OAAO,UAAU,EAAE,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAKhF,MAAM,CAAC,OAAO,OAAO,qBAAqB;;IAItC,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAA0B;IAC1D,OAAO,CAAC,MAAM,CAAC,sBAAsB,CAAqB;IAC1D,OAAO,CAAC,MAAM,CAAC,sBAAsB,CAAqB;IAC1D,OAAO,CAAC,MAAM,CAAC,gCAAgC,CAAkC;IACjF,OAAO,CAAC,MAAM,CAAC,6BAA6B,CAA8B;IAC1E,OAAO,CAAC,MAAM,C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,KAAK,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC,GAAI,MAAM;WAMjF,oBAAoB,CAAC,YAAY,CAAC,EAAG,MAAM,YAY3B,MAAM,cAAc,MAAM,kBAAmB,MAAM;WAPnE,oBAAoB,CAAC,YAAY,CAAC,EAAG,MAAM,YAO3B,MAAM,cAAc,MAAM,kBAAmB,MAAM;WAFnE,SAAS,CAAC,YAAY,CAAC,EAAG,MAAM,EAAE,QAAQ,CAAC,EAAG,OAAO,YAErC,MAAM,cAAc,MAAM,kBAAmB,MAAM;WAuBnE,gBAAgB,CAAC,MAAM,EAAG,QAAQ,EAAE,MAAM,EAAG,MAAM,GAAK;QAAC,KAAK,EAAG,MAAM,CAAC;QAAC,KAAK,EAAG,MAAM,CAAC;QAAC,IAAI,EAAG,QAAQ,CAAC;QAAC,QAAQ,EAAG,OAAO,CAAA;KAAE,EAAE;WAMhI,wBAAwB,CAClC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAC1C,QAAQ,EAAE,UAAU,CAAC,OAAO,qBAAqB,CAAC,eAAe,CAAC,EAClE,SAAS,EAAE,UAAU,CAAC,OAAO,qBAAqB,CAAC,gBAAgB,CAAC,EACpE,SAAS,EAAE,UAAU,CAAC,OAAO,qBAAqB,CAAC,gBAAgB,CAAC,GAAI,IAAI;IA0DjF,OAAO,CAAC,MAAM,CAAC,WAAW;IAS1B,OAAO,CAAC,MAAM,CAAC,WAAW;CAU7B"}
@@ -1,256 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- require("reflect-metadata");
7
- const FunctionAnalizer_1 = __importDefault(require("../../metadata/FunctionAnalizer"));
8
- const File_1 = __importDefault(require("../../file/File"));
9
- const DecoratorException_1 = __importDefault(require("../../exceptions/DecoratorException"));
10
- class ControllersDecorators {
11
- constructor() { }
12
- static Route(route) {
13
- return function (target) {
14
- let value = route !== null && route !== void 0 ? route : target.name.toLocaleLowerCase().replace("controller", "");
15
- Reflect.defineMetadata(ControllersDecorators._routeKeyMetadata, value, target);
16
- };
17
- }
18
- static GetRoute(controller) {
19
- let meta = Reflect.getMetadata(ControllersDecorators._routeKeyMetadata, controller.constructor);
20
- let cName = controller.constructor.name.toLocaleLowerCase().replace("controller", "");
21
- if (!meta)
22
- meta = cName;
23
- meta = meta.toLocaleLowerCase().replace("[controller]", cName);
24
- if (meta && meta[0] != '/') {
25
- return `/${meta}`.toLocaleLowerCase();
26
- }
27
- return meta === null || meta === void 0 ? void 0 : meta.toLocaleLowerCase();
28
- }
29
- static Validate() {
30
- return function (target) {
31
- Reflect.defineMetadata(ControllersDecorators._validateBodyKeyMetadata, true, target);
32
- };
33
- }
34
- static IsToValidate(controller) {
35
- var _a;
36
- return (_a = Reflect.getMetadata(ControllersDecorators._validateBodyKeyMetadata, controller.constructor)) !== null && _a !== void 0 ? _a : false;
37
- }
38
- static UseBefore(midleware) {
39
- return function (target) {
40
- var _a;
41
- let current = (_a = Reflect.getMetadata(ControllersDecorators._controllerMidlewaresKeyMetadata, target)) !== null && _a !== void 0 ? _a : [];
42
- current.push(midleware);
43
- Reflect.defineMetadata(ControllersDecorators._controllerMidlewaresKeyMetadata, current, target);
44
- };
45
- }
46
- static UseAfter(resultHandler) {
47
- return function (target) {
48
- var _a;
49
- let current = (_a = Reflect.getMetadata(ControllersDecorators._controllerMidlewaresAfterKeyMetadata, target)) !== null && _a !== void 0 ? _a : [];
50
- current.push(resultHandler);
51
- Reflect.defineMetadata(ControllersDecorators._controllerMidlewaresAfterKeyMetadata, current, target);
52
- };
53
- }
54
- static GetMidlewares(controller) {
55
- var _a;
56
- return (_a = Reflect.getMetadata(ControllersDecorators._controllerMidlewaresKeyMetadata, controller.constructor)) !== null && _a !== void 0 ? _a : [];
57
- }
58
- static GetMidlewaresAfter(controller) {
59
- var _a;
60
- return (_a = Reflect.getMetadata(ControllersDecorators._controllerMidlewaresAfterKeyMetadata, controller.constructor)) !== null && _a !== void 0 ? _a : [];
61
- }
62
- static RunBefore(midleware) {
63
- return function (target, methodName, propertyDescriptor) {
64
- var _a;
65
- let current = (_a = Reflect.getMetadata(ControllersDecorators._actionsMidlewaresKeyMetadata, target, methodName)) !== null && _a !== void 0 ? _a : [];
66
- current.push(midleware);
67
- ControllersDecorators.SetMetaData(ControllersDecorators._actionsMidlewaresKeyMetadata, target, methodName, current);
68
- };
69
- }
70
- static RunAfter(resultHandler) {
71
- return function (target, methodName, propertyDescriptor) {
72
- var _a;
73
- let current = (_a = Reflect.getMetadata(ControllersDecorators._controllerMidlewaresAfterKeyMetadata, target, methodName)) !== null && _a !== void 0 ? _a : [];
74
- current.push(resultHandler);
75
- ControllersDecorators.SetMetaData(ControllersDecorators._controllerMidlewaresAfterKeyMetadata, target, methodName, current);
76
- };
77
- }
78
- static GetBefores(controller, methodName) {
79
- var _a;
80
- return (_a = this.GetMetaData(ControllersDecorators._actionsMidlewaresKeyMetadata, controller, methodName)) !== null && _a !== void 0 ? _a : [];
81
- }
82
- static GetAfters(controller, methodName) {
83
- var _a;
84
- return (_a = this.GetMetaData(ControllersDecorators._controllerMidlewaresAfterKeyMetadata, controller, methodName)) !== null && _a !== void 0 ? _a : [];
85
- }
86
- static Verb(verb, actionName) {
87
- return function (target, methodName, propertyDescriptor) {
88
- ControllersDecorators.SetMetaData(ControllersDecorators._actionNameKeyMetadata, target, methodName, actionName !== null && actionName !== void 0 ? actionName : methodName.toLocaleLowerCase());
89
- ControllersDecorators.SetMetaData(ControllersDecorators._actionVerbKeyMetadata, target, methodName, verb);
90
- };
91
- }
92
- static GetVerb(target, methodName) {
93
- let meta = this.GetMetaData(ControllersDecorators._actionVerbKeyMetadata, target, methodName);
94
- return meta;
95
- }
96
- static Action(actionName) {
97
- return function (target, methodName, propertyDescriptor) {
98
- ControllersDecorators.SetMetaData(ControllersDecorators._actionNameKeyMetadata, target, methodName, actionName !== null && actionName !== void 0 ? actionName : methodName.toLocaleLowerCase());
99
- };
100
- }
101
- static GetAction(target, methodName) {
102
- let meta = this.GetMetaData(ControllersDecorators._actionNameKeyMetadata, target, methodName);
103
- if (meta && meta[0] != '/') {
104
- return `/${meta}`.toLocaleLowerCase();
105
- }
106
- return meta === null || meta === void 0 ? void 0 : meta.toLocaleLowerCase();
107
- }
108
- static RequiredFromBodyArg(bodyPropName) {
109
- return ControllersDecorators.FromBody(bodyPropName, true);
110
- }
111
- static OptionalFromBodyArg(bodyPropName) {
112
- return ControllersDecorators.FromBody(bodyPropName, false);
113
- }
114
- static FromBody(bodyPropName, required) {
115
- return function (target, methodName, parameterIndex) {
116
- let meta = ControllersDecorators.GetFromBodyArgs(target.constructor, methodName);
117
- let params = FunctionAnalizer_1.default.ExtractParamsList(target, target[methodName]);
118
- let item = meta.filter(x => x.Index == parameterIndex);
119
- let thisParam = params.filter(s => s.Index == parameterIndex)[0];
120
- if (item.length == 0)
121
- meta.push({ Index: parameterIndex, Field: bodyPropName, Type: thisParam.Type, Required: required !== null && required !== void 0 ? required : true });
122
- else {
123
- item[0].Field = bodyPropName;
124
- item[0].Type = thisParam.Type;
125
- }
126
- Reflect.defineMetadata(ControllersDecorators._fromBodyKeyMetadata, meta, target.constructor, methodName);
127
- };
128
- }
129
- static GetFromBodyArgs(target, method) {
130
- var _a;
131
- return (_a = Reflect.getMetadata(ControllersDecorators._fromBodyKeyMetadata, target, method)) !== null && _a !== void 0 ? _a : [];
132
- }
133
- static OptionalFromFilesArg(fileName, maxFileSizeMB) {
134
- return ControllersDecorators.FromFiles(fileName, false);
135
- }
136
- static RequiredFromFilesArg(fileName) {
137
- return ControllersDecorators.FromFiles(fileName, true);
138
- }
139
- static FromFiles(fileName, required) {
140
- return function (target, methodName, parameterIndex) {
141
- let meta = ControllersDecorators.GetFromFilesArgs(target.constructor, methodName);
142
- let params = FunctionAnalizer_1.default.ExtractParamsList(target, target[methodName]);
143
- let item = meta.filter(x => x.Index == parameterIndex);
144
- let thisParam = params.filter(s => s.Index == parameterIndex)[0];
145
- if (thisParam.Type != File_1.default)
146
- throw new DecoratorException_1.default('FromFiles decorator must be used in a web_api_base File type parameter');
147
- if (item.length == 0)
148
- meta.push({ Index: parameterIndex, FileName: fileName, Required: required !== null && required !== void 0 ? required : true });
149
- else {
150
- item[0].FileName = fileName;
151
- }
152
- Reflect.defineMetadata(ControllersDecorators._fromFilesKeyMetadata, meta, target.constructor, methodName);
153
- };
154
- }
155
- static GetFromFilesArgs(target, method) {
156
- var _a;
157
- return (_a = Reflect.getMetadata(ControllersDecorators._fromFilesKeyMetadata, target, method)) !== null && _a !== void 0 ? _a : [];
158
- }
159
- static MaxFilesSize(bytes) {
160
- return function (target) {
161
- Reflect.defineMetadata(ControllersDecorators._maxFilesSizeKeyMetadata, bytes, target);
162
- };
163
- }
164
- static GetMaxFilesSize(target) {
165
- var _a;
166
- return (_a = Reflect.getMetadata(ControllersDecorators._maxFilesSizeKeyMetadata, target)) !== null && _a !== void 0 ? _a : 0;
167
- }
168
- static RequiredFromQueryArg(bodyPropName) {
169
- return ControllersDecorators.FromQuery(bodyPropName, true);
170
- }
171
- static OptionalFromQueryArg(bodyPropName) {
172
- return ControllersDecorators.FromQuery(bodyPropName, false);
173
- }
174
- static FromQuery(bodyPropName, required) {
175
- return function (target, methodName, parameterIndex) {
176
- let meta = ControllersDecorators.GetFromQueryArgs(target.constructor, methodName);
177
- let params = FunctionAnalizer_1.default.ExtractParamsList(target, target[methodName]);
178
- let thisParam = params.filter(s => s.Index == parameterIndex)[0];
179
- let item = meta.filter(x => x.Index == parameterIndex);
180
- if (item.length == 0)
181
- meta.push({ Index: parameterIndex, Field: bodyPropName !== null && bodyPropName !== void 0 ? bodyPropName : thisParam.Name, Type: thisParam.Type, Required: required !== null && required !== void 0 ? required : true });
182
- else {
183
- item[0].Field = bodyPropName !== null && bodyPropName !== void 0 ? bodyPropName : thisParam.Name;
184
- item[0].Type = thisParam.Type;
185
- }
186
- Reflect.defineMetadata(ControllersDecorators._fromQueryKeyMetadata, meta, target.constructor, methodName);
187
- };
188
- }
189
- static GetFromQueryArgs(target, method) {
190
- var _a;
191
- return (_a = Reflect.getMetadata(ControllersDecorators._fromQueryKeyMetadata, target, method)) !== null && _a !== void 0 ? _a : [];
192
- }
193
- static GetNonDecoratedArguments(empty, method, fromBody, fromQuery, fromFiles) {
194
- var _a, _b;
195
- let ts = ((_b = ((_a = Reflect.getMetadata("design:paramtypes", empty, method.toString())) !== null && _a !== void 0 ? _a : Reflect.getMetadata("design:paramtypes", empty.constructor, method.toString()))) !== null && _b !== void 0 ? _b : []);
196
- ts.forEach((e, i) => {
197
- if (fromBody.filter(s => s.Index == i).length == 0) {
198
- if ([Date, String, Number, Boolean, File_1.default].filter(t => t == e).length == 0)
199
- fromBody.push({ Index: i, Type: e, Required: true });
200
- }
201
- if (fromFiles.filter(s => s.Index == i).length == 0) {
202
- if (e == File_1.default)
203
- fromFiles.push({ Index: i, Required: true });
204
- }
205
- if (fromQuery.filter(s => s.Index == i).length == 0) {
206
- if ([Date, String, Number, Boolean].filter(t => t == e).length > 0) {
207
- try {
208
- let paramName = '';
209
- if (empty[method.toString()].name != '') {
210
- let funcParameters = FunctionAnalizer_1.default.ExtractParamsList(empty, empty[method.toString()]);
211
- let thisParameter = funcParameters.filter(p => p.Index == i);
212
- if (thisParameter.length > 0)
213
- paramName = thisParameter[0].Name;
214
- }
215
- else {
216
- let funcParameters = FunctionAnalizer_1.default.GetParametersNames(empty.constructor.toString(), method.toString());
217
- if (funcParameters.length == 0 && empty.__proto__.__proto__ != undefined)
218
- funcParameters = FunctionAnalizer_1.default.GetParametersNames(empty.__proto__.__proto__.constructor.toString(), method.toString());
219
- if (funcParameters.length > i)
220
- paramName = funcParameters[i];
221
- }
222
- fromQuery.push({ Field: paramName, Index: i, Required: true, Type: e });
223
- }
224
- catch (_a) {
225
- fromQuery.push({ Field: "", Index: i, Required: true, Type: e });
226
- }
227
- }
228
- }
229
- });
230
- }
231
- static SetMetaData(key, target, methodName, value) {
232
- var meta = Reflect.getOwnMetadata(key, target, methodName);
233
- if (!meta)
234
- Reflect.defineMetadata(key, value, target, methodName);
235
- }
236
- static GetMetaData(key, target, methodName) {
237
- var meta = Reflect.getMetadata(key, target, methodName);
238
- if (meta != undefined)
239
- return meta;
240
- else
241
- return undefined;
242
- }
243
- }
244
- ControllersDecorators._routeKeyMetadata = "meta:controllerRoute";
245
- ControllersDecorators._actionVerbKeyMetadata = "meta:actionVerb";
246
- ControllersDecorators._actionNameKeyMetadata = "meta:actionName";
247
- ControllersDecorators._controllerMidlewaresKeyMetadata = "meta:controllerMidlewaresKey";
248
- ControllersDecorators._actionsMidlewaresKeyMetadata = "meta:actionMidlewaresKey";
249
- ControllersDecorators._validateBodyKeyMetadata = "meta:validateBodyKey";
250
- ControllersDecorators._fromQueryKeyMetadata = "meta:fromQueryKey";
251
- ControllersDecorators._fromBodyKeyMetadata = "meta:fromBodyKey";
252
- ControllersDecorators._fromFilesKeyMetadata = "meta:fromFilesKey";
253
- ControllersDecorators._maxFilesSizeKeyMetadata = "meta:maxFilesSizeKey";
254
- ControllersDecorators._controllerMidlewaresAfterKeyMetadata = "meta:controllerMidlewaresAfterKey";
255
- exports.default = ControllersDecorators;
256
- //# sourceMappingURL=ControllerDecorators.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ControllerDecorators.js","sourceRoot":"","sources":["../../../decorators/controllers/ControllerDecorators.ts"],"names":[],"mappings":";;;;;AAAA,4BAA0B;AAK1B,uFAA+D;AAC/D,2DAAmC;AACnC,6FAAqE;AAErE,MAAqB,qBAAqB;IAEtC,gBAAc,CAAC;IAeR,MAAM,CAAC,KAAK,CAAC,KAAe;QAE/B,OAAO,UAAU,MAAiB;YAE9B,IAAI,KAAK,GAAG,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,MAAM,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,OAAO,CAAC,YAAY,EAAC,EAAE,CAAC,C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AAC,CAAC;oBACrE,CAAC;gBACL,CAAC;YACL,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IAEO,MAAM,CAAC,WAAW,CAAI,GAAW,EAAE,MAAe,EAAE,UAAmB,EAAE,KAAS;QAEtF,IAAI,IAAI,GAAG,OAAO,CAAC,cAAc,CAAC,GAAG,EAAE,MAAgB,EAAE,UAAU,CAAC,CAAC;QAErE,IAAG,CAAC,IAAI;YACJ,OAAO,CAAC,cAAc,CAAC,GAAG,EAAE,KAAK,EAAE,MAAgB,EAAE,UAAU,CAAC,CAAC;IACzE,CAAC;IAGO,MAAM,CAAC,WAAW,CAAI,GAAW,EAAE,MAAe,EAAE,UAAmB;QAE3E,IAAI,IAAI,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;QAExD,IAAG,IAAI,IAAI,SAAS;YAChB,OAAO,IAAS,CAAC;;YAEjB,OAAO,SAAS,CAAC;IACzB,CAAC;;AAnYc,uCAAiB,GAAG,sBAAsB,CAAC;AAC3C,4CAAsB,GAAG,iBAAiB,CAAC;AAC3C,4CAAsB,GAAG,iBAAiB,CAAC;AAC3C,sDAAgC,GAAG,8BAA8B,CAAC;AAClE,mDAA6B,GAAG,0BAA0B,CAAC;AAC3D,8CAAwB,GAAG,sBAAsB,CAAC;AAClD,2CAAqB,GAAG,mBAAmB,CAAC;AAC5C,0CAAoB,GAAG,kBAAkB,CAAC;AAC1C,2CAAqB,GAAG,mBAAmB,CAAC;AAC5C,8CAAwB,GAAG,sBAAsB,CAAC;AAClD,2DAAqC,GAAG,mCAAmC,CAAC;kBAd1E,qBAAqB"}
@@ -1,24 +0,0 @@
1
- import 'reflect-metadata';
2
- export declare class DocumentationDecorators {
3
- constructor();
4
- private static _descriptionKeyMetadata;
5
- private static _requestKeyMetadata;
6
- private static _responseKeyMetadata;
7
- private static _controllerUseHeaderKeyMetadata;
8
- private static _controllerActionUseHeaderKeyMetadata;
9
- static Description(description: string): (target: Object, methodName: string, propertyDescriptor: PropertyDescriptor) => void;
10
- static GetDescription(target: Function, method: string): string | undefined;
11
- static RequestJson(json: string): (target: Object, methodName: string, propertyDescriptor: PropertyDescriptor) => void;
12
- static GetRequestJson(target: Function, method: string): string | undefined;
13
- static ProducesResponse(response: {
14
- Status: number;
15
- Description?: string;
16
- JSON?: string;
17
- }): (target: Object, methodName: string, propertyDescriptor: PropertyDescriptor) => void;
18
- static GetProducesResponse(target: Function, method: string): Parameters<typeof DocumentationDecorators.ProducesResponse>[0][];
19
- static ControllerHeader(header: string): (target: Object) => void;
20
- static GetControllerHeaders(target: Object): string[];
21
- static ActionHeader(header: string): (target: Object, method: string, propertyDescriptor: PropertyDescriptor) => void;
22
- static GetActionHeaders(target: Object, method: string): string[];
23
- }
24
- //# sourceMappingURL=DocumentationDecorators.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DocumentationDecorators.d.ts","sourceRoot":"","sources":["../../../decorators/documentation/DocumentationDecorators.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,qBAAa,uBAAuB;;IAIhC,OAAO,CAAC,MAAM,CAAC,uBAAuB,CAAyB;IAC/D,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAAyB;IAC3D,OAAO,CAAC,MAAM,CAAC,oBAAoB,CAA0B;IAC7D,OAAO,CAAC,MAAM,CAAC,+BAA+B,CAAyC;IACvF,OAAO,CAAC,MAAM,CAAC,qCAAqC,CAA+C;WAErF,WAAW,CAAC,WAAW,EAAE,MAAM,YAChB,MAAM,cAAc,MAAM,sBAAsB,kBAAkB;WAMjF,cAAc,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;WAIpE,WAAW,CAAC,IAAI,EAAE,MAAM,YACT,MAAM,cAAc,MAAM,sBAAsB,kBAAkB;WAMjF,cAAc,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,MAA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