grm-shared-library 1.0.150 → 1.0.151

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.
@@ -0,0 +1,6 @@
1
+ export declare class CreateIncidentActionDto {
2
+ incidentId: number;
3
+ userId?: number;
4
+ action: string;
5
+ timestamp: Date;
6
+ }
@@ -0,0 +1,36 @@
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.CreateIncidentActionDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class CreateIncidentActionDto {
15
+ }
16
+ exports.CreateIncidentActionDto = CreateIncidentActionDto;
17
+ __decorate([
18
+ (0, class_validator_1.IsNumber)(),
19
+ (0, class_validator_1.IsNotEmpty)(),
20
+ __metadata("design:type", Number)
21
+ ], CreateIncidentActionDto.prototype, "incidentId", void 0);
22
+ __decorate([
23
+ (0, class_validator_1.IsNumber)(),
24
+ (0, class_validator_1.IsOptional)(),
25
+ __metadata("design:type", Number)
26
+ ], CreateIncidentActionDto.prototype, "userId", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsString)(),
29
+ (0, class_validator_1.IsNotEmpty)(),
30
+ __metadata("design:type", String)
31
+ ], CreateIncidentActionDto.prototype, "action", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsDate)(),
34
+ (0, class_validator_1.IsNotEmpty)(),
35
+ __metadata("design:type", Date)
36
+ ], CreateIncidentActionDto.prototype, "timestamp", void 0);
@@ -1,6 +1,7 @@
1
- export declare class IncidentActionDto {
2
- incidentId: number;
3
- userId?: number;
4
- action: string;
5
- timestamp: Date;
1
+ import { CreateIncidentActionDto } from "./create-incident-action.dto";
2
+ declare const IncidentActionDto_base: import("@nestjs/mapped-types").MappedType<Omit<CreateIncidentActionDto, "timestamp">>;
3
+ export declare class IncidentActionDto extends IncidentActionDto_base {
4
+ id: number;
5
+ timestamp: string;
6
6
  }
7
+ export {};
@@ -10,27 +10,19 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.IncidentActionDto = void 0;
13
+ const mapped_types_1 = require("@nestjs/mapped-types");
14
+ const create_incident_action_dto_1 = require("./create-incident-action.dto");
13
15
  const class_validator_1 = require("class-validator");
14
- class IncidentActionDto {
16
+ class IncidentActionDto extends (0, mapped_types_1.OmitType)(create_incident_action_dto_1.CreateIncidentActionDto, ['timestamp']) {
15
17
  }
16
18
  exports.IncidentActionDto = IncidentActionDto;
17
19
  __decorate([
18
20
  (0, class_validator_1.IsNumber)(),
19
21
  (0, class_validator_1.IsNotEmpty)(),
20
22
  __metadata("design:type", Number)
21
- ], IncidentActionDto.prototype, "incidentId", void 0);
23
+ ], IncidentActionDto.prototype, "id", void 0);
22
24
  __decorate([
23
- (0, class_validator_1.IsNumber)(),
24
- (0, class_validator_1.IsOptional)(),
25
- __metadata("design:type", Number)
26
- ], IncidentActionDto.prototype, "userId", void 0);
27
- __decorate([
28
- (0, class_validator_1.IsString)(),
25
+ (0, class_validator_1.IsDateString)(),
29
26
  (0, class_validator_1.IsNotEmpty)(),
30
27
  __metadata("design:type", String)
31
- ], IncidentActionDto.prototype, "action", void 0);
32
- __decorate([
33
- (0, class_validator_1.IsDate)(),
34
- (0, class_validator_1.IsNotEmpty)(),
35
- __metadata("design:type", Date)
36
28
  ], IncidentActionDto.prototype, "timestamp", void 0);
@@ -0,0 +1,5 @@
1
+ import { CreateIncidentActionDto } from "./create-incident-action.dto";
2
+ declare const UpdateIncidentActionDto_base: import("@nestjs/mapped-types").MappedType<Partial<CreateIncidentActionDto>>;
3
+ export declare class UpdateIncidentActionDto extends UpdateIncidentActionDto_base {
4
+ }
5
+ export {};
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateIncidentActionDto = void 0;
4
+ const mapped_types_1 = require("@nestjs/mapped-types");
5
+ const create_incident_action_dto_1 = require("./create-incident-action.dto");
6
+ class UpdateIncidentActionDto extends (0, mapped_types_1.PartialType)(create_incident_action_dto_1.CreateIncidentActionDto) {
7
+ }
8
+ exports.UpdateIncidentActionDto = UpdateIncidentActionDto;
@@ -1,12 +1,12 @@
1
1
  import { CreateIncidentDto } from "./create-incident.dto";
2
2
  import { CreateIncidentCategoryDto } from "../category/create-incident-category.dto";
