grm-shared-library 1.0.156 → 1.0.158

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,7 +1,8 @@
1
+ import { IncidentActions } from "../../enums/incident-actions.enum";
1
2
  export declare class CreateIncidentActionDto {
2
3
  incidentId: number;
3
4
  userId?: number;
4
- action: string;
5
+ action: IncidentActions;
5
6
  comments?: string;
6
7
  timestamp: Date;
7
8
  }
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.CreateIncidentActionDto = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
+ const incident_actions_enum_1 = require("../../enums/incident-actions.enum");
14
15
  class CreateIncidentActionDto {
15
16
  }
16
17
  exports.CreateIncidentActionDto = CreateIncidentActionDto;
@@ -25,7 +26,7 @@ __decorate([
25
26
  __metadata("design:type", Number)
26
27
  ], CreateIncidentActionDto.prototype, "userId", void 0);
27
28
  __decorate([
28
- (0, class_validator_1.IsString)(),
29
+ (0, class_validator_1.IsEnum)(incident_actions_enum_1.IncidentActions),
29
30
  (0, class_validator_1.IsNotEmpty)(),
30
31
  __metadata("design:type", String)
31
32
  ], CreateIncidentActionDto.prototype, "action", void 0);
@@ -1,6 +1,7 @@
1
1
  export declare enum IncidentActions {
2
2
  CREATED = "Created",
3
3
  STATUS_CHANGED = "Status Changed",
4
+ UPDATED = "Updated",
4
5
  ASSIGNED = "Assigned",
5
6
  REOPENED = "Reopened",
6
7
  REPORT_CREATED = "Report Created",
@@ -5,6 +5,7 @@ var IncidentActions;
5
5
  (function (IncidentActions) {
6
6
  IncidentActions["CREATED"] = "Created";
7
7
  IncidentActions["STATUS_CHANGED"] = "Status Changed";
8
+ IncidentActions["UPDATED"] = "Updated";
8
9
  IncidentActions["ASSIGNED"] = "Assigned";
9
10
  IncidentActions["REOPENED"] = "Reopened";
10
11
  IncidentActions["REPORT_CREATED"] = "Report Created";
@@ -1,8 +1,9 @@
1
+ import { IncidentActions } from "../enums/incident-actions.enum";
1
2
  export interface IncidentAction {
2
3
  id?: number;
3
4
  incidentId: number;
4
5
  userId?: number;
5
- action: string;
6
+ action: IncidentActions;
6
7
  comments?: string;
7
8
  timestamp: string;
8
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grm-shared-library",
3
- "version": "1.0.156",
3
+ "version": "1.0.158",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [