@saihu/common 1.1.13 → 1.1.14

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.
@@ -1,19 +1,19 @@
1
1
  export declare class PaginationQueryDto {
2
- /**
3
- * Page number for pagination (starts from 1)
4
- * @example 1
5
- */
6
- page_no?: number;
2
+ page_no: number;
7
3
  /**
8
4
  * Number of items per page (max 100)
9
5
  * @example 10
10
6
  */
11
- page_size?: number;
7
+ page_size: number;
12
8
  }
13
- export interface PaginationResponseDto {
9
+ export declare class PaginationResponseDto {
14
10
  total: number;
15
11
  page_total: number;
16
12
  current_page: number;
17
13
  page_size: number;
18
14
  }
15
+ export declare class PaginatedResponseDto<T> {
16
+ pagination: PaginationResponseDto;
17
+ data: T;
18
+ }
19
19
  //# sourceMappingURL=pagination.dto.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.dto.d.ts","sourceRoot":"","sources":["../../src/dto/pagination.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,kBAAkB;IAC7B;;;OAGG;IAKH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IAMH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB"}
1
+ {"version":3,"file":"pagination.dto.d.ts","sourceRoot":"","sources":["../../src/dto/pagination.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,kBAAkB;IAK7B,OAAO,EAAE,MAAM,CAAK;IAEpB;;;OAGG;IAMH,SAAS,EAAE,MAAM,CAAM;CACxB;AAED,qBAAa,qBAAqB;IAChC,KAAK,EAAG,MAAM,CAAC;IACf,UAAU,EAAG,MAAM,CAAC;IACpB,YAAY,EAAG,MAAM,CAAC;IACtB,SAAS,EAAG,MAAM,CAAC;CACpB;AAED,qBAAa,oBAAoB,CAAC,CAAC;IACjC,UAAU,EAAG,qBAAqB,CAAC;IACnC,IAAI,EAAG,CAAC,CAAC;CACV"}
@@ -9,10 +9,18 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.PaginationQueryDto = void 0;
12
+ exports.PaginatedResponseDto = exports.PaginationResponseDto = exports.PaginationQueryDto = void 0;
13
13
  const class_transformer_1 = require("class-transformer");
14
14
  const class_validator_1 = require("class-validator");
15
15
  class PaginationQueryDto {
16
+ constructor() {
17
+ this.page_no = 1;
18
+ /**
19
+ * Number of items per page (max 100)
20
+ * @example 10
21
+ */
22
+ this.page_size = 10;
23
+ }
16
24
  }
17
25
  exports.PaginationQueryDto = PaginationQueryDto;
18
26
  __decorate([
@@ -30,3 +38,9 @@ __decorate([
30
38
  (0, class_validator_1.Max)(100, { message: 'page_size cannot exceed 100' }),
31
39
  __metadata("design:type", Number)
32
40
  ], PaginationQueryDto.prototype, "page_size", void 0);
41
+ class PaginationResponseDto {
42
+ }
43
+ exports.PaginationResponseDto = PaginationResponseDto;
44
+ class PaginatedResponseDto {
45
+ }
46
+ exports.PaginatedResponseDto = PaginatedResponseDto;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saihu/common",
3
- "version": "1.1.13",
3
+ "version": "1.1.14",
4
4
  "description": "Common utilities for NestJS applications",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",