3
3
  import { CreateIncidentTypeDto } from "../type/create-incident-type.dto";
4
- import { IncidentAction } from "../../intefaces/incident-action";
4
+ import { IncidentActionDto } from "../action/incident-action.dto";
5
5
  export declare class IncidentDto extends CreateIncidentDto {
6
6
  id: number;
7
- createdAt: string;
8
- updatedAt: string;
9
7
  category?: CreateIncidentCategoryDto;
10
8
  type?: CreateIncidentTypeDto;
11
- actions?: IncidentAction[];
9
+ actions?: IncidentActionDto[];
10
+ createdAt: string;
11
+ updatedAt: string;
12
12
  }
@@ -15,6 +15,7 @@ const create_incident_dto_1 = require("./create-incident.dto");
15
15
  const class_transformer_1 = require("class-transformer");
16
16
  const create_incident_category_dto_1 = require("../category/create-incident-category.dto");
17
17
  const create_incident_type_dto_1 = require("../type/create-incident-type.dto");
18
+ const incident_action_dto_1 = require("../action/incident-action.dto");
18
19
  class IncidentDto extends create_incident_dto_1.CreateIncidentDto {
19
20
  }
20
21
  exports.IncidentDto = IncidentDto;
@@ -23,16 +24,6 @@ __decorate([
23
24
  (0, class_validator_1.IsNotEmpty)(),
24
25
  __metadata("design:type", Number)
25
26
  ], IncidentDto.prototype, "id", void 0);
26
- __decorate([
27
- (0, class_validator_1.IsDateString)(),
28
- (0, class_validator_1.IsNotEmpty)(),
29
- __metadata("design:type", String)
30
- ], IncidentDto.prototype, "createdAt", void 0);
31
- __decorate([
32
- (0, class_validator_1.IsDateString)(),
33
- (0, class_validator_1.IsNotEmpty)(),
34
- __metadata("design:type", String)
35
- ], IncidentDto.prototype, "updatedAt", void 0);
36
27
  __decorate([
37
28
  (0, class_validator_1.ValidateNested)(),
38
29
  (0, class_transformer_1.Type)(() => create_incident_category_dto_1.CreateIncidentCategoryDto),
@@ -46,7 +37,19 @@ __decorate([
46
37
  __metadata("design:type", create_incident_type_dto_1.CreateIncidentTypeDto)
47
38
  ], IncidentDto.prototype, "type", void 0);
48
39
  __decorate([
49
- (0, class_validator_1.IsArray)(),
50
40
  (0, class_validator_1.IsOptional)(),
41
+ (0, class_validator_1.IsArray)(),
42
+ (0, class_validator_1.ValidateNested)({ each: true }),
43
+ (0, class_transformer_1.Type)(() => incident_action_dto_1.IncidentActionDto),
51
44
  __metadata("design:type", Array)
52
45
  ], IncidentDto.prototype, "actions", void 0);
46
+ __decorate([
47
+ (0, class_validator_1.IsDateString)(),
48
+ (0, class_validator_1.IsNotEmpty)(),
49
+ __metadata("design:type", String)
50
+ ], IncidentDto.prototype, "createdAt", void 0);
51
+ __decorate([
52
+ (0, class_validator_1.IsDateString)(),
53
+ (0, class_validator_1.IsNotEmpty)(),
54
+ __metadata("design:type", String)
55
+ ], IncidentDto.prototype, "updatedAt", void 0);
@@ -1,4 +1,6 @@
1
1
  export * from './dtos/action/incident-action.dto';
2
+ export * from './dtos/action/create-incident-action.dto';
3
+ export * from './dtos/action/update-inident-action.dto';
2
4
  export * from './dtos/attachment/create-incident-attachment.dto';
3
5
  export * from './dtos/attachment/update-incident-attachment.dto';
4
6
  export * from './dtos/category/create-incident-category.dto';
@@ -16,6 +16,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  // Dtos
18
18
  __exportStar(require("./dtos/action/incident-action.dto"), exports);
19
+ __exportStar(require("./dtos/action/create-incident-action.dto"), exports);
20
+ __exportStar(require("./dtos/action/update-inident-action.dto"), exports);
19
21
  __exportStar(require("./dtos/attachment/create-incident-attachment.dto"), exports);
20
22
  __exportStar(require("./dtos/attachment/update-incident-attachment.dto"), exports);
21
23
  __exportStar(require("./dtos/category/create-incident-category.dto"), exports);
@@ -4,6 +4,4 @@ export interface IncidentAction {
4
4
  userId?: number;
5
5
  action: string;
6
6
  timestamp: string;
7
- createdAt?: string;
8
- updatedAt?: string;
9
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grm-shared-library",
3
- "version": "1.0.150",
3
+ "version": "1.0.151",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [