grm-shared-library 1.0.130 → 1.0.132

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,8 +1,6 @@
1
1
  import { IncidentAppId } from "../../enums/incident-app-id.enum";
2
2
  import { IncidentClass } from "../../enums/incident-class.enum";
3
3
  import { IncidentChannel } from "../../enums/incident-channel.enum";
4
- import { CreateIncidentCategoryDto } from "../category/create-incident-category.dto";
5
- import { CreateIncidentTypeDto } from "../type/create-incident-type.dto";
6
4
  import { IncidentActionDto } from "../action/incident-action.dto";
7
5
  import { IncidentPriority } from "../../enums/incident-priority.enum";
8
6
  import { MapLocationDto } from "../../../common";
@@ -11,11 +9,11 @@ export declare class CreateIncidentDto {
11
9
  appId: IncidentAppId;
12
10
  class: IncidentClass;
13
11
  reporter: IncidentReporterDto;
14
- userId?: number;
12
+ reporterId?: number;
15
13
  isAnonymous?: boolean;
16
14
  channel: IncidentChannel;
17
- category?: CreateIncidentCategoryDto;
18
- type: CreateIncidentTypeDto;
15
+ categoryId: number;
16
+ typeId?: number;
19
17
  description?: string;
20
18
  status: string;
21
19
  action: IncidentActionDto;
@@ -14,9 +14,7 @@ const class_validator_1 = require("class-validator");
14
14
  const incident_app_id_enum_1 = require("../../enums/incident-app-id.enum");
15
15
  const incident_class_enum_1 = require("../../enums/incident-class.enum");
16
16
  const incident_channel_enum_1 = require("../../enums/incident-channel.enum");
17
- const create_incident_category_dto_1 = require("../category/create-incident-category.dto");
18
17
  const class_transformer_1 = require("class-transformer");
19
- const create_incident_type_dto_1 = require("../type/create-incident-type.dto");
20
18
  const incident_action_dto_1 = require("../action/incident-action.dto");
21
19
  const incident_priority_enum_1 = require("../../enums/incident-priority.enum");
22
20
  const common_1 = require("../../../common");
@@ -44,7 +42,7 @@ __decorate([
44
42
  (0, class_validator_1.IsNumber)(),
45
43
  (0, class_validator_1.IsOptional)(),
46
44
  __metadata("design:type", Number)
47
- ], CreateIncidentDto.prototype, "userId", void 0);
45
+ ], CreateIncidentDto.prototype, "reporterId", void 0);
48
46
  __decorate([
49
47
  (0, class_validator_1.IsBoolean)(),
50
48
  (0, class_validator_1.IsOptional)(),
@@ -56,17 +54,15 @@ __decorate([
56
54
  __metadata("design:type", String)
57
55
  ], CreateIncidentDto.prototype, "channel", void 0);
58
56
  __decorate([
59
- (0, class_validator_1.ValidateNested)(),
60
- (0, class_transformer_1.Type)(() => create_incident_category_dto_1.CreateIncidentCategoryDto),
61
- (0, class_validator_1.IsOptional)(),
62
- __metadata("design:type", create_incident_category_dto_1.CreateIncidentCategoryDto)
63
- ], CreateIncidentDto.prototype, "category", void 0);
57
+ (0, class_validator_1.IsNumber)(),
58
+ (0, class_validator_1.IsNotEmpty)(),
59
+ __metadata("design:type", Number)
60
+ ], CreateIncidentDto.prototype, "categoryId", void 0);
64
61
  __decorate([
65
- (0, class_validator_1.ValidateNested)(),
66
- (0, class_transformer_1.Type)(() => create_incident_type_dto_1.CreateIncidentTypeDto),
62
+ (0, class_validator_1.IsNumber)(),
67
63
  (0, class_validator_1.IsNotEmpty)(),
68
- __metadata("design:type", create_incident_type_dto_1.CreateIncidentTypeDto)
69
- ], CreateIncidentDto.prototype, "type", void 0);
64
+ __metadata("design:type", Number)
65
+ ], CreateIncidentDto.prototype, "typeId", void 0);
70
66
  __decorate([
71
67
  (0, class_validator_1.IsString)(),
72
68
  (0, class_validator_1.IsOptional)(),
@@ -6,6 +6,6 @@ export declare enum IncidentChannel {
6
6
  PHONE = "Phone",
7
7
  CHAT = "Chat",
8
8
  SOCIAL_MEDIA = "Social Media",
9
- IN_PERSON = "In Person",
9
+ IN_PERSON = "In-Person",
10
10
  OTHER = "Other"
11
11
  }
@@ -10,6 +10,6 @@ var IncidentChannel;
10
10
  IncidentChannel["PHONE"] = "Phone";
11
11
  IncidentChannel["CHAT"] = "Chat";
12
12
  IncidentChannel["SOCIAL_MEDIA"] = "Social Media";
13
- IncidentChannel["IN_PERSON"] = "In Person";
13
+ IncidentChannel["IN_PERSON"] = "In-Person";
14
14
  IncidentChannel["OTHER"] = "Other";
15
15
  })(IncidentChannel || (exports.IncidentChannel = IncidentChannel = {}));
