@nmxjs/types 1.0.0

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 (66) hide show
  1. package/.github/workflows/npm.yaml +31 -0
  2. package/README.md +1 -0
  3. package/dist/dto/EntityDto.d.ts +5 -0
  4. package/dist/dto/EntityDto.js +35 -0
  5. package/dist/dto/EntityDto.js.map +1 -0
  6. package/dist/dto/ListRequestDto.d.ts +8 -0
  7. package/dist/dto/ListRequestDto.js +42 -0
  8. package/dist/dto/ListRequestDto.js.map +1 -0
  9. package/dist/dto/ListRequestFilterDto.d.ts +7 -0
  10. package/dist/dto/ListRequestFilterDto.js +45 -0
  11. package/dist/dto/ListRequestFilterDto.js.map +1 -0
  12. package/dist/dto/ListRequestPaginationDto.d.ts +4 -0
  13. package/dist/dto/ListRequestPaginationDto.js +33 -0
  14. package/dist/dto/ListRequestPaginationDto.js.map +1 -0
  15. package/dist/dto/ListRequestSortDto.d.ts +5 -0
  16. package/dist/dto/ListRequestSortDto.js +31 -0
  17. package/dist/dto/ListRequestSortDto.js.map +1 -0
  18. package/dist/dto/ListResponseCursorDto.d.ts +5 -0
  19. package/dist/dto/ListResponseCursorDto.js +35 -0
  20. package/dist/dto/ListResponseCursorDto.js.map +1 -0
  21. package/dist/dto/ListResponseDto.d.ts +5 -0
  22. package/dist/dto/ListResponseDto.js +24 -0
  23. package/dist/dto/ListResponseDto.js.map +1 -0
  24. package/dist/dto/UpdateRequestDto.d.ts +4 -0
  25. package/dist/dto/UpdateRequestDto.js +23 -0
  26. package/dist/dto/UpdateRequestDto.js.map +1 -0
  27. package/dist/dto/index.d.ts +5 -0
  28. package/dist/dto/index.js +22 -0
  29. package/dist/dto/index.js.map +1 -0
  30. package/dist/index.d.ts +2 -0
  31. package/dist/index.js +19 -0
  32. package/dist/index.js.map +1 -0
  33. package/dist/interfaces/DecoratorHandler.d.ts +2 -0
  34. package/dist/interfaces/DecoratorHandler.js +3 -0
  35. package/dist/interfaces/DecoratorHandler.js.map +1 -0
  36. package/dist/interfaces/EnvironmentEnum.d.ts +5 -0
  37. package/dist/interfaces/EnvironmentEnum.js +10 -0
  38. package/dist/interfaces/EnvironmentEnum.js.map +1 -0
  39. package/dist/interfaces/FilterOperatorEnum.d.ts +8 -0
  40. package/dist/interfaces/FilterOperatorEnum.js +13 -0
  41. package/dist/interfaces/FilterOperatorEnum.js.map +1 -0
  42. package/dist/interfaces/FunctionType.d.ts +1 -0
  43. package/dist/interfaces/FunctionType.js +3 -0
  44. package/dist/interfaces/FunctionType.js.map +1 -0
  45. package/dist/interfaces/IBootModeParam.d.ts +9 -0
  46. package/dist/interfaces/IBootModeParam.js +3 -0
  47. package/dist/interfaces/IBootModeParam.js.map +1 -0
  48. package/dist/interfaces/ICallback.d.ts +3 -0
  49. package/dist/interfaces/ICallback.js +3 -0
  50. package/dist/interfaces/ICallback.js.map +1 -0
  51. package/dist/interfaces/IService.d.ts +3 -0
  52. package/dist/interfaces/IService.js +3 -0
  53. package/dist/interfaces/IService.js.map +1 -0
  54. package/dist/interfaces/RecursivePartial.d.ts +3 -0
  55. package/dist/interfaces/RecursivePartial.js +3 -0
  56. package/dist/interfaces/RecursivePartial.js.map +1 -0
  57. package/dist/interfaces/SortOrderByEnum.d.ts +4 -0
  58. package/dist/interfaces/SortOrderByEnum.js +9 -0
  59. package/dist/interfaces/SortOrderByEnum.js.map +1 -0
  60. package/dist/interfaces/StartModeEnum.d.ts +5 -0
  61. package/dist/interfaces/StartModeEnum.js +10 -0
  62. package/dist/interfaces/StartModeEnum.js.map +1 -0
  63. package/dist/interfaces/index.d.ts +10 -0
  64. package/dist/interfaces/index.js +27 -0
  65. package/dist/interfaces/index.js.map +1 -0
  66. package/package.json +30 -0
