exodus-framework 2.0.708 → 2.0.710

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.
@@ -49,11 +49,17 @@ export declare enum EApiRequestMethod {
49
49
  DELETE = "delete",
50
50
  PATCH = "patch"
51
51
  }
52
+ export interface IRequestListData<D> {
53
+ page: number;
54
+ limit?: number;
55
+ orderBy?: keyof D;
56
+ order?: 'ASC' | 'DESC';
57
+ filters?: Record<keyof D, any>;
58
+ }
52
59
  export interface IResponseListData<D> {
53
60
  total: number;
54
61
  pages: number;
55
62
  hasMore: boolean;
56
- nextCursor: string;
57
63
  data: D[];
58
64
  }
59
65
  export interface IController {
@@ -1 +1 @@
1
- {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/contracts/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAOzC,MAAM,CAAC,OAAO,MAAM,oBAAoB,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;AAO3E,MAAM,CAAC,OAAO,MAAM,aAAa,CAAC,CAAC,GAAG,OAAO,IAAI;IAC/C,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,oBAAoB,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,CAAC,CAAC;CACV,CAAC;AAEF,MAAM,CAAC,OAAO,WAAW,kBAAkB,CAAC,CAAC,GAAG,OAAO;IACrD,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,CAAC,CAAC;CACV;AAED,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;IAChB,M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,IAAI,EAAE,YAAY;IAUtF,2BAA2B,QACpB,GAAG,OACH,OAAO,OACP,QAAQ,KAEV,YAAY,mBAoBf;IAEI,YAAY,CAAC,MAAM,EAAE,MAAM;IAyBjC,cAAc,CAAC,MAAM,EAAE,MAAM;CAG9B;AAED,eAAe,cAAc,CAAC"}
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _cors = _interopRequireDefault(require("cors"));
8
8
  var _express = _interopRequireDefault(require("express"));
9
+ var _qs = _interopRequireDefault(require("qs"));
9
10
  require("express-async-errors");
10
11
  var http = _interopRequireWildcard(require("http"));
11
12
  var _pinoHttp = _interopRequireDefault(require("pino-http"));
@@ -30,6 +31,7 @@ class ExpressService extends _service.default {
30
31
  this.server = http.createServer(expss);
31
32
  expss.use('/public', _express.default.static(_app.Core.settings.getHttp().publicPath));
32
33
  expss.use(pino);
34
+ expss.set('query parser', str => _qs.default.parse(str));
33
35
  expss.use(this.responseTypeMiddleware.bind(this));
34
36
  expss.use(_express.default.json());
35
37
  expss.use(_express.default.urlencoded({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exodus-framework",
3
- "version": "2.0.708",
3
+ "version": "2.0.710",
4
4
  "description": "Exodus Framework",
5
5
  "author": "jhownpaixao",
6
6
  "license": "ISC",
@@ -44,6 +44,7 @@
44
44
  "pino": "^9.3.2",
45
45
  "pino-http": "^10.2.0",
46
46
  "pino-multi-stream": "^6.0.0",
47
+ "qs": "^6.13.0",
47
48
  "redis": "^4.7.0",
48
49
  "reflect-metadata": "^0.2.2",
49
50
  "sequelize": "^6.37.3",
@@ -82,4 +83,4 @@
82
83
  "typescript": "^5.5.4",
83
84
  "vitest": "^2.0.5"
84
85
  }
85
- }
86
+ }