@@ -1,6 +1,6 @@
1
1
  export declare enum IncidentPriority {
2
- LOW = "low",
3
- MEDIUM = "medium",
4
- HIGH = "high",
5
- CRITICAL = "critical"
2
+ LOW = "Low",
3
+ MEDIUM = "Medium",
4
+ HIGH = "High",
5
+ CRITICAL = "Critical"
6
6
  }
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IncidentPriority = void 0;
4
4
  var IncidentPriority;
5
5
  (function (IncidentPriority) {
6
- IncidentPriority["LOW"] = "low";
7
- IncidentPriority["MEDIUM"] = "medium";
8
- IncidentPriority["HIGH"] = "high";
9
- IncidentPriority["CRITICAL"] = "critical";
6
+ IncidentPriority["LOW"] = "Low";
7
+ IncidentPriority["MEDIUM"] = "Medium";
8
+ IncidentPriority["HIGH"] = "High";
9
+ IncidentPriority["CRITICAL"] = "Critical";
10
10
  })(IncidentPriority || (exports.IncidentPriority = IncidentPriority = {}));
@@ -1,6 +1,8 @@
1
+ import { IncidentType } from "./incident-type";
1
2
  export interface IncidentCategory {
2
3
  id?: number;
3
4
  name: string;
4
5
  description?: string;
5
6
  organizationId: number;
7
+ types: IncidentType[];
6
8
  }
@@ -1,7 +1,9 @@
1
+ import { IncidentCategory } from "./incident-category";
1
2
  export interface IncidentType {
2
3
  id?: number;
3
4
  name: string;
4
5
  description?: string;
5
6
  categoryId?: number;
6
7
  organizationId: number;
8
+ category?: IncidentCategory;
7
9
  }
@@ -12,11 +12,11 @@ export interface Incident {
12
12
  appId: IncidentAppId;
13
13
  class: IncidentClass;
14
14
  reporter: IncidentReporter;
15
- userId?: number;
15
+ reporterId?: number;
16
16
  isAnonymous?: boolean;
17
17
  channel: IncidentChannel;
18
- category?: IncidentCategory;
19
- type: IncidentType;
18
+ categoryId: number;
19
+ typeId: number;
20
20
  description?: string;
21
21
  status: string;
22
22
  action: IncidentAction;
@@ -26,4 +26,6 @@ export interface Incident {
26
26
  organizationId: number;
27
27
  createdAt?: Date;
28
28
  updatedAt?: Date;
29
+ category?: IncidentCategory;
30
+ type?: IncidentType;
29
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grm-shared-library",
3
- "version": "1.0.130",
3
+ "version": "1.0.132",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [