@spinajs/http 2.0.149 → 2.0.150

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 (96) hide show
  1. package/lib/cjs/response-methods/badRequest.d.ts +2 -2
  2. package/lib/cjs/response-methods/badRequest.d.ts.map +1 -1
  3. package/lib/cjs/response-methods/badRequest.js +2 -1
  4. package/lib/cjs/response-methods/badRequest.js.map +1 -1
  5. package/lib/cjs/response-methods/conflict.d.ts +2 -2
  6. package/lib/cjs/response-methods/conflict.d.ts.map +1 -1
  7. package/lib/cjs/response-methods/conflict.js +2 -1
  8. package/lib/cjs/response-methods/conflict.js.map +1 -1
  9. package/lib/cjs/response-methods/errorResponse.d.ts +8 -0
  10. package/lib/cjs/response-methods/errorResponse.d.ts.map +1 -0
  11. package/lib/cjs/response-methods/errorResponse.js +25 -0
  12. package/lib/cjs/response-methods/errorResponse.js.map +1 -0
  13. package/lib/cjs/response-methods/forbidden.d.ts +2 -2
  14. package/lib/cjs/response-methods/forbidden.d.ts.map +1 -1
  15. package/lib/cjs/response-methods/forbidden.js +2 -1
  16. package/lib/cjs/response-methods/forbidden.js.map +1 -1
  17. package/lib/cjs/response-methods/noContent.d.ts +2 -2
  18. package/lib/cjs/response-methods/noContent.d.ts.map +1 -1
  19. package/lib/cjs/response-methods/noContent.js +2 -1
  20. package/lib/cjs/response-methods/noContent.js.map +1 -1
  21. package/lib/cjs/response-methods/notAcceptable.d.ts +2 -2
  22. package/lib/cjs/response-methods/notAcceptable.d.ts.map +1 -1
  23. package/lib/cjs/response-methods/notAcceptable.js +2 -1
  24. package/lib/cjs/response-methods/notAcceptable.js.map +1 -1
  25. package/lib/cjs/response-methods/notAllowed.d.ts +2 -2
  26. package/lib/cjs/response-methods/notAllowed.d.ts.map +1 -1
  27. package/lib/cjs/response-methods/notAllowed.js +2 -1
  28. package/lib/cjs/response-methods/notAllowed.js.map +1 -1
  29. package/lib/cjs/response-methods/notFound.d.ts +2 -2
  30. package/lib/cjs/response-methods/notFound.d.ts.map +1 -1
  31. package/lib/cjs/response-methods/notFound.js +2 -1
  32. package/lib/cjs/response-methods/notFound.js.map +1 -1
  33. package/lib/cjs/response-methods/serverError.d.ts +2 -2
  34. package/lib/cjs/response-methods/serverError.d.ts.map +1 -1
  35. package/lib/cjs/response-methods/serverError.js +2 -1
  36. package/lib/cjs/response-methods/serverError.js.map +1 -1
  37. package/lib/cjs/response-methods/unauthorized.d.ts +2 -2
  38. package/lib/cjs/response-methods/unauthorized.d.ts.map +1 -1
  39. package/lib/cjs/response-methods/unauthorized.js +2 -1
  40. package/lib/cjs/response-methods/unauthorized.js.map +1 -1
  41. package/lib/cjs/response-methods/validationError.d.ts +2 -2
  42. package/lib/cjs/response-methods/validationError.d.ts.map +1 -1
  43. package/lib/cjs/response-methods/validationError.js +2 -1
  44. package/lib/cjs/response-methods/validationError.js.map +1 -1
  45. package/lib/cjs/route-args/RouteArgs.js +1 -1
  46. package/lib/cjs/route-args/RouteArgs.js.map +1 -1
  47. package/lib/mjs/response-methods/badRequest.d.ts +2 -2
  48. package/lib/mjs/response-methods/badRequest.d.ts.map +1 -1
  49. package/lib/mjs/response-methods/badRequest.js +3 -2
  50. package/lib/mjs/response-methods/badRequest.js.map +1 -1
  51. package/lib/mjs/response-methods/conflict.d.ts +2 -2
  52. package/lib/mjs/response-methods/conflict.d.ts.map +1 -1
  53. package/lib/mjs/response-methods/conflict.js +3 -2
  54. package/lib/mjs/response-methods/conflict.js.map +1 -1
  55. package/lib/mjs/response-methods/errorResponse.d.ts +8 -0
  56. package/lib/mjs/response-methods/errorResponse.d.ts.map +1 -0
  57. package/lib/mjs/response-methods/errorResponse.js +18 -0
  58. package/lib/mjs/response-methods/errorResponse.js.map +1 -0
  59. package/lib/mjs/response-methods/forbidden.d.ts +2 -2
  60. package/lib/mjs/response-methods/forbidden.d.ts.map +1 -1
  61. package/lib/mjs/response-methods/forbidden.js +3 -2
  62. package/lib/mjs/response-methods/forbidden.js.map +1 -1
  63. package/lib/mjs/response-methods/noContent.d.ts +2 -2
  64. package/lib/mjs/response-methods/noContent.d.ts.map +1 -1
  65. package/lib/mjs/response-methods/noContent.js +3 -2
  66. package/lib/mjs/response-methods/noContent.js.map +1 -1
  67. package/lib/mjs/response-methods/notAcceptable.d.ts +2 -2
  68. package/lib/mjs/response-methods/notAcceptable.d.ts.map +1 -1
  69. package/lib/mjs/response-methods/notAcceptable.js +3 -2
  70. package/lib/mjs/response-methods/notAcceptable.js.map +1 -1
  71. package/lib/mjs/response-methods/notAllowed.d.ts +2 -2
  72. package/lib/mjs/response-methods/notAllowed.d.ts.map +1 -1
  73. package/lib/mjs/response-methods/notAllowed.js +3 -2
  74. package/lib/mjs/response-methods/notAllowed.js.map +1 -1
  75. package/lib/mjs/response-methods/notFound.d.ts +2 -2
  76. package/lib/mjs/response-methods/notFound.d.ts.map +1 -1
  77. package/lib/mjs/response-methods/notFound.js +3 -2
  78. package/lib/mjs/response-methods/notFound.js.map +1 -1
  79. package/lib/mjs/response-methods/serverError.d.ts +2 -2
  80. package/lib/mjs/response-methods/serverError.d.ts.map +1 -1
  81. package/lib/mjs/response-methods/serverError.js +3 -2
  82. package/lib/mjs/response-methods/serverError.js.map +1 -1
  83. package/lib/mjs/response-methods/unauthorized.d.ts +2 -2
  84. package/lib/mjs/response-methods/unauthorized.d.ts.map +1 -1
  85. package/lib/mjs/response-methods/unauthorized.js +3 -2
  86. package/lib/mjs/response-methods/unauthorized.js.map +1 -1
  87. package/lib/mjs/response-methods/validationError.d.ts +2 -2
  88. package/lib/mjs/response-methods/validationError.d.ts.map +1 -1
  89. package/lib/mjs/response-methods/validationError.js +3 -2
  90. package/lib/mjs/response-methods/validationError.js.map +1 -1
  91. package/lib/mjs/route-args/RouteArgs.js +1 -1
  92. package/lib/mjs/route-args/RouteArgs.js.map +1 -1
  93. package/lib/tsconfig.cjs.tsbuildinfo +1 -1
  94. package/lib/tsconfig.mjs.tsbuildinfo +1 -1
  95. package/lib/views/responses/validationError.pug +1 -1
  96. package/package.json +10 -10