@@ -0,0 +1,31 @@
1
+ name: Npm Publish
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+
8
+ jobs:
9
+ containerize:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Clone files
13
+ uses: actions/checkout@v3
14
+
15
+ - name: Use node
16
+ uses: actions/setup-node@v3
17
+ with:
18
+ node-version: 18.18.0
19
+ cache: 'yarn'
20
+ registry-url: https://registry.npmjs.org
21
+
22
+ - name: Install dependencies
23
+ run: yarn install --frozen-lockfile
24
+
25
+ - name: Build
26
+ run: yarn build
27
+
28
+ - name: Publish
29
+ run: npm publish --access public
30
+ env:
31
+ NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
package/README.md ADDED
@@ -0,0 +1 @@
1
+ # nm-types
@@ -0,0 +1,5 @@
1
+ export declare class EntityDto {
2
+ id: string;
3
+ createdAt: number;
4
+ updatedAt: number;
5
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.EntityDto = void 0;
13
+ const validation_1 = require("@nmxjs/validation");
14
+ class EntityDto {
15
+ }
16
+ exports.EntityDto = EntityDto;
17
+ __decorate([
18
+ (0, validation_1.Field)({
19
+ type: String,
20
+ }),
21
+ __metadata("design:type", String)
22
+ ], EntityDto.prototype, "id", void 0);
23
+ __decorate([
24
+ (0, validation_1.Field)({
25
+ type: Number,
26
+ }),
27
+ __metadata("design:type", Number)
28
+ ], EntityDto.prototype, "createdAt", void 0);
29
+ __decorate([
30
+ (0, validation_1.Field)({
31
+ type: Number,
32
+ }),
33
+ __metadata("design:type", Number)
34
+ ], EntityDto.prototype, "updatedAt", void 0);
35
+ //# sourceMappingURL=EntityDto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntityDto.js","sourceRoot":"","sources":["../../src/dto/EntityDto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA0C;AAE1C,MAAa,SAAS;CAerB;AAfD,8BAeC;AAXC;IAHC,IAAA,kBAAK,EAAC;QACL,IAAI,EAAE,MAAM;KACb,CAAC;;qCACS;AAKX;IAHC,IAAA,kBAAK,EAAC;QACL,IAAI,EAAE,MAAM;KACb,CAAC;;4CACgB;AAKlB;IAHC,IAAA,kBAAK,EAAC;QACL,IAAI,EAAE,MAAM;KACb,CAAC;;4CACgB"}
@@ -0,0 +1,8 @@
1
+ import { ListRequestPaginationDto } from './ListRequestPaginationDto';
2
+ import { ListRequestFilterDto } from './ListRequestFilterDto';
3
+ import { ListRequestSortDto } from './ListRequestSortDto';
4
+ export declare abstract class ListRequestDto {
5
+ filters?: ListRequestFilterDto[];
6
+ sorts?: ListRequestSortDto[];
7
+ pagination: ListRequestPaginationDto;
8
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ListRequestDto = void 0;
13
+ const validation_1 = require("@nmxjs/validation");
14
+ const ListRequestPaginationDto_1 = require("./ListRequestPaginationDto");
15
+ const ListRequestFilterDto_1 = require("./ListRequestFilterDto");
16
+ const ListRequestSortDto_1 = require("./ListRequestSortDto");
17
+ class ListRequestDto {
18
+ }
19
+ exports.ListRequestDto = ListRequestDto;
20
+ __decorate([
21
+ (0, validation_1.Field)({
22
+ type: ListRequestFilterDto_1.ListRequestFilterDto,
23
+ array: true,
24
+ nullable: true,
25
+ }),
26
+ __metadata("design:type", Array)
27
+ ], ListRequestDto.prototype, "filters", void 0);
28
+ __decorate([
29
+ (0, validation_1.Field)({
30
+ type: ListRequestSortDto_1.ListRequestSortDto,
31
+ array: true,
32
+ nullable: true,
33
+ }),
34
+ __metadata("design:type", Array)
35
+ ], ListRequestDto.prototype, "sorts", void 0);
36
+ __decorate([
37
+ (0, validation_1.Field)({
38
+ type: ListRequestPaginationDto_1.ListRequestPaginationDto,
39
+ }),
40
+ __metadata("design:type", ListRequestPaginationDto_1.ListRequestPaginationDto)
41
+ ], ListRequestDto.prototype, "pagination", void 0);
42
+ //# sourceMappingURL=ListRequestDto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListRequestDto.js","sourceRoot":"","sources":["../../src/dto/ListRequestDto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA0C;AAC1C,yEAAsE;AACtE,iEAA8D;AAC9D,6DAA0D;AAE1D,MAAsB,cAAc;CAmBnC;AAnBD,wCAmBC;AAbC;IALC,IAAA,kBAAK,EAAC;QACL,IAAI,EAAE,2CAAoB;QAC1B,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,IAAI;KACf,CAAC;;+CAC+B;AAOjC;IALC,IAAA,kBAAK,EAAC;QACL,IAAI,EAAE,uCAAkB;QACxB,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,IAAI;KACf,CAAC;;6CAC2B;AAK7B;IAHC,IAAA,kBAAK,EAAC;QACL,IAAI,EAAE,mDAAwB;KAC/B,CAAC;8BACU,mDAAwB;kDAAC"}
@@ -0,0 +1,7 @@
1
+ import { FilterOperatorEnum } from '../interfaces';
2
+ export declare abstract class ListRequestFilterDto {
3
+ field: string;
4
+ values: string[];
5
+ operator: FilterOperatorEnum;
6
+ not?: boolean;
7
+ }
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ListRequestFilterDto = void 0;
13
+ const validation_1 = require("@nmxjs/validation");
14
+ const interfaces_1 = require("../interfaces");
15
+ class ListRequestFilterDto {
16
+ }
17
+ exports.ListRequestFilterDto = ListRequestFilterDto;
18
+ __decorate([
19
+ (0, validation_1.Field)({
20
+ type: String,
21
+ }),
22
+ __metadata("design:type", String)
23
+ ], ListRequestFilterDto.prototype, "field", void 0);
24
+ __decorate([
25
+ (0, validation_1.Field)({
26
+ type: String,
27
+ array: true,
28
+ }),
29
+ __metadata("design:type", Array)
30
+ ], ListRequestFilterDto.prototype, "values", void 0);
31
+ __decorate([
32
+ (0, validation_1.Field)({
33
+ type: { FilterOperatorEnum: interfaces_1.FilterOperatorEnum },
34
+ enum: true,
35
+ }),
36
+ __metadata("design:type", String)
37
+ ], ListRequestFilterDto.prototype, "operator", void 0);
38
+ __decorate([
39
+ (0, validation_1.Field)({
40
+ type: Boolean,
41
+ nullable: true,
42
+ }),
43
+ __metadata("design:type", Boolean)
44
+ ], ListRequestFilterDto.prototype, "not", void 0);
45
+ //# sourceMappingURL=ListRequestFilterDto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListRequestFilterDto.js","sourceRoot":"","sources":["../../src/dto/ListRequestFilterDto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA0C;AAC1C,8CAAmD;AAEnD,MAAsB,oBAAoB;CAuBzC;AAvBD,oDAuBC;AAnBC;IAHC,IAAA,kBAAK,EAAC;QACL,IAAI,EAAE,MAAM;KACb,CAAC;;mDACY;AAMd;IAJC,IAAA,kBAAK,EAAC;QACL,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,IAAI;KACZ,CAAC;;oDACe;AAMjB;IAJC,IAAA,kBAAK,EAAC;QACL,IAAI,EAAE,EAAE,kBAAkB,EAAlB,+BAAkB,EAAE;QAC5B,IAAI,EAAE,IAAI;KACX,CAAC;;sDAC2B;AAM7B;IAJC,IAAA,kBAAK,EAAC;QACL,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,IAAI;KACf,CAAC;;iDACY"}
@@ -0,0 +1,4 @@
1
+ export declare abstract class ListRequestPaginationDto {
2
+ page: number;
3
+ limit: number;
4
+ }
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ListRequestPaginationDto = void 0;
13
+ const validation_1 = require("@nmxjs/validation");
14
+ class ListRequestPaginationDto {
15
+ constructor() {
16
+ this.page = 1;
17
+ this.limit = 100;
18
+ }
19
+ }
20
+ exports.ListRequestPaginationDto = ListRequestPaginationDto;
21
+ __decorate([
22
+ (0, validation_1.Field)({
23
+ type: Number,
24
+ }),
25
+ __metadata("design:type", Number)
26
+ ], ListRequestPaginationDto.prototype, "page", void 0);
27
+ __decorate([
28
+ (0, validation_1.Field)({
29
+ type: Number,
30
+ }),
31
+ __metadata("design:type", Number)
32
+ ], ListRequestPaginationDto.prototype, "limit", void 0);
33
+ //# sourceMappingURL=ListRequestPaginationDto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListRequestPaginationDto.js","sourceRoot":"","sources":["../../src/dto/ListRequestPaginationDto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA0C;AAE1C,MAAsB,wBAAwB;IAA9C;QAIE,SAAI,GAAW,CAAC,CAAC;QAKjB,UAAK,GAAW,GAAG,CAAC;IACtB,CAAC;CAAA;AAVD,4DAUC;AANC;IAHC,IAAA,kBAAK,EAAC;QACL,IAAI,EAAE,MAAM;KACb,CAAC;;sDACe;AAKjB;IAHC,IAAA,kBAAK,EAAC;QACL,IAAI,EAAE,MAAM;KACb,CAAC;;uDACkB"}
@@ -0,0 +1,5 @@
1
+ import { SortOrderByEnum } from '../interfaces';
2
+ export declare abstract class ListRequestSortDto {
3
+ field: string;
4
+ type: SortOrderByEnum;
5
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ListRequestSortDto = void 0;
13
+ const validation_1 = require("@nmxjs/validation");
14
+ const interfaces_1 = require("../interfaces");
15
+ class ListRequestSortDto {
16
+ }
17
+ exports.ListRequestSortDto = ListRequestSortDto;
18
+ __decorate([
19
+ (0, validation_1.Field)({
20
+ type: String,
21
+ }),
22
+ __metadata("design:type", String)
23
+ ], ListRequestSortDto.prototype, "field", void 0);
24
+ __decorate([
25
+ (0, validation_1.Field)({
26
+ type: { SortOrderByEnum: interfaces_1.SortOrderByEnum },
27
+ enum: true,
28
+ }),
29
+ __metadata("design:type", String)
30
+ ], ListRequestSortDto.prototype, "type", void 0);
31
+ //# sourceMappingURL=ListRequestSortDto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListRequestSortDto.js","sourceRoot":"","sources":["../../src/dto/ListRequestSortDto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA0C;AAC1C,8CAAgD;AAEhD,MAAsB,kBAAkB;CAWvC;AAXD,gDAWC;AAPC;IAHC,IAAA,kBAAK,EAAC;QACL,IAAI,EAAE,MAAM;KACb,CAAC;;iDACY;AAMd;IAJC,IAAA,kBAAK,EAAC;QACL,IAAI,EAAE,EAAE,eAAe,EAAf,4BAAe,EAAE;QACzB,IAAI,EAAE,IAAI;KACX,CAAC;;gDACoB"}
@@ -0,0 +1,5 @@
1
+ export declare abstract class ListResponseCursorDto {
2
+ totalCount: number;
3
+ totalPages: number;
4
+ nextPage?: number;
5
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ListResponseCursorDto = void 0;
13
+ const validation_1 = require("@nmxjs/validation");
14
+ class ListResponseCursorDto {
15
+ }
16
+ exports.ListResponseCursorDto = ListResponseCursorDto;
17
+ __decorate([
18
+ (0, validation_1.Field)({
19
+ type: Number,
20
+ }),
21
+ __metadata("design:type", Number)
22
+ ], ListResponseCursorDto.prototype, "totalCount", void 0);
23
+ __decorate([
24
+ (0, validation_1.Field)({
25
+ type: Number,
26
+ }),
27
+ __metadata("design:type", Number)
28
+ ], ListResponseCursorDto.prototype, "totalPages", void 0);
29
+ __decorate([
30
+ (0, validation_1.Field)({
31
+ type: Number,
32
+ }),
33
+ __metadata("design:type", Number)
34
+ ], ListResponseCursorDto.prototype, "nextPage", void 0);
35
+ //# sourceMappingURL=ListResponseCursorDto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListResponseCursorDto.js","sourceRoot":"","sources":["../../src/dto/ListResponseCursorDto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA0C;AAE1C,MAAsB,qBAAqB;CAe1C;AAfD,sDAeC;AAXC;IAHC,IAAA,kBAAK,EAAC;QACL,IAAI,EAAE,MAAM;KACb,CAAC;;yDACiB;AAKnB;IAHC,IAAA,kBAAK,EAAC;QACL,IAAI,EAAE,MAAM;KACb,CAAC;;yDACiB;AAKnB;IAHC,IAAA,kBAAK,EAAC;QACL,IAAI,EAAE,MAAM;KACb,CAAC;;uDACgB"}
@@ -0,0 +1,5 @@
1
+ import { ListResponseCursorDto } from './ListResponseCursorDto';
2
+ export declare abstract class ListResponseDto<T = object> {
3
+ abstract items: T[];
4
+ cursor: ListResponseCursorDto;
5
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ListResponseDto = void 0;
13
+ const validation_1 = require("@nmxjs/validation");
14
+ const ListResponseCursorDto_1 = require("./ListResponseCursorDto");
15
+ class ListResponseDto {
16
+ }
17
+ exports.ListResponseDto = ListResponseDto;
18
+ __decorate([
19
+ (0, validation_1.Field)({
20
+ type: ListResponseCursorDto_1.ListResponseCursorDto,
21
+ }),
22
+ __metadata("design:type", ListResponseCursorDto_1.ListResponseCursorDto)
23
+ ], ListResponseDto.prototype, "cursor", void 0);
24
+ //# sourceMappingURL=ListResponseDto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListResponseDto.js","sourceRoot":"","sources":["../../src/dto/ListResponseDto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA0C;AAC1C,mEAAgE;AAEhE,MAAsB,eAAe;CAOpC;AAPD,0CAOC;AADC;IAHC,IAAA,kBAAK,EAAC;QACL,IAAI,EAAE,6CAAqB;KAC5B,CAAC;8BACM,6CAAqB;+CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare abstract class UpdateRequestDto<T = object> {
2
+ abstract payload: T;
3
+ id: string;
4
+ }
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.UpdateRequestDto = void 0;
13
+ const validation_1 = require("@nmxjs/validation");
14
+ class UpdateRequestDto {
15
+ }
16
+ exports.UpdateRequestDto = UpdateRequestDto;
17
+ __decorate([
18
+ (0, validation_1.Field)({
19
+ type: String,
20
+ }),
21
+ __metadata("design:type", String)
22
+ ], UpdateRequestDto.prototype, "id", void 0);
23
+ //# sourceMappingURL=UpdateRequestDto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UpdateRequestDto.js","sourceRoot":"","sources":["../../src/dto/UpdateRequestDto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA0C;AAE1C,MAAsB,gBAAgB;CAOrC;AAPD,4CAOC;AADC;IAHC,IAAA,kBAAK,EAAC;QACL,IAAI,EAAE,MAAM;KACb,CAAC;;4CACS"}
@@ -0,0 +1,5 @@
1
+ export * from './EntityDto';
2
+ export * from './UpdateRequestDto';
3
+ export * from './ListRequestDto';
4
+ export * from './ListResponseDto';
5
+ export * from './ListRequestPaginationDto';
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./EntityDto"), exports);
18
+ __exportStar(require("./UpdateRequestDto"), exports);
19
+ __exportStar(require("./ListRequestDto"), exports);
20
+ __exportStar(require("./ListResponseDto"), exports);
21
+ __exportStar(require("./ListRequestPaginationDto"), exports);
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,qDAAmC;AACnC,mDAAiC;AACjC,oDAAkC;AAClC,6DAA2C"}
@@ -0,0 +1,2 @@
1
+ export * from './dto';
2
+ export * from './interfaces';
package/dist/index.js ADDED
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./dto"), exports);
18
+ __exportStar(require("./interfaces"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,+CAA6B"}
@@ -0,0 +1,2 @@
1
+ import { FunctionType } from './FunctionType';
2
+ export type DecoratorHandler = <T extends FunctionType>(fn: T) => T;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=DecoratorHandler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DecoratorHandler.js","sourceRoot":"","sources":["../../src/interfaces/DecoratorHandler.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export declare enum EnvironmentEnum {
2
+ DEVELOPMENT = "development",
3
+ PRODUCTION = "production",
4
+ TEST = "test"
5
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EnvironmentEnum = void 0;
4
+ var EnvironmentEnum;
5
+ (function (EnvironmentEnum) {
6
+ EnvironmentEnum["DEVELOPMENT"] = "development";
7
+ EnvironmentEnum["PRODUCTION"] = "production";
8
+ EnvironmentEnum["TEST"] = "test";
9
+ })(EnvironmentEnum || (exports.EnvironmentEnum = EnvironmentEnum = {}));
10
+ //# sourceMappingURL=EnvironmentEnum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnvironmentEnum.js","sourceRoot":"","sources":["../../src/interfaces/EnvironmentEnum.ts"],"names":[],"mappings":";;;AAAA,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,8CAA2B,CAAA;IAC3B,4CAAyB,CAAA;IACzB,gCAAa,CAAA;AACf,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B"}
@@ -0,0 +1,8 @@
1
+ export declare enum FilterOperatorEnum {
2
+ MUST = "MUST",
3
+ EQ = "EQ",
4
+ NUM_EQ = "NUM_EQ",
5
+ IN = "IN",
6
+ SOME = "SOME",
7
+ LIKE = "LIKE"
8
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FilterOperatorEnum = void 0;
4
+ var FilterOperatorEnum;
5
+ (function (FilterOperatorEnum) {
6
+ FilterOperatorEnum["MUST"] = "MUST";
7
+ FilterOperatorEnum["EQ"] = "EQ";
8
+ FilterOperatorEnum["NUM_EQ"] = "NUM_EQ";
9
+ FilterOperatorEnum["IN"] = "IN";
10
+ FilterOperatorEnum["SOME"] = "SOME";
11
+ FilterOperatorEnum["LIKE"] = "LIKE";
12
+ })(FilterOperatorEnum || (exports.FilterOperatorEnum = FilterOperatorEnum = {}));
13
+ //# sourceMappingURL=FilterOperatorEnum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilterOperatorEnum.js","sourceRoot":"","sources":["../../src/interfaces/FilterOperatorEnum.ts"],"names":[],"mappings":";;;AAAA,IAAY,kBAOX;AAPD,WAAY,kBAAkB;IAC5B,mCAAa,CAAA;IACb,+BAAS,CAAA;IACT,uCAAiB,CAAA;IACjB,+BAAS,CAAA;IACT,mCAAa,CAAA;IACb,mCAAa,CAAA;AACf,CAAC,EAPW,kBAAkB,kCAAlB,kBAAkB,QAO7B"}
@@ -0,0 +1 @@
1
+ export type FunctionType = (...params: unknown[]) => unknown;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=FunctionType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FunctionType.js","sourceRoot":"","sources":["../../src/interfaces/FunctionType.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ export interface IBootModeParam {
2
+ bootMode: string;
3
+ key: string;
4
+ type: typeof String | typeof Number;
5
+ default?: string;
6
+ min?: number;
7
+ max?: number;
8
+ allow?: string[];
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IBootModeParam.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IBootModeParam.js","sourceRoot":"","sources":["../../src/interfaces/IBootModeParam.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export interface ICallback<T = any> {
2
+ (data?: T): void;
3
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ICallback.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ICallback.js","sourceRoot":"","sources":["../../src/interfaces/ICallback.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export interface IService {
2
+ call(...params: any[]): void;
3
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IService.js","sourceRoot":"","sources":["../../src/interfaces/IService.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export type RecursivePartial<T> = {
2
+ [P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial<U>[] : T[P] extends object ? RecursivePartial<T[P]> : T[P];
3
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=RecursivePartial.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecursivePartial.js","sourceRoot":"","sources":["../../src/interfaces/RecursivePartial.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export declare enum SortOrderByEnum {
2
+ ASC = "ASC",
3
+ DESC = "DESC"
4
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SortOrderByEnum = void 0;
4
+ var SortOrderByEnum;
5
+ (function (SortOrderByEnum) {
6
+ SortOrderByEnum["ASC"] = "ASC";
7
+ SortOrderByEnum["DESC"] = "DESC";
8
+ })(SortOrderByEnum || (exports.SortOrderByEnum = SortOrderByEnum = {}));
9
+ //# sourceMappingURL=SortOrderByEnum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SortOrderByEnum.js","sourceRoot":"","sources":["../../src/interfaces/SortOrderByEnum.ts"],"names":[],"mappings":";;;AAAA,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,8BAAW,CAAA;IACX,gCAAa,CAAA;AACf,CAAC,EAHW,eAAe,+BAAf,eAAe,QAG1B"}
@@ -0,0 +1,5 @@
1
+ export declare enum StartModeEnum {
2
+ DEV = "DEV",
3
+ NATIVE = "NATIVE",
4
+ WATCH = "WATCH"
5
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StartModeEnum = void 0;
4
+ var StartModeEnum;
5
+ (function (StartModeEnum) {
6
+ StartModeEnum["DEV"] = "DEV";
7
+ StartModeEnum["NATIVE"] = "NATIVE";
8
+ StartModeEnum["WATCH"] = "WATCH";
9
+ })(StartModeEnum || (exports.StartModeEnum = StartModeEnum = {}));
10
+ //# sourceMappingURL=StartModeEnum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StartModeEnum.js","sourceRoot":"","sources":["../../src/interfaces/StartModeEnum.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,4BAAW,CAAA;IACX,kCAAiB,CAAA;IACjB,gCAAe,CAAA;AACjB,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB"}
@@ -0,0 +1,10 @@
1
+ export * from './RecursivePartial';
2
+ export * from './EnvironmentEnum';
3
+ export * from './DecoratorHandler';
4
+ export * from './StartModeEnum';
5
+ export * from './FunctionType';
6
+ export * from './IService';
7
+ export * from './ICallback';
8
+ export * from './IBootModeParam';
9
+ export * from './FilterOperatorEnum';
10
+ export * from './SortOrderByEnum';
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./RecursivePartial"), exports);
18
+ __exportStar(require("./EnvironmentEnum"), exports);
19
+ __exportStar(require("./DecoratorHandler"), exports);
20
+ __exportStar(require("./StartModeEnum"), exports);
21
+ __exportStar(require("./FunctionType"), exports);
22
+ __exportStar(require("./IService"), exports);
23
+ __exportStar(require("./ICallback"), exports);
24
+ __exportStar(require("./IBootModeParam"), exports);
25
+ __exportStar(require("./FilterOperatorEnum"), exports);
26
+ __exportStar(require("./SortOrderByEnum"), exports);
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,oDAAkC;AAClC,qDAAmC;AACnC,kDAAgC;AAChC,iDAA+B;AAC/B,6CAA2B;AAC3B,8CAA4B;AAC5B,mDAAiC;AACjC,uDAAqC;AACrC,oDAAkC"}
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@nmxjs/types",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "scripts": {
8
+ "start": "echo [@nmxjs/types has no start script]",
9
+ "clear": "rm -rf dist",
10
+ "build": "yarn clear; tsc",
11
+ "test": "jest --config=jest.config.js --runInBand --passWithNoTests"
12
+ },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/n1ghtm6r9/nm-types.git"
16
+ },
17
+ "keywords": [],
18
+ "author": "N1ghtm6r9",
19
+ "license": "ISC",
20
+ "bugs": {
21
+ "url": "https://github.com/n1ghtm6r9/nm-types/issues"
22
+ },
23
+ "homepage": "https://github.com/n1ghtm6r9/nm-types#readme",
24
+ "devDependencies": {
25
+ "typescript": "^5.1.6"
26
+ },
27
+ "dependencies": {
28
+ "@nmxjs/validation": "^1.0.2"
29
+ }
30
+ }