@@ -1,12 +1,12 @@
1
1
  /// <reference types="qs" />
2
2
  import * as express from 'express';
3
- import { Response } from '../interfaces.js';
3
+ import { ErrorResponse } from './errorResponse.js';
4
4
  /**
5
5
  * Internall response function.
6
6
  * Returns HTTP 400 BAD REQUEST ERROR
7
7
  * @param err - error to send
8
8
  */
9
- export declare class BadRequest extends Response {
9
+ export declare class BadRequest extends ErrorResponse {
10
10
  constructor(data: any);
11
11
  execute(_req: express.Request, _res: express.Response): Promise<(req: express.Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>, res: express.Response<any, Record<string, any>>) => void>;
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"badRequest.d.ts","sourceRoot":"","sources":["../../../src/response-methods/badRequest.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,EAAoB,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG9D;;;;GAIG;AAEH,qBAAa,UAAW,SAAQ,QAAQ;gBAC1B,IAAI,EAAE,GAAG;IAIR,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ;CAGnE"}
1
+ {"version":3,"file":"badRequest.d.ts","sourceRoot":"","sources":["../../../src/response-methods/badRequest.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAGnC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;GAIG;AAEH,qBAAa,UAAW,SAAQ,aAAa;gBAC/B,IAAI,EAAE,GAAG;IAIR,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ;CAGnE"}
@@ -3,12 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BadRequest = void 0;
4
4
  const interfaces_js_1 = require("../interfaces.js");
5
5
  const responses_js_1 = require("../responses.js");
6
+ const errorResponse_js_1 = require("./errorResponse.js");
6
7
  /**
7
8
  * Internall response function.
8
9
  * Returns HTTP 400 BAD REQUEST ERROR
9
10
  * @param err - error to send
10
11
  */
11
- class BadRequest extends interfaces_js_1.Response {
12
+ class BadRequest extends errorResponse_js_1.ErrorResponse {
12
13
  constructor(data) {
13
14
  super(data);
14
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"badRequest.js","sourceRoot":"","sources":["../../../src/response-methods/badRequest.ts"],"names":[],"mappings":";;;AACA,oDAA8D;AAC9D,kDAA+C;AAE/C;;;;GAIG;AAEH,MAAa,UAAW,SAAQ,wBAAQ;IACtC,YAAY,IAAS;QACnB,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,IAAqB,EAAE,IAAsB;QAChE,OAAO,MAAM,IAAA,2BAAY,EAAC,IAAI,CAAC,YAAY,EAAE,gCAAgB,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC;IAC/F,CAAC;CACF;AARD,gCAQC"}
1
+ {"version":3,"file":"badRequest.js","sourceRoot":"","sources":["../../../src/response-methods/badRequest.ts"],"names":[],"mappings":";;;AACA,oDAAoD;AACpD,kDAA+C;AAC/C,yDAAmD;AAEnD;;;;GAIG;AAEH,MAAa,UAAW,SAAQ,gCAAa;IAC3C,YAAY,IAAS;QACnB,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,IAAqB,EAAE,IAAsB;QAChE,OAAO,MAAM,IAAA,2BAAY,EAAC,IAAI,CAAC,YAAY,EAAE,gCAAgB,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC;IAC/F,CAAC;CACF;AARD,gCAQC"}
@@ -1,12 +1,12 @@
1
1
  /// <reference types="qs" />
2
2
  import * as express from 'express';
3
- import { Response } from '../interfaces.js';
3
+ import { ErrorResponse } from './errorResponse.js';
4
4
  /**
5
5
  * Internall response function.
6
6
  * Returns HTTP 409 Conflict
7
7
  * @param err - error to send
8
8
  */
9
- export declare class Conflict extends Response {
9
+ export declare class Conflict extends ErrorResponse {
10
10
  constructor(data: any);
11
11
  execute(_req: express.Request, _res: express.Response): Promise<(req: express.Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>, res: express.Response<any, Record<string, any>>) => void>;
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"conflict.d.ts","sourceRoot":"","sources":["../../../src/response-methods/conflict.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,EAAoB,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG9D;;;;GAIG;AAEH,qBAAa,QAAS,SAAQ,QAAQ;gBACxB,IAAI,EAAE,GAAG;IAIR,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ;CAGnE"}
1
+ {"version":3,"file":"conflict.d.ts","sourceRoot":"","sources":["../../../src/response-methods/conflict.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAGnC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;GAIG;AAEH,qBAAa,QAAS,SAAQ,aAAa;gBAC7B,IAAI,EAAE,GAAG;IAIR,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ;CAGnE"}
@@ -3,12 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Conflict = void 0;
4
4
  const interfaces_js_1 = require("../interfaces.js");
5
5
  const responses_js_1 = require("../responses.js");
6
+ const errorResponse_js_1 = require("./errorResponse.js");
6
7
  /**
7
8
  * Internall response function.
8
9
  * Returns HTTP 409 Conflict
9
10
  * @param err - error to send
10
11
  */
11
- class Conflict extends interfaces_js_1.Response {
12
+ class Conflict extends errorResponse_js_1.ErrorResponse {
12
13
  constructor(data) {
13
14
  super(data);
14
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"conflict.js","sourceRoot":"","sources":["../../../src/response-methods/conflict.ts"],"names":[],"mappings":";;;AACA,oDAA8D;AAC9D,kDAA+C;AAE/C;;;;GAIG;AAEH,MAAa,QAAS,SAAQ,wBAAQ;IACpC,YAAY,IAAS;QACnB,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,IAAqB,EAAE,IAAsB;QAChE,OAAO,MAAM,IAAA,2BAAY,EAAC,IAAI,CAAC,YAAY,EAAE,gCAAgB,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;IAC1F,CAAC;CACF;AARD,4BAQC"}
1
+ {"version":3,"file":"conflict.js","sourceRoot":"","sources":["../../../src/response-methods/conflict.ts"],"names":[],"mappings":";;;AACA,oDAAoD;AACpD,kDAA+C;AAC/C,yDAAmD;AAEnD;;;;GAIG;AAEH,MAAa,QAAS,SAAQ,gCAAa;IACzC,YAAY,IAAS;QACnB,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,IAAqB,EAAE,IAAsB;QAChE,OAAO,MAAM,IAAA,2BAAY,EAAC,IAAI,CAAC,YAAY,EAAE,gCAAgB,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;IAC1F,CAAC;CACF;AARD,4BAQC"}
@@ -0,0 +1,8 @@
1
+ /// <reference types="qs" />
2
+ import * as express from 'express';
3
+ import { Response } from '../interfaces.js';
4
+ export declare class ErrorResponse extends Response {
5
+ constructor(error: any);
6
+ execute(_req: express.Request, _res: express.Response): Promise<(req: express.Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>, res: express.Response<any, Record<string, any>>) => void>;
7
+ }
8
+ //# sourceMappingURL=errorResponse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errorResponse.d.ts","sourceRoot":"","sources":["../../../src/response-methods/errorResponse.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,EAAoB,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAM9D,qBAAa,aAAc,SAAQ,QAAQ;gBAC7B,KAAK,EAAE,GAAG;IAST,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ;CAGnE"}
@@ -0,0 +1,25 @@
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.ErrorResponse = void 0;
7
+ const interfaces_js_1 = require("../interfaces.js");
8
+ const responses_js_1 = require("../responses.js");
9
+ const lodash_1 = __importDefault(require("lodash"));
10
+ const di_1 = require("@spinajs/di");
11
+ const configuration_1 = require("@spinajs/configuration");
12
+ class ErrorResponse extends interfaces_js_1.Response {
13
+ constructor(error) {
14
+ super(error);
15
+ const isDev = di_1.DI.get(configuration_1.Configuration).get('configuration.isDevelopment');
16
+ if (isDev) {
17
+ this.responseData = lodash_1.default.omit(this.responseData, ['stack']);
18
+ }
19
+ }
20
+ async execute(_req, _res) {
21
+ return await (0, responses_js_1.httpResponse)(this.responseData, interfaces_js_1.HTTP_STATUS_CODE.BAD_REQUEST, 'badRequest.pug');
22
+ }
23
+ }
24
+ exports.ErrorResponse = ErrorResponse;
25
+ //# sourceMappingURL=errorResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errorResponse.js","sourceRoot":"","sources":["../../../src/response-methods/errorResponse.ts"],"names":[],"mappings":";;;;;;AACA,oDAA8D;AAC9D,kDAA+C;AAC/C,oDAAuB;AACvB,oCAAiC;AACjC,0DAAuD;AAEvD,MAAa,aAAc,SAAQ,wBAAQ;IACzC,YAAY,KAAU;QACpB,KAAK,CAAC,KAAK,CAAC,CAAC;QAEb,MAAM,KAAK,GAAG,OAAE,CAAC,GAAG,CAAC,6BAAa,CAAC,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;QACvE,IAAI,KAAK,EAAE;YACT,IAAI,CAAC,YAAY,GAAG,gBAAC,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;SAC1D;IACH,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,IAAqB,EAAE,IAAsB;QAChE,OAAO,MAAM,IAAA,2BAAY,EAAC,IAAI,CAAC,YAAY,EAAE,gCAAgB,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC;IAC/F,CAAC;CACF;AAbD,sCAaC"}
@@ -1,12 +1,12 @@
1
1
  /// <reference types="qs" />
2
2
  import * as express from 'express';
3
- import { Response } from '../interfaces.js';
3
+ import { ErrorResponse } from './errorResponse.js';
4
4
  /**
5
5
  * Internall response function.
6
6
  * Returns HTTP 403 FORBIDDEN ERROR
7
7
  * @param err - error to send
8
8
  */
9
- export declare class Forbidden extends Response {
9
+ export declare class Forbidden extends ErrorResponse {
10
10
  constructor(data: any);
11
11
  execute(_req: express.Request, _res: express.Response): Promise<(req: express.Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>, res: express.Response<any, Record<string, any>>) => void>;
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"forbidden.d.ts","sourceRoot":"","sources":["../../../src/response-methods/forbidden.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,EAAoB,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG9D;;;;GAIG;AAEH,qBAAa,SAAU,SAAQ,QAAQ;gBACzB,IAAI,EAAE,GAAG;IAIR,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ;CAGnE"}
1
+ {"version":3,"file":"forbidden.d.ts","sourceRoot":"","sources":["../../../src/response-methods/forbidden.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAGnC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;GAIG;AAEH,qBAAa,SAAU,SAAQ,aAAa;gBAC9B,IAAI,EAAE,GAAG;IAIR,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ;CAGnE"}
@@ -3,12 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Forbidden = void 0;
4
4
  const interfaces_js_1 = require("../interfaces.js");
5
5
  const responses_js_1 = require("../responses.js");
6
+ const errorResponse_js_1 = require("./errorResponse.js");
6
7
  /**
7
8
  * Internall response function.
8
9
  * Returns HTTP 403 FORBIDDEN ERROR
9
10
  * @param err - error to send
10
11
  */
11
- class Forbidden extends interfaces_js_1.Response {
12
+ class Forbidden extends errorResponse_js_1.ErrorResponse {
12
13
  constructor(data) {
13
14
  super(data);
14
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"forbidden.js","sourceRoot":"","sources":["../../../src/response-methods/forbidden.ts"],"names":[],"mappings":";;;AACA,oDAA8D;AAC9D,kDAA+C;AAE/C;;;;GAIG;AAEH,MAAa,SAAU,SAAQ,wBAAQ;IACrC,YAAY,IAAS;QACnB,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,IAAqB,EAAE,IAAsB;QAChE,OAAO,MAAM,IAAA,2BAAY,EAAC,IAAI,CAAC,YAAY,EAAE,gCAAgB,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;IAC5F,CAAC;CACF;AARD,8BAQC"}
1
+ {"version":3,"file":"forbidden.js","sourceRoot":"","sources":["../../../src/response-methods/forbidden.ts"],"names":[],"mappings":";;;AACA,oDAAoD;AACpD,kDAA+C;AAC/C,yDAAmD;AAEnD;;;;GAIG;AAEH,MAAa,SAAU,SAAQ,gCAAa;IAC1C,YAAY,IAAS;QACnB,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,IAAqB,EAAE,IAAsB;QAChE,OAAO,MAAM,IAAA,2BAAY,EAAC,IAAI,CAAC,YAAY,EAAE,gCAAgB,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;IAC5F,CAAC;CACF;AARD,8BAQC"}
@@ -1,12 +1,12 @@
1
1
  /// <reference types="qs" />
2
2
  import * as express from 'express';
3
- import { Response } from '../interfaces.js';
3
+ import { ErrorResponse } from './errorResponse.js';
4
4
  /**
5
5
  * Internall response function.
6
6
  * Returns HTTP 204 NO CONTENT
7
7
  * @param err - error to send
8
8
  */
9
- export declare class NoContent extends Response {
9
+ export declare class NoContent extends ErrorResponse {
10
10
  constructor(data: any);
11
11
  execute(_req: express.Request, _res: express.Response): Promise<(req: express.Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>, res: express.Response<any, Record<string, any>>) => void>;
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"noContent.d.ts","sourceRoot":"","sources":["../../../src/response-methods/noContent.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,EAAoB,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG9D;;;;GAIG;AACH,qBAAa,SAAU,SAAQ,QAAQ;gBACzB,IAAI,EAAE,GAAG;IAIR,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ;CAGnE"}
1
+ {"version":3,"file":"noContent.d.ts","sourceRoot":"","sources":["../../../src/response-methods/noContent.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAGnC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;GAIG;AACH,qBAAa,SAAU,SAAQ,aAAa;gBAC9B,IAAI,EAAE,GAAG;IAIR,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ;CAGnE"}
@@ -3,12 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NoContent = void 0;
4
4
  const interfaces_js_1 = require("../interfaces.js");
5
5
  const responses_js_1 = require("../responses.js");
6
+ const errorResponse_js_1 = require("./errorResponse.js");
6
7
  /**
7
8
  * Internall response function.
8
9
  * Returns HTTP 204 NO CONTENT
9
10
  * @param err - error to send
10
11
  */
11
- class NoContent extends interfaces_js_1.Response {
12
+ class NoContent extends errorResponse_js_1.ErrorResponse {
12
13
  constructor(data) {
13
14
  super(data);
14
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"noContent.js","sourceRoot":"","sources":["../../../src/response-methods/noContent.ts"],"names":[],"mappings":";;;AACA,oDAA8D;AAC9D,kDAA+C;AAE/C;;;;GAIG;AACH,MAAa,SAAU,SAAQ,wBAAQ;IACrC,YAAY,IAAS;QACnB,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,IAAqB,EAAE,IAAsB;QAChE,OAAO,MAAM,IAAA,2BAAY,EAAC,IAAI,CAAC,YAAY,EAAE,gCAAgB,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC;IAC7F,CAAC;CACF;AARD,8BAQC"}
1
+ {"version":3,"file":"noContent.js","sourceRoot":"","sources":["../../../src/response-methods/noContent.ts"],"names":[],"mappings":";;;AACA,oDAAoD;AACpD,kDAA+C;AAC/C,yDAAmD;AAEnD;;;;GAIG;AACH,MAAa,SAAU,SAAQ,gCAAa;IAC1C,YAAY,IAAS;QACnB,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,IAAqB,EAAE,IAAsB;QAChE,OAAO,MAAM,IAAA,2BAAY,EAAC,IAAI,CAAC,YAAY,EAAE,gCAAgB,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC;IAC7F,CAAC;CACF;AARD,8BAQC"}
@@ -1,13 +1,13 @@
1
1
  /// <reference types="qs" />
2
2
  import * as express from 'express';
3
- import { Response } from '../interfaces.js';
3
+ import { ErrorResponse } from './errorResponse.js';
4
4
  /**
5
5
  * Internall response function.
6
6
  * Returns HTTP 406 NOT ACCEPTABLE
7
7
  * When content requested in accept header format cannot be returned.
8
8
  * @param err - error to send
9
9
  */
10
- export declare class NotAcceptable extends Response {
10
+ export declare class NotAcceptable extends ErrorResponse {
11
11
  constructor(data: any);
12
12
  execute(_req: express.Request, _res: express.Response): Promise<(req: express.Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>, res: express.Response<any, Record<string, any>>) => void>;
13
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"notAcceptable.d.ts","sourceRoot":"","sources":["../../../src/response-methods/notAcceptable.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,EAAoB,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG9D;;;;;GAKG;AACH,qBAAa,aAAc,SAAQ,QAAQ;gBAC7B,IAAI,EAAE,GAAG;IAIR,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ;CAGnE"}
1
+ {"version":3,"file":"notAcceptable.d.ts","sourceRoot":"","sources":["../../../src/response-methods/notAcceptable.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAGnC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;GAKG;AACH,qBAAa,aAAc,SAAQ,aAAa;gBAClC,IAAI,EAAE,GAAG;IAIR,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ;CAGnE"}
@@ -3,13 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NotAcceptable = void 0;
4
4
  const interfaces_js_1 = require("../interfaces.js");
5
5
  const responses_js_1 = require("../responses.js");
6
+ const errorResponse_js_1 = require("./errorResponse.js");
6
7
  /**
7
8
  * Internall response function.
8
9
  * Returns HTTP 406 NOT ACCEPTABLE
9
10
  * When content requested in accept header format cannot be returned.
10
11
  * @param err - error to send
11
12
  */
12
- class NotAcceptable extends interfaces_js_1.Response {
13
+ class NotAcceptable extends errorResponse_js_1.ErrorResponse {
13
14
  constructor(data) {
14
15
  super(data);
15
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"notAcceptable.js","sourceRoot":"","sources":["../../../src/response-methods/notAcceptable.ts"],"names":[],"mappings":";;;AACA,oDAA8D;AAC9D,kDAA+C;AAE/C;;;;;GAKG;AACH,MAAa,aAAc,SAAQ,wBAAQ;IACzC,YAAY,IAAS;QACnB,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,IAAqB,EAAE,IAAsB;QAChE,OAAO,MAAM,IAAA,2BAAY,EAAC,IAAI,CAAC,YAAY,EAAE,gCAAgB,CAAC,cAAc,EAAE,mBAAmB,CAAC,CAAC;IACrG,CAAC;CACF;AARD,sCAQC"}
1
+ {"version":3,"file":"notAcceptable.js","sourceRoot":"","sources":["../../../src/response-methods/notAcceptable.ts"],"names":[],"mappings":";;;AACA,oDAAoD;AACpD,kDAA+C;AAC/C,yDAAmD;AAEnD;;;;;GAKG;AACH,MAAa,aAAc,SAAQ,gCAAa;IAC9C,YAAY,IAAS;QACnB,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,IAAqB,EAAE,IAAsB;QAChE,OAAO,MAAM,IAAA,2BAAY,EAAC,IAAI,CAAC,YAAY,EAAE,gCAAgB,CAAC,cAAc,EAAE,mBAAmB,CAAC,CAAC;IACrG,CAAC;CACF;AARD,sCAQC"}
@@ -1,12 +1,12 @@
1
1
  /// <reference types="qs" />
2
2
  import * as express from 'express';
3
- import { Response } from '../interfaces.js';
3
+ import { ErrorResponse } from './errorResponse.js';
4
4
  /**
5
5
  * Internall response function.
6
6
  * Returns HTTP 403 FORBIDDEN ERROR
7
7
  * @param err - error to send
8
8
  */
9
- export declare class NotAllowed extends Response {
9
+ export declare class NotAllowed extends ErrorResponse {
10
10
  constructor(data: any);
11
11
  execute(_req: express.Request, _res: express.Response): Promise<(req: express.Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>, res: express.Response<any, Record<string, any>>) => void>;
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"notAllowed.d.ts","sourceRoot":"","sources":["../../../src/response-methods/notAllowed.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,EAAoB,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG9D;;;;GAIG;AAEH,qBAAa,UAAW,SAAQ,QAAQ;gBAC1B,IAAI,EAAE,GAAG;IAIR,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ;CAGnE"}
1
+ {"version":3,"file":"notAllowed.d.ts","sourceRoot":"","sources":["../../../src/response-methods/notAllowed.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAGnC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;GAIG;AAEH,qBAAa,UAAW,SAAQ,aAAa;gBAC/B,IAAI,EAAE,GAAG;IAIR,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ;CAGnE"}
@@ -3,12 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NotAllowed = void 0;
4
4
  const interfaces_js_1 = require("../interfaces.js");
5
5
  const responses_js_1 = require("../responses.js");
6
+ const errorResponse_js_1 = require("./errorResponse.js");
6
7
  /**
7
8
  * Internall response function.
8
9
  * Returns HTTP 403 FORBIDDEN ERROR
9
10
  * @param err - error to send
10
11
  */
11
- class NotAllowed extends interfaces_js_1.Response {
12
+ class NotAllowed extends errorResponse_js_1.ErrorResponse {
12
13
  constructor(data) {
13
14
  super(data);
14
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"notAllowed.js","sourceRoot":"","sources":["../../../src/response-methods/notAllowed.ts"],"names":[],"mappings":";;;AACA,oDAA8D;AAC9D,kDAA+C;AAE/C;;;;GAIG;AAEH,MAAa,UAAW,SAAQ,wBAAQ;IACtC,YAAY,IAAS;QACnB,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,IAAqB,EAAE,IAAsB;QAChE,OAAO,MAAM,IAAA,2BAAY,EAAC,IAAI,CAAC,YAAY,EAAE,gCAAgB,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC;IAChG,CAAC;CACF;AARD,gCAQC"}
1
+ {"version":3,"file":"notAllowed.js","sourceRoot":"","sources":["../../../src/response-methods/notAllowed.ts"],"names":[],"mappings":";;;AACA,oDAAoD;AACpD,kDAA+C;AAC/C,yDAAmD;AAEnD;;;;GAIG;AAEH,MAAa,UAAW,SAAQ,gCAAa;IAC3C,YAAY,IAAS;QACnB,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,IAAqB,EAAE,IAAsB;QAChE,OAAO,MAAM,IAAA,2BAAY,EAAC,IAAI,CAAC,YAAY,EAAE,gCAAgB,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC;IAChG,CAAC;CACF;AARD,gCAQC"}
@@ -1,12 +1,12 @@
1
1
  /// <reference types="qs" />
2
2
  import * as express from 'express';
3
- import { Response } from '../interfaces.js';
3
+ import { ErrorResponse } from './errorResponse.js';
4
4
  /**
5
5
  * Internall response function.
6
6
  * Returns HTTP 404 NOT FOUND ERROR
7
7
  * @param err - error to send
8
8
  */
9
- export declare class NotFound extends Response {
9
+ export declare class NotFound extends ErrorResponse {
10
10
  constructor(data?: any);
11
11
  execute(_req: express.Request, _res: express.Response): Promise<(req: express.Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>, res: express.Response<any, Record<string, any>>) => void>;
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"notFound.d.ts","sourceRoot":"","sources":["../../../src/response-methods/notFound.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,EAAoB,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG9D;;;;GAIG;AACH,qBAAa,QAAS,SAAQ,QAAQ;gBACxB,IAAI,CAAC,EAAE,GAAG;IAIT,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ;CAGnE"}
1
+ {"version":3,"file":"notFound.d.ts","sourceRoot":"","sources":["../../../src/response-methods/notFound.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAGnC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;GAIG;AACH,qBAAa,QAAS,SAAQ,aAAa;gBAC7B,IAAI,CAAC,EAAE,GAAG;IAIT,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ;CAGnE"}
@@ -3,12 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NotFound = void 0;
4
4
  const interfaces_js_1 = require("../interfaces.js");
5
5
  const responses_js_1 = require("../responses.js");
6
+ const errorResponse_js_1 = require("./errorResponse.js");
6
7
  /**
7
8
  * Internall response function.
8
9
  * Returns HTTP 404 NOT FOUND ERROR
9
10
  * @param err - error to send
10
11
  */
11
- class NotFound extends interfaces_js_1.Response {
12
+ class NotFound extends errorResponse_js_1.ErrorResponse {
12
13
  constructor(data) {
13
14
  super(data);
14
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"notFound.js","sourceRoot":"","sources":["../../../src/response-methods/notFound.ts"],"names":[],"mappings":";;;AACA,oDAA8D;AAC9D,kDAA+C;AAE/C;;;;GAIG;AACH,MAAa,QAAS,SAAQ,wBAAQ;IACpC,YAAY,IAAU;QACpB,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,IAAqB,EAAE,IAAsB;QAChE,OAAO,MAAM,IAAA,2BAAY,EAAC,IAAI,CAAC,YAAY,EAAE,gCAAgB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;IAC3F,CAAC;CACF;AARD,4BAQC"}
1
+ {"version":3,"file":"notFound.js","sourceRoot":"","sources":["../../../src/response-methods/notFound.ts"],"names":[],"mappings":";;;AACA,oDAAoD;AACpD,kDAA+C;AAC/C,yDAAmD;AAEnD;;;;GAIG;AACH,MAAa,QAAS,SAAQ,gCAAa;IACzC,YAAY,IAAU;QACpB,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,IAAqB,EAAE,IAAsB;QAChE,OAAO,MAAM,IAAA,2BAAY,EAAC,IAAI,CAAC,YAAY,EAAE,gCAAgB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;IAC3F,CAAC;CACF;AARD,4BAQC"}
@@ -1,12 +1,12 @@
1
1
  /// <reference types="qs" />
2
2
  import * as express from 'express';
3
- import { Response } from '../interfaces.js';
3
+ import { ErrorResponse } from './errorResponse.js';
4
4
  /**
5
5
  * Internall response function.
6
6
  * Returns HTTP 500 INTERNAL SERVER ERROR
7
7
  * @param err - error to send
8
8
  */
9
- export declare class ServerError extends Response {
9
+ export declare class ServerError extends ErrorResponse {
10
10
  constructor(data: any);
11
11
  execute(_req: express.Request, _res: express.Response): Promise<(req: express.Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>, res: express.Response<any, Record<string, any>>) => void>;
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"serverError.d.ts","sourceRoot":"","sources":["../../../src/response-methods/serverError.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,EAAoB,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG9D;;;;GAIG;AAEH,qBAAa,WAAY,SAAQ,QAAQ;gBAC3B,IAAI,EAAE,GAAG;IAKR,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ;CAGnE"}
1
+ {"version":3,"file":"serverError.d.ts","sourceRoot":"","sources":["../../../src/response-methods/serverError.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAGnC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;GAIG;AAEH,qBAAa,WAAY,SAAQ,aAAa;gBAChC,IAAI,EAAE,GAAG;IAKR,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ;CAGnE"}
@@ -3,12 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ServerError = void 0;
4
4
  const interfaces_js_1 = require("../interfaces.js");
5
5
  const responses_js_1 = require("../responses.js");
6
+ const errorResponse_js_1 = require("./errorResponse.js");
6
7
  /**
7
8
  * Internall response function.
8
9
  * Returns HTTP 500 INTERNAL SERVER ERROR
9
10
  * @param err - error to send
10
11
  */
11
- class ServerError extends interfaces_js_1.Response {
12
+ class ServerError extends errorResponse_js_1.ErrorResponse {
12
13
  constructor(data) {
13
14
  super(data);
14
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"serverError.js","sourceRoot":"","sources":["../../../src/response-methods/serverError.ts"],"names":[],"mappings":";;;AACA,oDAA8D;AAC9D,kDAA+C;AAE/C;;;;GAIG;AAEH,MAAa,WAAY,SAAQ,wBAAQ;IACvC,YAAY,IAAS;QACnB,KAAK,CAAC,IAAI,CAAC,CAAC;IAEd,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,IAAqB,EAAE,IAAsB;QAChE,OAAO,MAAM,IAAA,2BAAY,EAAC,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,EAAE,gCAAgB,CAAC,cAAc,EAAE,iBAAiB,CAAC,CAAC;IAC9G,CAAC;CACF;AATD,kCASC"}
1
+ {"version":3,"file":"serverError.js","sourceRoot":"","sources":["../../../src/response-methods/serverError.ts"],"names":[],"mappings":";;;AACA,oDAAoD;AACpD,kDAA+C;AAC/C,yDAAmD;AAEnD;;;;GAIG;AAEH,MAAa,WAAY,SAAQ,gCAAa;IAC5C,YAAY,IAAS;QACnB,KAAK,CAAC,IAAI,CAAC,CAAC;IAEd,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,IAAqB,EAAE,IAAsB;QAChE,OAAO,MAAM,IAAA,2BAAY,EAAC,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,EAAE,gCAAgB,CAAC,cAAc,EAAE,iBAAiB,CAAC,CAAC;IAC9G,CAAC;CACF;AATD,kCASC"}
@@ -1,12 +1,12 @@
1
1
  /// <reference types="qs" />
2
2
  import * as express from 'express';
3
- import { Response } from '../interfaces.js';
3
+ import { ErrorResponse } from './errorResponse.js';
4
4
  /**
5
5
  * Internall response function.
6
6
  * Returns HTTP 401 UNAHTORIZED response with json content
7
7
  * @param data - data to send
8
8
  */
9
- export declare class Unauthorized extends Response {
9
+ export declare class Unauthorized extends ErrorResponse {
10
10
  constructor(data: any);
11
11
  execute(_req: express.Request, _res: express.Response): Promise<(req: express.Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>, res: express.Response<any, Record<string, any>>) => void>;
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"unauthorized.d.ts","sourceRoot":"","sources":["../../../src/response-methods/unauthorized.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,EAAoB,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG9D;;;;GAIG;AAEH,qBAAa,YAAa,SAAQ,QAAQ;gBAC5B,IAAI,EAAE,GAAG;IAIR,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ;CAGnE"}
1
+ {"version":3,"file":"unauthorized.d.ts","sourceRoot":"","sources":["../../../src/response-methods/unauthorized.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAGnC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;GAIG;AAEH,qBAAa,YAAa,SAAQ,aAAa;gBACjC,IAAI,EAAE,GAAG;IAIR,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ;CAGnE"}
@@ -3,12 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Unauthorized = void 0;
4
4
  const interfaces_js_1 = require("../interfaces.js");
5
5
  const responses_js_1 = require("../responses.js");
6
+ const errorResponse_js_1 = require("./errorResponse.js");
6
7
  /**
7
8
  * Internall response function.
8
9
  * Returns HTTP 401 UNAHTORIZED response with json content
9
10
  * @param data - data to send
10
11
  */
11
- class Unauthorized extends interfaces_js_1.Response {
12
+ class Unauthorized extends errorResponse_js_1.ErrorResponse {
12
13
  constructor(data) {
13
14
  super(data);
14
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"unauthorized.js","sourceRoot":"","sources":["../../../src/response-methods/unauthorized.ts"],"names":[],"mappings":";;;AACA,oDAA8D;AAC9D,kDAA+C;AAE/C;;;;GAIG;AAEH,MAAa,YAAa,SAAQ,wBAAQ;IACxC,YAAY,IAAS;QACnB,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,IAAqB,EAAE,IAAsB;QAChE,OAAO,MAAM,IAAA,2BAAY,EAAC,IAAI,CAAC,YAAY,EAAE,gCAAgB,CAAC,YAAY,EAAE,wBAAwB,CAAC,CAAC;IACxG,CAAC;CACF;AARD,oCAQC"}
1
+ {"version":3,"file":"unauthorized.js","sourceRoot":"","sources":["../../../src/response-methods/unauthorized.ts"],"names":[],"mappings":";;;AACA,oDAAoD;AACpD,kDAA+C;AAC/C,yDAAmD;AAEnD;;;;GAIG;AAEH,MAAa,YAAa,SAAQ,gCAAa;IAC7C,YAAY,IAAS;QACnB,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,IAAqB,EAAE,IAAsB;QAChE,OAAO,MAAM,IAAA,2BAAY,EAAC,IAAI,CAAC,YAAY,EAAE,gCAAgB,CAAC,YAAY,EAAE,wBAAwB,CAAC,CAAC;IACxG,CAAC;CACF;AARD,oCAQC"}
@@ -1,12 +1,12 @@
1
1
  /// <reference types="qs" />
2
2
  import * as express from 'express';
3
- import { Response } from '../interfaces.js';
3
+ import { ErrorResponse } from './errorResponse.js';
4
4
  /**
5
5
  * Internall response function.
6
6
  * Returns HTTP 400 BAD REQUEST ERROR
7
7
  * @param err - error to send
8
8
  */
9
- export declare class ValidationError extends Response {
9
+ export declare class ValidationError extends ErrorResponse {
10
10
  constructor(data: any);
11
11
  execute(_req: express.Request, _res: express.Response): Promise<(req: express.Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>, res: express.Response<any, Record<string, any>>) => void>;
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"validationError.d.ts","sourceRoot":"","sources":["../../../src/response-methods/validationError.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,EAAoB,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG9D;;;;GAIG;AAEH,qBAAa,eAAgB,SAAQ,QAAQ;gBAC/B,IAAI,EAAE,GAAG;IAIR,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ;CAGnE"}
1
+ {"version":3,"file":"validationError.d.ts","sourceRoot":"","sources":["../../../src/response-methods/validationError.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAGnC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;GAIG;AAEH,qBAAa,eAAgB,SAAQ,aAAa;gBACpC,IAAI,EAAE,GAAG;IAIR,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ;CAGnE"}
@@ -3,12 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ValidationError = void 0;
4
4
  const interfaces_js_1 = require("../interfaces.js");
5
5
  const responses_js_1 = require("../responses.js");
6
+ const errorResponse_js_1 = require("./errorResponse.js");
6
7
  /**
7
8
  * Internall response function.
8
9
  * Returns HTTP 400 BAD REQUEST ERROR
9
10
  * @param err - error to send
10
11
  */
11
- class ValidationError extends interfaces_js_1.Response {
12
+ class ValidationError extends errorResponse_js_1.ErrorResponse {
12
13
  constructor(data) {
13
14
  super(data);
14
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"validationError.js","sourceRoot":"","sources":["../../../src/response-methods/validationError.ts"],"names":[],"mappings":";;;AACA,oDAA8D;AAC9D,kDAA+C;AAE/C;;;;GAIG;AAEH,MAAa,eAAgB,SAAQ,wBAAQ;IAC3C,YAAY,IAAS;QACnB,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,IAAqB,EAAE,IAAsB;QAChE,OAAO,MAAM,IAAA,2BAAY,EAAC,IAAI,CAAC,YAAY,EAAE,gCAAgB,CAAC,WAAW,EAAE,qBAAqB,CAAC,CAAC;IACpG,CAAC;CACF;AARD,0CAQC"}
1
+ {"version":3,"file":"validationError.js","sourceRoot":"","sources":["../../../src/response-methods/validationError.ts"],"names":[],"mappings":";;;AACA,oDAAoD;AACpD,kDAA+C;AAC/C,yDAAmD;AAEnD;;;;GAIG;AAEH,MAAa,eAAgB,SAAQ,gCAAa;IAChD,YAAY,IAAS;QACnB,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,IAAqB,EAAE,IAAsB;QAChE,OAAO,MAAM,IAAA,2BAAY,EAAC,IAAI,CAAC,YAAY,EAAE,gCAAgB,CAAC,WAAW,EAAE,qBAAqB,CAAC,CAAC;IACpG,CAAC;CACF;AARD,0CAQC"}
@@ -47,7 +47,7 @@ class RouteArgs {
47
47
  hydrator = this.getHydrator(routeParameter);
48
48
  result = hydrator ? arg : this.tryExtractObject(arg, routeParameter);
49
49
  if (schema) {
50
- this.Validator.validate(schema, result);
50
+ this.Validator.validate(schema, arg);
51
51
  }
52
52
  if (hydrator) {
53
53
  result = await this.tryHydrateObject(result, routeParameter, hydrator);
@@ -1 +1 @@
1
- {"version":3,"file":"RouteArgs.js","sourceRoot":"","sources":["../../../src/route-args/RouteArgs.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,oCAAkE;AAIlE,oDAAuB;AACvB,oDAAoD;AAapD,MAAsB,SAAS;IAQnB,KAAK,CAAC,eAAe,CAAC,GAAQ,EAAE,cAA+B,EAAE,KAAa;QACtF,IAAI,MAAM,GAAG,IAAI,CAAC;QAClB,IAAI,MAAM,GAAG,IAAI,CAAC;QAClB,IAAI,QAAQ,GAAG,IAAI,CAAC;QAEpB,mDAAmD;QACnD,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM,CA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,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC/G,CAAC;IAES,eAAe,CAAC,KAAsB,EAAE,GAAQ;QACxD,QAAQ,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE;YAC9B,yDAAyD;YACzD,6DAA6D;YAC7D,KAAK,QAAQ;gBACX,OAAO,GAAG,CAAC;YACb,KAAK,QAAQ;gBACX,OAAO,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACvC,KAAK,QAAQ;gBACX,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;YACrB,KAAK,SAAS;gBACZ,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAE,GAAc,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;YACpG,KAAK,WAAW;gBACd,OAAO,SAAS,CAAC;YACnB,KAAK,MAAM;gBACT,OAAO,IAAI,CAAC;YACd;gBACE,OAAO,IAAI,KAAK,CAAC,WAAW,CAAC,gBAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;SACzE;IACH,CAAC;CACF;AAtGC;IAAC,IAAA,eAAU,GAAE;8BACQ,0BAAa;4CAAC;AAFrC,8BAuGC"}
@@ -1,12 +1,12 @@
1
1
  /// <reference types="qs" />
2
2
  import * as express from 'express';
3
- import { Response } from '../interfaces.js';
3
+ import { ErrorResponse } from './errorResponse.js';
4
4
  /**
5
5
  * Internall response function.
6
6
  * Returns HTTP 400 BAD REQUEST ERROR
7
7
  * @param err - error to send
8
8
  */
9
- export declare class BadRequest extends Response {
9
+ export declare class BadRequest extends ErrorResponse {
10
10
  constructor(data: any);
11
11
  execute(_req: express.Request, _res: express.Response): Promise<(req: express.Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>, res: express.Response<any, Record<string, any>>) => void>;
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"badRequest.d.ts","sourceRoot":"","sources":["../../../src/response-methods/badRequest.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,EAAoB,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG9D;;;;GAIG;AAEH,qBAAa,UAAW,SAAQ,QAAQ;gBAC1B,IAAI,EAAE,GAAG;IAIR,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ;CAGnE"}
1
+ {"version":3,"file":"badRequest.d.ts","sourceRoot":"","sources":["../../../src/response-methods/badRequest.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAGnC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;GAIG;AAEH,qBAAa,UAAW,SAAQ,aAAa;gBAC/B,IAAI,EAAE,GAAG;IAIR,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ;CAGnE"}
@@ -1,11 +1,12 @@
1
- import { HTTP_STATUS_CODE, Response } from '../interfaces.js';
1
+ import { HTTP_STATUS_CODE } from '../interfaces.js';
2
2
  import { httpResponse } from '../responses.js';
3
+ import { ErrorResponse } from './errorResponse.js';
3
4
  /**
4
5
  * Internall response function.
5
6
  * Returns HTTP 400 BAD REQUEST ERROR
6
7
  * @param err - error to send
7
8
  */
8
- export class BadRequest extends Response {
9
+ export class BadRequest extends ErrorResponse {
9
10
  constructor(data) {
10
11
  super(data);
11
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"badRequest.js","sourceRoot":"","sources":["../../../src/response-methods/badRequest.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C;;;;GAIG;AAEH,MAAM,OAAO,UAAW,SAAQ,QAAQ;IACtC,YAAY,IAAS;QACnB,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,IAAqB,EAAE,IAAsB;QAChE,OAAO,MAAM,YAAY,CAAC,IAAI,CAAC,YAAY,EAAE,gBAAgB,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC;IAC/F,CAAC;CACF"}
1
+ {"version":3,"file":"badRequest.js","sourceRoot":"","sources":["../../../src/response-methods/badRequest.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;GAIG;AAEH,MAAM,OAAO,UAAW,SAAQ,aAAa;IAC3C,YAAY,IAAS;QACnB,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,IAAqB,EAAE,IAAsB;QAChE,OAAO,MAAM,YAAY,CAAC,IAAI,CAAC,YAAY,EAAE,gBAAgB,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC;IAC/F,CAAC;CACF"}
@@ -1,12 +1,12 @@
1
1
  /// <reference types="qs" />
2
2
  import * as express from 'express';
3
- import { Response } from '../interfaces.js';
3
+ import { ErrorResponse } from './errorResponse.js';
4
4
  /**
5
5
  * Internall response function.
6
6
  * Returns HTTP 409 Conflict
7
7
  * @param err - error to send
8
8
  */
9
- export declare class Conflict extends Response {
9
+ export declare class Conflict extends ErrorResponse {
10
10
  constructor(data: any);
11
11
  execute(_req: express.Request, _res: express.Response): Promise<(req: express.Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>, res: express.Response<any, Record<string, any>>) => void>;
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"conflict.d.ts","sourceRoot":"","sources":["../../../src/response-methods/conflict.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,EAAoB,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG9D;;;;GAIG;AAEH,qBAAa,QAAS,SAAQ,QAAQ;gBACxB,IAAI,EAAE,GAAG;IAIR,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ;CAGnE"}
1
+ {"version":3,"file":"conflict.d.ts","sourceRoot":"","sources":["../../../src/response-methods/conflict.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAGnC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;GAIG;AAEH,qBAAa,QAAS,SAAQ,aAAa;gBAC7B,IAAI,EAAE,GAAG;IAIR,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ;CAGnE"}